diff --git a/go-packages/meep-app-support-client/README.md b/go-packages/meep-app-support-client/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b645b053fbdf4bf3341897ad0b2d6c0300543536 --- /dev/null +++ b/go-packages/meep-app-support-client/README.md @@ -0,0 +1,84 @@ +# Go API client for client + +The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + +## 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.1.1 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./client" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AppConfirmReadyApi* | [**ApplicationsConfirmReadyPOST**](docs/AppConfirmReadyApi.md#applicationsconfirmreadypost) | **Post** /applications/{appInstanceId}/confirm_ready | +*AppConfirmTerminationApi* | [**ApplicationsConfirmTerminationPOST**](docs/AppConfirmTerminationApi.md#applicationsconfirmterminationpost) | **Post** /applications/{appInstanceId}/confirm_termination | +*AppDnsRulesApi* | [**ApplicationsDnsRuleGET**](docs/AppDnsRulesApi.md#applicationsdnsruleget) | **Get** /applications/{appInstanceId}/dns_rules/{dnsRuleId} | +*AppDnsRulesApi* | [**ApplicationsDnsRulePUT**](docs/AppDnsRulesApi.md#applicationsdnsruleput) | **Put** /applications/{appInstanceId}/dns_rules/{dnsRuleId} | +*AppDnsRulesApi* | [**ApplicationsDnsRulesGET**](docs/AppDnsRulesApi.md#applicationsdnsrulesget) | **Get** /applications/{appInstanceId}/dns_rules | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionDELETE**](docs/AppSubscriptionsApi.md#applicationssubscriptiondelete) | **Delete** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionGET**](docs/AppSubscriptionsApi.md#applicationssubscriptionget) | **Get** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionsGET**](docs/AppSubscriptionsApi.md#applicationssubscriptionsget) | **Get** /applications/{appInstanceId}/subscriptions | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionsPOST**](docs/AppSubscriptionsApi.md#applicationssubscriptionspost) | **Post** /applications/{appInstanceId}/subscriptions | +*AppTrafficRulesApi* | [**ApplicationsTrafficRuleGET**](docs/AppTrafficRulesApi.md#applicationstrafficruleget) | **Get** /applications/{appInstanceId}/traffic_rules/{trafficRuleId} | +*AppTrafficRulesApi* | [**ApplicationsTrafficRulePUT**](docs/AppTrafficRulesApi.md#applicationstrafficruleput) | **Put** /applications/{appInstanceId}/traffic_rules/{trafficRuleId} | +*AppTrafficRulesApi* | [**ApplicationsTrafficRulesGET**](docs/AppTrafficRulesApi.md#applicationstrafficrulesget) | **Get** /applications/{appInstanceId}/traffic_rules | +*TimingApi* | [**TimingCapsGET**](docs/TimingApi.md#timingcapsget) | **Get** /timing/timing_caps | +*TimingApi* | [**TimingCurrentTimeGET**](docs/TimingApi.md#timingcurrenttimeget) | **Get** /timing/current_time | + + +## Documentation For Models + + - [AppReadyConfirmation](docs/AppReadyConfirmation.md) + - [AppTerminationConfirmation](docs/AppTerminationConfirmation.md) + - [AppTerminationNotification](docs/AppTerminationNotification.md) + - [AppTerminationNotificationLinks](docs/AppTerminationNotificationLinks.md) + - [AppTerminationNotificationSubscription](docs/AppTerminationNotificationSubscription.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) + - [LinkType](docs/LinkType.md) + - [LinkTypeConfirmTermination](docs/LinkTypeConfirmTermination.md) + - [MecAppSuptApiSubscriptionLinkList](docs/MecAppSuptApiSubscriptionLinkList.md) + - [MecAppSuptApiSubscriptionLinkListLinks](docs/MecAppSuptApiSubscriptionLinkListLinks.md) + - [MecAppSuptApiSubscriptionLinkListSubscription](docs/MecAppSuptApiSubscriptionLinkListSubscription.md) + - [OperationActionType](docs/OperationActionType.md) + - [ProblemDetails](docs/ProblemDetails.md) + - [ReadyIndicationType](docs/ReadyIndicationType.md) + - [Self](docs/Self.md) + - [TimingCaps](docs/TimingCaps.md) + - [TimingCapsNtpServers](docs/TimingCapsNtpServers.md) + - [TimingCapsNtpServersAuthenticationOption](docs/TimingCapsNtpServersAuthenticationOption.md) + - [TimingCapsNtpServersNtpServerAddrType](docs/TimingCapsNtpServersNtpServerAddrType.md) + - [TimingCapsPtpMasters](docs/TimingCapsPtpMasters.md) + - [TimingCapsTimeStamp](docs/TimingCapsTimeStamp.md) + - [TrafficFilter](docs/TrafficFilter.md) + - [TrafficRule](docs/TrafficRule.md) + - [TrafficRuleAction](docs/TrafficRuleAction.md) + - [TrafficRuleFilterType](docs/TrafficRuleFilterType.md) + - [TrafficRuleState](docs/TrafficRuleState.md) + - [TunnelInfo](docs/TunnelInfo.md) + - [TunnelInfoTunnelType](docs/TunnelInfoTunnelType.md) + + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + +cti_support@etsi.org + diff --git a/go-packages/meep-app-support-client/api/swagger.yaml b/go-packages/meep-app-support-client/api/swagger.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3a2b10c95279435c1e08916cf68ba58286520b38 --- /dev/null +++ b/go-packages/meep-app-support-client/api/swagger.yaml @@ -0,0 +1,2142 @@ +openapi: 3.0.2 +info: + title: AdvantEDGE MEC Application Support API + description: The ETSI MEC ISG MEC011 MEC Application Support API described using + OpenAPI + contact: + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 2.1.1 +externalDocs: + description: ETSI GS MEC011 Application Enablement API, V2.1.1 + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf +servers: +- url: https://localhost/sandboxname/mec_app_support/v1 +tags: +- name: appTrafficRules +- name: appDnsRules +- name: appSubscriptions +- name: appConfirmTermination +- name: appConfirmReady +- name: timing +- name: callbacks +paths: + /applications/{appInstanceId}/traffic_rules: + get: + tags: + - appTrafficRules + description: This method retrieves information about all the traffic rules associated + with a MEC application instance. + operationId: ApplicationsTrafficRules_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/TrafficRule' + x-content-type: application/json + examples: + TrafficRules: + $ref: '#/components/examples/TrafficRules' + links: + getIndividualMeTrafficRule: + $ref: '#/components/links/GetIndividualMeTrafficRule' + putIndividualMeTrafficRule: + $ref: '#/components/links/PutIndividualMeTrafficRule' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/traffic_rules/{trafficRuleId}: + get: + tags: + - appTrafficRules + description: This method retrieves information about all the traffic rules associated + with a MEC application instance. + operationId: ApplicationsTrafficRule_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: trafficRuleId + in: path + description: Represents a traffic rule. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/TrafficRule' + examples: + TrafficRule: + $ref: '#/components/examples/TrafficRule' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + put: + tags: + - appTrafficRules + description: This method retrieves information about all the traffic rules associated + with a MEC application instance. + operationId: ApplicationsTrafficRule_PUT + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: trafficRuleId + in: path + description: Represents a traffic rule. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ApplicationsTrafficRule' + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/TrafficRule' + examples: + TrafficRule: + $ref: '#/components/examples/TrafficRule' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "412": + description: Precondition Failed. It is used when a condition has failed + during conditional requests, e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/dns_rules: + get: + tags: + - appDnsRules + description: This method retrieves information about all the DNS rules associated + with a MEC application instance. + operationId: ApplicationsDnsRules_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/DnsRule' + x-content-type: application/json + examples: + DnsRules: + $ref: '#/components/examples/DnsRules' + links: + getIndividualMeDNSRule: + $ref: '#/components/links/GetIndividualMeDNSRule' + putIndividualMeDNSRule: + $ref: '#/components/links/PutIndividualMeDNSRule' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/dns_rules/{dnsRuleId}: + get: + tags: + - appDnsRules + description: This method retrieves information about a DNS rule associated with + a MEC application instance. + operationId: ApplicationsDnsRule_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: dnsRuleId + in: path + description: Represents a DNS rule. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRule' + examples: + DnsRule: + $ref: '#/components/examples/DnsRule' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + put: + tags: + - appDnsRules + description: This method activates, de-activates or updates a traffic rule. + operationId: ApplicationsDnsRule_PUT + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: dnsRuleId + in: path + description: Represents a DNS rule. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ApplicationsDnsRule' + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRule' + examples: + DnsRule: + $ref: '#/components/examples/DnsRule' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "412": + description: Precondition Failed. It is used when a condition has failed + during conditional requests, e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/subscriptions: + get: + tags: + - appSubscriptions + description: The GET method may be used to request information about all subscriptions + for this requestor. Upon success, the response contains entity body with all + the subscriptions for the requestor. + operationId: ApplicationsSubscriptions_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Upon success, a response body containing the list of links + to the requested subscriptions is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList' + links: + getIndividualmecAppSuptApiSubscriptionLinkList: + $ref: '#/components/links/GetIndividualmecAppSuptApiSubscriptionLinkList' + delIndividualmecAppSuptApiSubscriptionLinkList: + $ref: '#/components/links/DelIndividualmecAppSuptApiSubscriptionLinkList' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + post: + tags: + - appSubscriptions + description: The POST method may be used to create a new subscription. One example + use case is to create a new subscription to the MEC service availability notifications. + Upon success, the response contains entity body describing the created subscription. + operationId: ApplicationsSubscriptions_POST + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ApplicationsSubscriptions' + responses: + "201": + description: Entity body in the request contains a subscription to the MEC + service availability notifications that is to be created. + headers: + location: + description: The resource URI of the created resource + style: simple + explode: false + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationNotificationSubscription' + links: + getIndividualmecAppSuptApiSubscription: + $ref: '#/components/links/GetIndividualmecAppSuptApiSubscription' + delIndividualmecAppSuptApiSubscription: + $ref: '#/components/links/DelIndividualmecAppSuptApiSubscription' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + callbacks: + appTerminationNotification: + $ref: '#/components/callbacks/AppTerminationNotification' + /applications/{appInstanceId}/subscriptions/{subscriptionId}: + get: + tags: + - appSubscriptions + description: The GET method requests information about a subscription for this + requestor. Upon success, the response contains entity body with the subscription + for the requestor. + operationId: ApplicationsSubscription_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Upon success, a response body containing the requested subscription + is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationNotificationSubscription' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + delete: + tags: + - appSubscriptions + description: This method deletes a mecAppSuptApiSubscription. This method is + typically used in "Unsubscribing from service availability event notifications" + procedure. + operationId: ApplicationsSubscription_DELETE + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/confirm_termination: + post: + tags: + - appConfirmTermination + description: This method is used to confirm the application level termination of + an application instance. + operationId: ApplicationsConfirmTermination_POST + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ApplicationsConfirmTermination' + responses: + "204": + description: No Content + "401": + description: Unauthorized. It is used when the client did not submit the + appropriate credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "409": + description: Conflict. The operation cannot be executed currently, due to + a conflict with the state of the resource. Typically, this is because + the application instance resource is in NOT_INSTANTIATED state. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "429": + description: Too Many Requests. It is used when a rate limiter has triggered. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/confirm_ready: + post: + tags: + - appConfirmReady + description: 'This method may be used by the MEC application instance to notify + the MEC platform that it is up and running. ' + operationId: ApplicationsConfirmReady_POST + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ApplicationsConfirmReady' + responses: + "204": + description: No Content + "401": + description: Unauthorized. It is used when the client did not submit the + appropriate credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "409": + description: Conflict. The operation cannot be executed currently, due to + a conflict with the state of the resource. Typically, this is because + the application instance resource is in NOT_INSTANTIATED state. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "429": + description: Too Many Requests. It is used when a rate limiter has triggered. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /timing/timing_caps: + get: + tags: + - timing + description: This method retrieves the information of the platform's timing + capabilities which corresponds to the timing capabilities query + operationId: TimingCaps_GET + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/TimingCaps' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /timing/current_time: + get: + tags: + - timing + description: This method retrieves the information of the platform's current + time which corresponds to the get platform time procedure + operationId: TimingCurrentTime_GET + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/CurrentTime' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' +components: + schemas: + Empty: + description: Empty schema + AppReadyConfirmation: + required: + - indication + type: object + properties: + indication: + $ref: '#/components/schemas/ReadyIndicationType' + description: This type represents the information that the MEC application instance + indicates to the MEC platform that it is up and running. + AppTerminationConfirmation: + required: + - operationAction + type: object + properties: + operationAction: + $ref: '#/components/schemas/OperationActionType' + description: This type represents the information that the MEC application instance + provides to the MEC platform when informing it that the application has completed + its application level related terminate/stop actions, e.g. retention of application + state in the case of stop. + AppTerminationNotification.Links: + required: + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/LinkType' + confirmTermination: + $ref: '#/components/schemas/LinkType.ConfirmTermination' + description: Object containing hyperlinks related to the resource. + AppTerminationNotification.MaxGracefulTimeout: + type: integer + description: Maximum timeout value in seconds for graceful termination or graceful + stop of an application instance. + format: uint32 + example: 10 + AppTerminationNotification.NotificationType: + type: string + description: Shall be set to AppTerminationNotification. + example: AppTerminationNotification + AppTerminationNotification: + required: + - _links + - maxGracefulTimeout + - notificationType + - operationAction + type: object + properties: + notificationType: + $ref: '#/components/schemas/AppTerminationNotification.NotificationType' + operationAction: + $ref: '#/components/schemas/OperationActionType' + maxGracefulTimeout: + $ref: '#/components/schemas/AppTerminationNotification.MaxGracefulTimeout' + _links: + $ref: '#/components/schemas/AppTerminationNotification.Links' + description: This type represents the information that the MEC platform notifies + the subscribed application instance about the corresponding application instance + termination/stop. + AppTerminationNotificationSubscription.AppInstanceId: + type: string + description: It is used as the filtering criterion for the subscribed events. + example: ID1 + AppTerminationNotificationSubscription.CallbackReference: + type: string + description: URI selected by the MEC application instance to receive notifications + on the subscribed MEC application instance management information. This shall + be included in both the request and the response. + format: uri + AppTerminationNotificationSubscription: + required: + - _links + - appInstanceId + - callbackReference + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/AppTerminationNotificationSubscription.SubscriptionType' + callbackReference: + $ref: '#/components/schemas/AppTerminationNotificationSubscription.CallbackReference' + _links: + $ref: '#/components/schemas/Self' + appInstanceId: + $ref: '#/components/schemas/AppTerminationNotificationSubscription.AppInstanceId' + description: This type represents the information that the MEC platform notifies + the subscribed application instance about the corresponding application instance + termination/stop. + example: + appInstanceId: ID1 + subscriptionType: AppTerminationNotificationSubscription + _links: + self: + href: /mecAppSuptApi/example + callbackReference: http://example.com/aeiou + AppTerminationNotificationSubscription.SubscriptionType: + type: string + description: Shall be set to AppTerminationNotificationSubscription. + example: AppTerminationNotificationSubscription + CurrentTime: + required: + - nanoSeconds + - seconds + - timeSourceStatus + type: object + properties: + seconds: + type: integer + description: The seconds part of the time. Time is defined as Unix-time + since January 1, 1970, 00:00:00 UTC + format: uint32 + example: 1577836800 + nanoSeconds: + type: integer + description: The nanoseconds part of the time. Time is defined as Unix-time + since January 1, 1970, 00:00:00 UTC + format: uint32 + example: 0 + timeSourceStatus: + type: string + description: Platform Time Source status. 1 = TRACEABLE - time source is + locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked + to the UTC time source + example: TRACEABLE + enum: + - TRACEABLE + - NONTRACEABLE + description: This type represents the information provided by the MEC platform + in response to the Get Platform Time Request message. + example: + seconds: 1577836800 + nanoSeconds: 0 + timeSourceStatus: TRACEABLE + DestinationInterface.InterfaceType: + type: string + description: Type of the interface + example: TUNNEL + enum: + - TUNNEL + - MAC + - IP + DestinationInterface.IpAddress: + type: string + description: IP address of the remote destination + example: 192.0.2.0 + DestinationInterface.MacAddress: + type: string + description: Source address identifies the MAC address of the interface + example: 02-00-00-00-00-00 + DestinationInterface: + required: + - interfaceType + type: object + properties: + interfaceType: + $ref: '#/components/schemas/DestinationInterface.InterfaceType' + tunnelInfo: + $ref: '#/components/schemas/TunnelInfo' + srcMacAddress: + $ref: '#/components/schemas/DestinationInterface.MacAddress' + dstMacAddress: + $ref: '#/components/schemas/DestinationInterface.MacAddress' + dstIpAddress: + $ref: '#/components/schemas/DestinationInterface.IpAddress' + description: This type represents the destination interface. If the action is + FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall + be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, + two values shall be provided. If the action is DROP, no value shall be provided. + example: + interfaceType: TUNNEL + dstIpAddress: 192.0.2.0 + srcMacAddress: 02-00-00-00-00-00 + tunnelInfo: + tunnelSrcAddress: '?' + tunnelType: GTP_U + tunnelDstAddress: '?' + dstMacAddress: null + DnsRule.DomainName: + type: string + description: FQDN resolved by the DNS rule + example: www.example.com + DnsRule.Id: + type: string + description: Identifies the DNS Rule + example: dnsRule1 + DnsRule.IpAddress: + type: string + description: IP address associated with the FQDN resolved by the DNS rule + example: 192.0.2.0 + DnsRule.IpAddressType: + type: string + description: IP address type + example: IP_V6 + enum: + - IP_V6 + - IP_V4 + DnsRule.State: + type: string + description: DNS rule state. This attribute may be updated using HTTP PUT method + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + DnsRule.Ttl: + type: integer + description: Time to live value + format: uint32 + DnsRule: + required: + - dnsRuleId + - domainName + - ipAddress + - ipAddressType + - state + type: object + properties: + dnsRuleId: + $ref: '#/components/schemas/DnsRule.Id' + domainName: + $ref: '#/components/schemas/DnsRule.DomainName' + ipAddressType: + $ref: '#/components/schemas/DnsRule.IpAddressType' + ipAddress: + $ref: '#/components/schemas/DnsRule.IpAddress' + ttl: + $ref: '#/components/schemas/DnsRule.Ttl' + state: + $ref: '#/components/schemas/DnsRule.State' + description: This type represents the general information of a DNS rule. + example: + domainName: www.example.com + ipAddress: 192.0.2.0 + dnsRuleId: dnsRule1 + state: ACTIVE + ttl: 0 + ipAddressType: IP_V6 + LinkType: + type: object + properties: + href: + $ref: '#/components/schemas/Href' + description: This type represents a type of link and may be referenced from + data structures + example: + href: /mecAppSuptApi/example + LinkType.ConfirmTermination: + type: object + properties: + href: + $ref: '#/components/schemas/Href' + description: Link to the task resource where to confirm termination in case + the application is ready to be terminated before expiry of the timeout. + Href: + type: string + description: URI referring to a resource + format: uri + example: /mecAppSuptApi/example + MecAppSuptApiSubscriptionLinkList.Links: + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + subscriptions: + type: array + description: The MEC application instance's subscriptions + items: + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList.Subscription' + description: Self-referring URI. + example: + subscriptions: + - rel: rel + href: null + - rel: rel + href: null + self: + href: /mecAppSuptApi/example + MecAppSuptApiSubscriptionLinkList.Subscription: + required: + - href + - rel + type: object + properties: + href: + $ref: '#/components/schemas/Href' + rel: + type: string + description: The values shall be set to AppTerminationNotificationSubscription. + description: A link to a subscription. + example: + rel: rel + href: null + MecAppSuptApiSubscriptionLinkList: + required: + - _links + type: object + properties: + _links: + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList.Links' + description: This type represents a list of links related to currently existing + subscriptions for a MEC application instance. This information is returned + when sending a request to receive current subscriptions. + example: + _links: + subscriptions: + - rel: rel + href: null + - rel: rel + href: null + self: + href: /mecAppSuptApi/example + OperationActionType: + type: string + description: Operation that is being performed on the MEC application instance. + example: TERMINATING + enum: + - STOPPING + - TERMINATING + ProblemDetails: + type: object + properties: + type: + $ref: '#/components/schemas/Problem.type' + title: + $ref: '#/components/schemas/Problem.title' + status: + $ref: '#/components/schemas/Problem.status' + detail: + $ref: '#/components/schemas/Problem.detail' + instance: + $ref: '#/components/schemas/Problem.instance' + Problem.detail: + type: string + description: A human-readable explanation specific to this occurrence of the + problem + Problem.instance: + type: string + description: A URI reference that identifies the specific occurrence of the + problem + format: uri + Problem.status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + Problem.title: + type: string + description: A short, human-readable summary of the problem type + Problem.type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies the + problem type + format: uri + ReadyIndicationType: + type: string + description: Indication about the MEC application instance. + example: READY + enum: + - READY + Self: + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + description: Self-referring URI. + readOnly: true + example: + self: + href: /mecAppSuptApi/example + TimingCaps.NtpServers.AuthenticationKeyNum: + type: integer + description: Authentication key number + format: uint32 + example: 1 + TimingCaps.NtpServers.AuthenticationOption: + type: string + description: NTP authentication option + example: NONE + enum: + - NONE + - SYMMETRIC_KEY + - AUTO_KEY + TimingCaps.NtpServers.DelayReqMaxRate: + type: integer + description: Acceptable maximum rate of the Delay_Req messages in packets per + second + format: uint32 + example: 10 + TimingCaps.NtpServers.LocalPriority: + type: integer + description: NTP server local priority + format: uint32 + example: 1 + TimingCaps.NtpServers.MaxPollingInterval: + type: integer + description: Maximum poll interval for NTP messages, in seconds as a power of + two. Range 3...17 + format: uint32 + example: 17 + TimingCaps.NtpServers.MinPollingInterval: + type: integer + description: Minimum poll interval for NTP messages, in seconds as a power of + two. Range 3...17 + format: uint32 + example: 3 + TimingCaps.NtpServers.NtpServerAddr: + type: string + description: NTP server address + example: 192.0.2.0 + TimingCaps.NtpServers.NtpServerAddrType: + type: string + description: Address type of NTP server + example: IP_ADDRESS + enum: + - IP_ADDRESS + - DNS_NAME + TimingCaps.NtpServers_PtpMasterIpAddress: + type: string + description: PTP Master IP Address + example: 192.0.2.0 + TimingCaps.NtpServers_PtpMasterLocalPriority: + type: integer + description: PTP Master local priority + format: uint32 + example: 1 + TimingCaps.NtpServers: + required: + - authenticationKeyNum + - authenticationOption + - localPriority + - maxPollingInterval + - minPollingInterval + - ntpServerAddr + - ntpServerAddrType + type: object + properties: + ntpServerAddrType: + $ref: '#/components/schemas/TimingCaps.NtpServers.NtpServerAddrType' + ntpServerAddr: + $ref: '#/components/schemas/TimingCaps.NtpServers.NtpServerAddr' + minPollingInterval: + $ref: '#/components/schemas/TimingCaps.NtpServers.MinPollingInterval' + maxPollingInterval: + $ref: '#/components/schemas/TimingCaps.NtpServers.MaxPollingInterval' + localPriority: + $ref: '#/components/schemas/TimingCaps.NtpServers.LocalPriority' + authenticationOption: + $ref: '#/components/schemas/TimingCaps.NtpServers.AuthenticationOption' + authenticationKeyNum: + $ref: '#/components/schemas/TimingCaps.NtpServers.AuthenticationKeyNum' + description: NTP server detail. + example: + ntpServerAddr: 192.0.2.0 + maxPollingInterval: 17 + authenticationKeyNum: 1 + localPriority: 1 + authenticationOption: NONE + ntpServerAddrType: IP_ADDRESS + minPollingInterval: 3 + TimingCaps_PtpMasters: + required: + - delayReqMaxRate + - ptpMasterIpAddress + - ptpMasterLocalPriority + type: object + properties: + ptpMasterIpAddress: + $ref: '#/components/schemas/TimingCaps.NtpServers_PtpMasterIpAddress' + ptpMasterLocalPriority: + $ref: '#/components/schemas/TimingCaps.NtpServers_PtpMasterLocalPriority' + delayReqMaxRate: + $ref: '#/components/schemas/TimingCaps.NtpServers.DelayReqMaxRate' + description: NTP server detail. + example: + ptpMasterLocalPriority: 1 + ptpMasterIpAddress: 192.0.2.0 + delayReqMaxRate: 10 + TimingCaps.TimeStamp: + required: + - nanoSeconds + - seconds + type: object + properties: + seconds: + type: integer + description: The seconds part of the time. Time is defined as Unix-time + since January 1, 1970, 00:00:00 UTC + format: uint32 + example: 1577836800 + nanoSeconds: + type: integer + description: The nanoseconds part of the time. Time is defined as Unix-time + since January 1, 1970, 00:00:00 UTC + format: uint32 + example: 0 + description: time + example: + seconds: 1577836800 + nanoSeconds: 0 + TimingCaps: + type: object + properties: + timeStamp: + $ref: '#/components/schemas/TimingCaps.TimeStamp' + ntpServers: + type: array + description: Available NTP servers + items: + $ref: '#/components/schemas/TimingCaps.NtpServers' + ptpMasters: + type: array + description: Available PTP Masters + items: + $ref: '#/components/schemas/TimingCaps_PtpMasters' + description: This type represents the information provided by the MEC platform + in response to the Timing capabilities Query message. + example: + timeStamp: + seconds: 1577836800 + nanoSeconds: 0 + ntpServers: + - ntpServerAddr: 192.0.2.0 + maxPollingInterval: 17 + authenticationKeyNum: 1 + localPriority: 1 + authenticationOption: NONE + ntpServerAddrType: IP_ADDRESS + minPollingInterval: 3 + - ntpServerAddr: 192.0.2.0 + maxPollingInterval: 17 + authenticationKeyNum: 1 + localPriority: 1 + authenticationOption: NONE + ntpServerAddrType: IP_ADDRESS + minPollingInterval: 3 + ptpMasters: + - ptpMasterLocalPriority: 1 + ptpMasterIpAddress: 192.0.2.0 + delayReqMaxRate: 10 + - ptpMasterLocalPriority: 1 + ptpMasterIpAddress: 192.0.2.0 + delayReqMaxRate: 10 + TrafficFilter.Address: + type: string + description: Identify the traffic ip address. + example: 192.168.1.1 + TrafficFilter.DSCP: + type: integer + description: Used to match all IPv4 packets that have the same Differentiated + Services Code Point (DSCP) + format: uint32 + example: 0 + TrafficFilter.Port: + type: string + description: A port + example: "8080" + TrafficFilter.Protocol: + type: string + description: Protocol of the traffic filter + example: '?' + TrafficFilter.QCI: + type: integer + description: Used to match all packets that have the same Quality Class Indicator + (QCI). + format: uint32 + example: 1 + TrafficFilter.TC: + type: integer + description: Used to match all IPv6 packets that have the same Traffic Class. + format: uint32 + example: 1 + TrafficFilter.Token: + type: string + description: Used for token based traffic rule + example: '?' + TrafficFilter.TunnelAddress: + type: string + description: Used for GTP tunnel based traffic rule + example: '?' + TrafficFilter.TunnelPort: + type: string + description: Used for GTP tunnel based traffic rule + example: '?' + TrafficFilter: + type: object + properties: + srcAddress: + type: array + description: An IP address or a range of IP address. For IPv4, the IP address + could be an IP address plus mask, or an individual IP address, or a range + of IP addresses. For IPv6, the IP address could be an IP prefix, or a + range of IP prefixes. + items: + $ref: '#/components/schemas/TrafficFilter.Address' + dstAddress: + type: array + description: An IP address or a range of IP address. For IPv4, the IP address + could be an IP address plus mask, or an individual IP address, or a range + of IP addresses. For IPv6, the IP address could be an IP prefix, or a + range of IP prefixes. + items: + $ref: '#/components/schemas/TrafficFilter.Address' + srcPort: + type: array + description: A port or a range of ports + items: + $ref: '#/components/schemas/TrafficFilter.Port' + dstPort: + type: array + description: A port or a range of ports + items: + $ref: '#/components/schemas/TrafficFilter.Port' + protocol: + type: array + description: Specify the protocol of the traffic filter + items: + $ref: '#/components/schemas/TrafficFilter.Protocol' + token: + type: array + description: Used for token based traffic rule + items: + $ref: '#/components/schemas/TrafficFilter.Token' + srcTunnelAddress: + type: array + description: Used for GTP tunnel based traffic rule + items: + $ref: '#/components/schemas/TrafficFilter.TunnelAddress' + tgtTunnelAddress: + type: array + description: Used for GTP tunnel based traffic rule + items: + $ref: '#/components/schemas/TrafficFilter.TunnelAddress' + srcTunnelPort: + type: array + description: Used for GTP tunnel based traffic rule + items: + $ref: '#/components/schemas/TrafficFilter.TunnelPort' + dstTunnelPort: + type: array + description: Used for GTP tunnel based traffic rule + items: + $ref: '#/components/schemas/TrafficFilter.TunnelPort' + qCI: + $ref: '#/components/schemas/TrafficFilter.QCI' + dSCP: + $ref: '#/components/schemas/TrafficFilter.DSCP' + tC: + $ref: '#/components/schemas/TrafficFilter.TC' + description: This type represents the traffic filter. + example: + srcTunnelPort: + - '?' + - '?' + dstAddress: + - null + - null + srcAddress: + - 192.168.1.1 + - 192.168.1.1 + srcPort: + - "8080" + - "8080" + token: + - '?' + - '?' + tC: 1 + protocol: + - '?' + - '?' + dstTunnelPort: + - null + - null + dSCP: 0 + dstPort: + - null + - null + qCI: 1 + srcTunnelAddress: + - '?' + - '?' + tgtTunnelAddress: + - null + - null + TrafficRule.Action: + type: string + description: The action of the MEC host data plane when a packet matches the + trafficFilter + example: DROP + enum: + - DROP + - FORWARD_DECAPSULATED + - FORWARD_ENCAPSULATED + - PASSTHROUGH + - DUPLICATE_DECAPSULATED + - DUPLICATE_ENCAPSULATED + TrafficRule.FilterType: + type: string + description: Definition of filter per FLOW or PACKET. If flow the filter match + UE->EPC packet and the reverse packet is handled in the same context + example: FLOW + enum: + - FLOW + - PACKET + TrafficRule.Id: + type: string + description: Identify the traffic rule. + example: TrafficRule1 + TrafficRule_Priority: + type: integer + description: Priority of this traffic rule. If traffic rule conflicts, the one + with higher priority take precedence + format: uint32 + example: 1 + TrafficRule.State: + type: string + description: Contains the traffic rule state. This attribute may be updated + using HTTP PUT method + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + TrafficRule: + required: + - action + - filterType + - priority + - state + - trafficFilter + - trafficRuleId + type: object + properties: + trafficRuleId: + $ref: '#/components/schemas/TrafficRule.Id' + filterType: + $ref: '#/components/schemas/TrafficRule.FilterType' + priority: + $ref: '#/components/schemas/TrafficRule_Priority' + trafficFilter: + type: array + items: + $ref: '#/components/schemas/TrafficFilter' + action: + $ref: '#/components/schemas/TrafficRule.Action' + dstInterface: + $ref: '#/components/schemas/DestinationInterface' + state: + $ref: '#/components/schemas/TrafficRule.State' + description: This type represents the general information of a traffic rule. + example: + action: DROP + trafficRuleId: TrafficRule1 + dstInterface: + interfaceType: TUNNEL + dstIpAddress: 192.0.2.0 + srcMacAddress: 02-00-00-00-00-00 + tunnelInfo: + tunnelSrcAddress: '?' + tunnelType: GTP_U + tunnelDstAddress: '?' + dstMacAddress: null + state: ACTIVE + filterType: FLOW + priority: 1 + trafficFilter: + - srcTunnelPort: + - '?' + - '?' + dstAddress: + - null + - null + srcAddress: + - 192.168.1.1 + - 192.168.1.1 + srcPort: + - "8080" + - "8080" + token: + - '?' + - '?' + tC: 1 + protocol: + - '?' + - '?' + dstTunnelPort: + - null + - null + dSCP: 0 + dstPort: + - null + - null + qCI: 1 + srcTunnelAddress: + - '?' + - '?' + tgtTunnelAddress: + - null + - null + - srcTunnelPort: + - '?' + - '?' + dstAddress: + - null + - null + srcAddress: + - 192.168.1.1 + - 192.168.1.1 + srcPort: + - "8080" + - "8080" + token: + - '?' + - '?' + tC: 1 + protocol: + - '?' + - '?' + dstTunnelPort: + - null + - null + dSCP: 0 + dstPort: + - null + - null + qCI: 1 + srcTunnelAddress: + - '?' + - '?' + tgtTunnelAddress: + - null + - null + TunnelInfo.TunnelDstAddress: + type: string + description: Destination address of the tunnel + example: '?' + TunnelInfo.TunnelSrcAddress: + type: string + description: Source address of the tunnel + example: '?' + TunnelInfo.TunnelType: + type: string + description: This type represents the tunnel information. + example: GTP_U + enum: + - GTP_U + - GRE + TunnelInfo: + required: + - tunnelType + type: object + properties: + tunnelType: + $ref: '#/components/schemas/TunnelInfo.TunnelType' + tunnelDstAddress: + $ref: '#/components/schemas/TunnelInfo.TunnelDstAddress' + tunnelSrcAddress: + $ref: '#/components/schemas/TunnelInfo.TunnelSrcAddress' + description: This type represents the tunnel information. + example: + tunnelSrcAddress: '?' + tunnelType: GTP_U + tunnelDstAddress: '?' + responses: + ApplicationsDnsRules.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/DnsRule' + x-content-type: application/json + examples: + DnsRules: + $ref: '#/components/examples/DnsRules' + links: + getIndividualMeDNSRule: + $ref: '#/components/links/GetIndividualMeDNSRule' + putIndividualMeDNSRule: + $ref: '#/components/links/PutIndividualMeDNSRule' + ApplicationsDnsRule.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRule' + examples: + DnsRule: + $ref: '#/components/examples/DnsRule' + ApplicationsSubscriptions.200: + description: Upon success, a response body containing the list of links to the + requested subscriptions is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList' + links: + getIndividualmecAppSuptApiSubscriptionLinkList: + $ref: '#/components/links/GetIndividualmecAppSuptApiSubscriptionLinkList' + delIndividualmecAppSuptApiSubscriptionLinkList: + $ref: '#/components/links/DelIndividualmecAppSuptApiSubscriptionLinkList' + ApplicationsSubscriptions.201: + description: Entity body in the request contains a subscription to the MEC + service availability notifications that is to be created. + headers: + location: + description: The resource URI of the created resource + style: simple + explode: false + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationNotificationSubscription' + links: + getIndividualmecAppSuptApiSubscription: + $ref: '#/components/links/GetIndividualmecAppSuptApiSubscription' + delIndividualmecAppSuptApiSubscription: + $ref: '#/components/links/DelIndividualmecAppSuptApiSubscription' + ApplicationsSubscription.200: + description: Upon success, a response body containing the requested subscription + is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationNotificationSubscription' + ApplicationsTrafficRules.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/TrafficRule' + x-content-type: application/json + examples: + TrafficRules: + $ref: '#/components/examples/TrafficRules' + links: + getIndividualMeTrafficRule: + $ref: '#/components/links/GetIndividualMeTrafficRule' + putIndividualMeTrafficRule: + $ref: '#/components/links/PutIndividualMeTrafficRule' + ApplicationsTrafficRule.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/TrafficRule' + examples: + TrafficRule: + $ref: '#/components/examples/TrafficRule' + TimingCurrentTime.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/CurrentTime' + TimingCaps.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/TimingCaps' + Error.400: + description: Bad Request. It is used to indicate that incorrect parameters were + passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.401: + description: Unauthorized. It is used when the client did not submit the appropriate + credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.403: + description: 'Forbidden. The operation is not allowed given the current status + of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + Error.404: + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.409: + description: Conflict. The operation cannot be executed currently, due to a + conflict with the state of the resource. Typically, this is because the application instance + resource is in NOT_INSTANTIATED state. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.412: + description: Precondition Failed. It is used when a condition has failed during + conditional requests, e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.429: + description: Too Many Requests. It is used when a rate limiter has triggered. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + parameters: + Path.AppInstanceId: + name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + Path.DnsRuleId: + name: dnsRuleId + in: path + description: Represents a DNS rule. + required: true + style: simple + explode: false + schema: + type: string + Path.SubscriptionId: + name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + Path.TrafficRuleId: + name: trafficRuleId + in: path + description: Represents a traffic rule. + required: true + style: simple + explode: false + schema: + type: string + examples: + DnsRule: + value: + dnsRuleId: DnsRule1 + domainName: www.example.com + ipAddressType: IP_V4 + ipAddress: 146.241.7.3 + ttl: 300 + state: ACTIVE + DnsRules: + value: + - dnsRuleId: DnsRule1 + domainName: www.example.com + ipAddressType: IP_V4 + ipAddress: 146.241.7.3 + ttl: 300 + state: ACTIVE + - dnsRuleId: DnsRule2 + domainName: www.example.com + ipAddressType: IP_V4 + ipAddress: 146.241.7.4 + ttl: 300 + state: INACTIVE + TrafficRule: + value: + trafficRuleId: TrafficRule123 + serName: ExampleService + filterType: FLOW + priority: 1 + trafficFilter: + - srcAddress: + - 192.168.2.0/24 + - 192.168.3.0/24 + dstAddress: + - 192.127.4.100/32 + dstPort: + - "80" + action: FORWARD_DECAPSULATED + dstInterface: + interfaceType: IP + dstIpAddress: 20.1.1.1 + state: ACTIVE + TrafficRules: + value: + - trafficRuleId: TrafficRule123 + serName: ExampleService + filterType: FLOW + priority: 1 + trafficFilter: + - srcAddress: + - 192.168.2.0/24 + - 192.168.3.0/24 + dstAddress: + - 192.127.4.100/32 + dstPort: + - "80" + action: FORWARD_DECAPSULATED + dstInterface: + interfaceType: IP + dstIpAddress: 20.1.1.1 + state: ACTIVE + requestBodies: + ApplicationsConfirmReady: + content: + application/json: + schema: + $ref: '#/components/schemas/AppReadyConfirmation' + ApplicationsConfirmTermination: + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationConfirmation' + ApplicationsDnsRule: + description: The updated state is included in the entity body of the request. + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRule' + required: true + ApplicationsSubscriptions: + description: Entity body in the request contains a subscription to the MEC application + termination notifications that is to be created. + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationNotificationSubscription' + required: true + ApplicationsTrafficRule: + description: One or more updated attributes that are allowed to be changed + content: + application/json: + schema: + $ref: '#/components/schemas/TrafficRule' + required: true + AppTerminationNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationNotification' + required: true + links: + GetIndividualMeDNSRule: + operationId: As_ApplicationsDnsRule_GET + parameters: + dnsRuleId: $response.body#/dnsRuleId + description: The `dnsRuleId` value returned in the response can be used as the + `dnsRuleId` parameter in `GET /applications/{appInstanceId}/dns_rules/{dnsRuleId}` + PutIndividualMeDNSRule: + operationId: As_ApplicationsDnsRule_PUT + parameters: + dnsRuleId: $response.body#/dnsRuleId + description: The `dnsRuleId` value returned in the response can be used as the + `dnsRuleId` parameter in `PUT /applications/{appInstanceId}/dns_rules/{dnsRuleId}` + GetIndividualMeTrafficRule: + operationId: As_ApplicationsTrafficRule_GET + parameters: + trafficRuleId: $response.body#/trafficRuleId + description: The `trafficRuleId` value returned in the response can be used + as the `trafficRuleId` parameter in `GET /applications/{appInstanceId}/traffic_rules/{trafficRuleId}` + PutIndividualMeTrafficRule: + operationId: As_ApplicationsTrafficRule_PUT + parameters: + trafficRuleId: $response.body#/trafficRuleId + description: The `trafficRuleId` value returned in the response can be used + as the `trafficRuleId` parameter in `PUT /applications/{appInstanceId}/traffic_rules/{trafficRuleId}` + GetIndividualmecAppSuptApiSubscription: + operationId: As_ApplicationsSubscription_GET + parameters: + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` + DelIndividualmecAppSuptApiSubscription: + operationId: As_ApplicationsSubscription_DELETE + parameters: + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` + GetIndividualmecAppSuptApiSubscriptionLinkList: + operationId: As_ApplicationsSubscription_GET + parameters: + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` + DelIndividualmecAppSuptApiSubscriptionLinkList: + operationId: As_ApplicationsSubscription_DELETE + parameters: + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` + callbacks: + AppTerminationNotification: + '{$request.body#/callbackReference}': + post: + tags: + - callbacks + description: Represents the information that the MEP notifies the subscribed + application instance about the corresponding application instance termination/stop + operationId: As_AppTerminationNotification_POST + requestBody: + $ref: '#/components/requestBodies/AppTerminationNotification' + responses: + "200": + description: Expected responses from callback consumer, if it accepts + the callback diff --git a/go-packages/meep-app-support-client/api_app_confirm_ready.go b/go-packages/meep-app-support-client/api_app_confirm_ready.go new file mode 100644 index 0000000000000000000000000000000000000000..785067db2aac0e5a68905910912629ab0508cbff --- /dev/null +++ b/go-packages/meep-app-support-client/api_app_confirm_ready.go @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AppConfirmReadyApiService service + +/* +AppConfirmReadyApiService +This method may be used by the MEC application instance to notify the MEC platform that it is up and running. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param optional nil or *ApplicationsConfirmReadyPOSTOpts - Optional Parameters: + * @param "Body" (optional.Interface of AppReadyConfirmation) - + + +*/ + +type ApplicationsConfirmReadyPOSTOpts struct { + Body optional.Interface +} + +func (a *AppConfirmReadyApiService) ApplicationsConfirmReadyPOST(ctx context.Context, appInstanceId string, localVarOptionals *ApplicationsConfirmReadyPOSTOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/confirm_ready" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + 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/problem+json", "text/plain"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + + localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(AppReadyConfirmation) + if !localVarOptionalBodyok { + return nil, reportError("body should be AppReadyConfirmation") + } + localVarPostBody = &localVarOptionalBody + } + 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 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + 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 + } + + if localVarHttpResponse.StatusCode == 409 { + 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 == 429 { + 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 +} diff --git a/go-packages/meep-app-support-client/api_app_confirm_termination.go b/go-packages/meep-app-support-client/api_app_confirm_termination.go new file mode 100644 index 0000000000000000000000000000000000000000..0cc7d398023fe901e5d343a8d48cf3457ddf757c --- /dev/null +++ b/go-packages/meep-app-support-client/api_app_confirm_termination.go @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AppConfirmTerminationApiService service + +/* +AppConfirmTerminationApiService +This method is used to confirm the application level termination of an application instance. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param optional nil or *ApplicationsConfirmTerminationPOSTOpts - Optional Parameters: + * @param "Body" (optional.Interface of AppTerminationConfirmation) - + + +*/ + +type ApplicationsConfirmTerminationPOSTOpts struct { + Body optional.Interface +} + +func (a *AppConfirmTerminationApiService) ApplicationsConfirmTerminationPOST(ctx context.Context, appInstanceId string, localVarOptionals *ApplicationsConfirmTerminationPOSTOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/confirm_termination" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + 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/problem+json", "text/plain"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + + localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(AppTerminationConfirmation) + if !localVarOptionalBodyok { + return nil, reportError("body should be AppTerminationConfirmation") + } + localVarPostBody = &localVarOptionalBody + } + 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 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + 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 + } + + if localVarHttpResponse.StatusCode == 409 { + 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 == 429 { + 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 +} diff --git a/go-packages/meep-app-support-client/api_app_dns_rules.go b/go-packages/meep-app-support-client/api_app_dns_rules.go new file mode 100644 index 0000000000000000000000000000000000000000..fb0833130e2b07c14420647e9b80af030017e18d --- /dev/null +++ b/go-packages/meep-app-support-client/api_app_dns_rules.go @@ -0,0 +1,425 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AppDnsRulesApiService service + +/* +AppDnsRulesApiService +This method retrieves information about a DNS rule associated with a MEC application instance. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param dnsRuleId Represents a DNS rule. + +@return DnsRule +*/ +func (a *AppDnsRulesApiService) ApplicationsDnsRuleGET(ctx context.Context, appInstanceId string, dnsRuleId string) (DnsRule, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DnsRule + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/dns_rules/{dnsRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"dnsRuleId"+"}", fmt.Sprintf("%v", dnsRuleId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DnsRule + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppDnsRulesApiService +This method activates, de-activates or updates a traffic rule. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body The updated state is included in the entity body of the request. + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param dnsRuleId Represents a DNS rule. + +@return DnsRule +*/ +func (a *AppDnsRulesApiService) ApplicationsDnsRulePUT(ctx context.Context, body DnsRule, appInstanceId string, dnsRuleId string) (DnsRule, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DnsRule + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/dns_rules/{dnsRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"dnsRuleId"+"}", fmt.Sprintf("%v", dnsRuleId), -1) + + 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 localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DnsRule + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 412 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppDnsRulesApiService +This method retrieves information about all the DNS rules associated with a MEC application instance. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return []DnsRule +*/ +func (a *AppDnsRulesApiService) ApplicationsDnsRulesGET(ctx context.Context, appInstanceId string) ([]DnsRule, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []DnsRule + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/dns_rules" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []DnsRule + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-app-support-client/api_app_subscriptions.go b/go-packages/meep-app-support-client/api_app_subscriptions.go new file mode 100644 index 0000000000000000000000000000000000000000..f00b463d6781f7936e1889c591e79f85461d2b20 --- /dev/null +++ b/go-packages/meep-app-support-client/api_app_subscriptions.go @@ -0,0 +1,505 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AppSubscriptionsApiService service + +/* +AppSubscriptionsApiService +This method deletes a mecAppSuptApiSubscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param subscriptionId Represents a subscription to the notifications from the MEC platform. + + +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionDELETE(ctx context.Context, appInstanceId string, subscriptionId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/problem+json", "text/plain"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + 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 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + 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 +} + +/* +AppSubscriptionsApiService +The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param subscriptionId Represents a subscription to the notifications from the MEC platform. + +@return AppTerminationNotificationSubscription +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionGET(ctx context.Context, appInstanceId string, subscriptionId string) (AppTerminationNotificationSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AppTerminationNotificationSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v AppTerminationNotificationSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppSubscriptionsApiService +The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return MecAppSuptApiSubscriptionLinkList +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionsGET(ctx context.Context, appInstanceId string) (MecAppSuptApiSubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue MecAppSuptApiSubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v MecAppSuptApiSubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppSubscriptionsApiService +The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Entity body in the request contains a subscription to the MEC application termination notifications that is to be created. + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return AppTerminationNotificationSubscription +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionsPOST(ctx context.Context, body AppTerminationNotificationSubscription, appInstanceId string) (AppTerminationNotificationSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AppTerminationNotificationSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + 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 localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v AppTerminationNotificationSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-app-support-client/api_app_traffic_rules.go b/go-packages/meep-app-support-client/api_app_traffic_rules.go new file mode 100644 index 0000000000000000000000000000000000000000..661334fd8a7a0df3d3601fe78cc1a96ff8e628cb --- /dev/null +++ b/go-packages/meep-app-support-client/api_app_traffic_rules.go @@ -0,0 +1,425 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AppTrafficRulesApiService service + +/* +AppTrafficRulesApiService +This method retrieves information about all the traffic rules associated with a MEC application instance. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param trafficRuleId Represents a traffic rule. + +@return TrafficRule +*/ +func (a *AppTrafficRulesApiService) ApplicationsTrafficRuleGET(ctx context.Context, appInstanceId string, trafficRuleId string) (TrafficRule, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TrafficRule + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"trafficRuleId"+"}", fmt.Sprintf("%v", trafficRuleId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v TrafficRule + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppTrafficRulesApiService +This method retrieves information about all the traffic rules associated with a MEC application instance. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body One or more updated attributes that are allowed to be changed + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param trafficRuleId Represents a traffic rule. + +@return TrafficRule +*/ +func (a *AppTrafficRulesApiService) ApplicationsTrafficRulePUT(ctx context.Context, body TrafficRule, appInstanceId string, trafficRuleId string) (TrafficRule, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TrafficRule + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"trafficRuleId"+"}", fmt.Sprintf("%v", trafficRuleId), -1) + + 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 localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v TrafficRule + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 412 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppTrafficRulesApiService +This method retrieves information about all the traffic rules associated with a MEC application instance. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return []TrafficRule +*/ +func (a *AppTrafficRulesApiService) ApplicationsTrafficRulesGET(ctx context.Context, appInstanceId string) ([]TrafficRule, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []TrafficRule + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/traffic_rules" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []TrafficRule + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-app-support-client/api_timing.go b/go-packages/meep-app-support-client/api_timing.go new file mode 100644 index 0000000000000000000000000000000000000000..e84e9a8292348c7712217ea6c8d56e7d998b086e --- /dev/null +++ b/go-packages/meep-app-support-client/api_timing.go @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type TimingApiService service + +/* +TimingApiService +This method retrieves the information of the platform's timing capabilities which corresponds to the timing capabilities query + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return TimingCaps +*/ +func (a *TimingApiService) TimingCapsGET(ctx context.Context) (TimingCaps, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TimingCaps + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/timing/timing_caps" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v TimingCaps + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +TimingApiService +This method retrieves the information of the platform's current time which corresponds to the get platform time procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return CurrentTime +*/ +func (a *TimingApiService) TimingCurrentTimeGET(ctx context.Context) (CurrentTime, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CurrentTime + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/timing/current_time" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v CurrentTime + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-app-support-client/client.go b/go-packages/meep-app-support-client/client.go new file mode 100644 index 0000000000000000000000000000000000000000..00141f775585629e9b2e29b7203c82616af3329c --- /dev/null +++ b/go-packages/meep-app-support-client/client.go @@ -0,0 +1,494 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") +) + +// APIClient manages communication with the AdvantEDGE MEC Application Support API API v2.1.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AppConfirmReadyApi *AppConfirmReadyApiService + + AppConfirmTerminationApi *AppConfirmTerminationApiService + + AppDnsRulesApi *AppDnsRulesApiService + + AppSubscriptionsApi *AppSubscriptionsApiService + + AppTrafficRulesApi *AppTrafficRulesApiService + + TimingApi *TimingApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AppConfirmReadyApi = (*AppConfirmReadyApiService)(&c.common) + c.AppConfirmTerminationApi = (*AppConfirmTerminationApiService)(&c.common) + c.AppDnsRulesApi = (*AppDnsRulesApiService)(&c.common) + c.AppSubscriptionsApi = (*AppSubscriptionsApiService)(&c.common) + c.AppTrafficRulesApi = (*AppTrafficRulesApiService)(&c.common) + c.TimingApi = (*TimingApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } + + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + } + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericSwaggerError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericSwaggerError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericSwaggerError) Model() interface{} { + return e.model +} diff --git a/go-packages/meep-app-support-client/configuration.go b/go-packages/meep-app-support-client/configuration.go new file mode 100644 index 0000000000000000000000000000000000000000..e825ef4752c8c9e8d0fa0f9bcc5bc8be4f17c817 --- /dev/null +++ b/go-packages/meep-app-support-client/configuration.go @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +type Configuration struct { + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + cfg := &Configuration{ + BasePath: "https://localhost/sandboxname/mec_app_support/v1", + DefaultHeader: make(map[string]string), + UserAgent: "Swagger-Codegen/1.0.0/go", + } + return cfg +} + +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/go-packages/meep-app-support-client/docs/AppConfirmReadyApi.md b/go-packages/meep-app-support-client/docs/AppConfirmReadyApi.md new file mode 100644 index 0000000000000000000000000000000000000000..4710e00dedbdbecd3b2f45855e5d9700ea4c6b1c --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppConfirmReadyApi.md @@ -0,0 +1,46 @@ +# \AppConfirmReadyApi + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplicationsConfirmReadyPOST**](AppConfirmReadyApi.md#ApplicationsConfirmReadyPOST) | **Post** /applications/{appInstanceId}/confirm_ready | + + +# **ApplicationsConfirmReadyPOST** +> ApplicationsConfirmReadyPOST(ctx, appInstanceId, optional) + + +This method may be used by the MEC application instance to notify the MEC platform that it is up and running. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **optional** | ***ApplicationsConfirmReadyPOSTOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ApplicationsConfirmReadyPOSTOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**optional.Interface of AppReadyConfirmation**](AppReadyConfirmation.md)| | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-app-support-client/docs/AppConfirmTerminationApi.md b/go-packages/meep-app-support-client/docs/AppConfirmTerminationApi.md new file mode 100644 index 0000000000000000000000000000000000000000..819754496a7ac6546c80f04b1c223af5b85d8cee --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppConfirmTerminationApi.md @@ -0,0 +1,46 @@ +# \AppConfirmTerminationApi + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplicationsConfirmTerminationPOST**](AppConfirmTerminationApi.md#ApplicationsConfirmTerminationPOST) | **Post** /applications/{appInstanceId}/confirm_termination | + + +# **ApplicationsConfirmTerminationPOST** +> ApplicationsConfirmTerminationPOST(ctx, appInstanceId, optional) + + +This method is used to confirm the application level termination of an application instance. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **optional** | ***ApplicationsConfirmTerminationPOSTOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ApplicationsConfirmTerminationPOSTOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**optional.Interface of AppTerminationConfirmation**](AppTerminationConfirmation.md)| | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-app-support-client/docs/AppDnsRulesApi.md b/go-packages/meep-app-support-client/docs/AppDnsRulesApi.md new file mode 100644 index 0000000000000000000000000000000000000000..f7d46435a433d93109b5f78c56865a700c0521c7 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppDnsRulesApi.md @@ -0,0 +1,98 @@ +# \AppDnsRulesApi + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplicationsDnsRuleGET**](AppDnsRulesApi.md#ApplicationsDnsRuleGET) | **Get** /applications/{appInstanceId}/dns_rules/{dnsRuleId} | +[**ApplicationsDnsRulePUT**](AppDnsRulesApi.md#ApplicationsDnsRulePUT) | **Put** /applications/{appInstanceId}/dns_rules/{dnsRuleId} | +[**ApplicationsDnsRulesGET**](AppDnsRulesApi.md#ApplicationsDnsRulesGET) | **Get** /applications/{appInstanceId}/dns_rules | + + +# **ApplicationsDnsRuleGET** +> DnsRule ApplicationsDnsRuleGET(ctx, appInstanceId, dnsRuleId) + + +This method retrieves information about a DNS rule associated with a MEC application instance. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **dnsRuleId** | **string**| Represents a DNS rule. | + +### Return type + +[**DnsRule**](DnsRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsDnsRulePUT** +> DnsRule ApplicationsDnsRulePUT(ctx, body, appInstanceId, dnsRuleId) + + +This method activates, de-activates or updates a traffic rule. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**DnsRule**](DnsRule.md)| The updated state is included in the entity body of the request. | + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **dnsRuleId** | **string**| Represents a DNS rule. | + +### Return type + +[**DnsRule**](DnsRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsDnsRulesGET** +> []DnsRule ApplicationsDnsRulesGET(ctx, appInstanceId) + + +This method retrieves information about all the DNS rules associated with a MEC application instance. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**[]DnsRule**](DnsRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-app-support-client/docs/AppReadyConfirmation.md b/go-packages/meep-app-support-client/docs/AppReadyConfirmation.md new file mode 100644 index 0000000000000000000000000000000000000000..ab6a7a384a885f38f8e6d6034a93965629f9692f --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppReadyConfirmation.md @@ -0,0 +1,10 @@ +# AppReadyConfirmation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Indication** | [***ReadyIndicationType**](ReadyIndicationType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/AppSubscriptionsApi.md b/go-packages/meep-app-support-client/docs/AppSubscriptionsApi.md new file mode 100644 index 0000000000000000000000000000000000000000..2cc0f1efbce09233a290654647209a3e9660a66d --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppSubscriptionsApi.md @@ -0,0 +1,127 @@ +# \AppSubscriptionsApi + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplicationsSubscriptionDELETE**](AppSubscriptionsApi.md#ApplicationsSubscriptionDELETE) | **Delete** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +[**ApplicationsSubscriptionGET**](AppSubscriptionsApi.md#ApplicationsSubscriptionGET) | **Get** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +[**ApplicationsSubscriptionsGET**](AppSubscriptionsApi.md#ApplicationsSubscriptionsGET) | **Get** /applications/{appInstanceId}/subscriptions | +[**ApplicationsSubscriptionsPOST**](AppSubscriptionsApi.md#ApplicationsSubscriptionsPOST) | **Post** /applications/{appInstanceId}/subscriptions | + + +# **ApplicationsSubscriptionDELETE** +> ApplicationsSubscriptionDELETE(ctx, appInstanceId, subscriptionId) + + +This method deletes a mecAppSuptApiSubscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **subscriptionId** | **string**| Represents a subscription to the notifications from the MEC platform. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsSubscriptionGET** +> AppTerminationNotificationSubscription ApplicationsSubscriptionGET(ctx, appInstanceId, subscriptionId) + + +The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **subscriptionId** | **string**| Represents a subscription to the notifications from the MEC platform. | + +### Return type + +[**AppTerminationNotificationSubscription**](AppTerminationNotificationSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsSubscriptionsGET** +> MecAppSuptApiSubscriptionLinkList ApplicationsSubscriptionsGET(ctx, appInstanceId) + + +The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**MecAppSuptApiSubscriptionLinkList**](MecAppSuptApiSubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsSubscriptionsPOST** +> AppTerminationNotificationSubscription ApplicationsSubscriptionsPOST(ctx, body, appInstanceId) + + +The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**AppTerminationNotificationSubscription**](AppTerminationNotificationSubscription.md)| Entity body in the request contains a subscription to the MEC application termination notifications that is to be created. | + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**AppTerminationNotificationSubscription**](AppTerminationNotificationSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-app-support-client/docs/AppTerminationConfirmation.md b/go-packages/meep-app-support-client/docs/AppTerminationConfirmation.md new file mode 100644 index 0000000000000000000000000000000000000000..fe58da555e2a977800ba9187811ad02ff53d386c --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppTerminationConfirmation.md @@ -0,0 +1,10 @@ +# AppTerminationConfirmation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OperationAction** | [***OperationActionType**](OperationActionType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/AppTerminationNotification.md b/go-packages/meep-app-support-client/docs/AppTerminationNotification.md new file mode 100644 index 0000000000000000000000000000000000000000..ddf82cabee72e519aa6f6611da776789f92d412c --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppTerminationNotification.md @@ -0,0 +1,13 @@ +# AppTerminationNotification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NotificationType** | **string** | | [default to null] +**OperationAction** | [***OperationActionType**](OperationActionType.md) | | [default to null] +**MaxGracefulTimeout** | **int32** | | [default to null] +**Links** | [***AppTerminationNotificationLinks**](AppTerminationNotification.Links.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/AppTerminationNotificationLinks.md b/go-packages/meep-app-support-client/docs/AppTerminationNotificationLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..185439ddcd6803e06f61924ceac281638fc2da8f --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppTerminationNotificationLinks.md @@ -0,0 +1,11 @@ +# AppTerminationNotificationLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subscription** | [***LinkType**](LinkType.md) | | [default to null] +**ConfirmTermination** | [***LinkTypeConfirmTermination**](LinkType.ConfirmTermination.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/AppTerminationNotificationSubscription.md b/go-packages/meep-app-support-client/docs/AppTerminationNotificationSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..c57eb6a118e95a6ed0452162e681c6f5bf840317 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppTerminationNotificationSubscription.md @@ -0,0 +1,13 @@ +# AppTerminationNotificationSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubscriptionType** | **string** | | [default to null] +**CallbackReference** | **string** | | [default to null] +**Links** | [***Self**](Self.md) | | [default to null] +**AppInstanceId** | **string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/AppTrafficRulesApi.md b/go-packages/meep-app-support-client/docs/AppTrafficRulesApi.md new file mode 100644 index 0000000000000000000000000000000000000000..fa362659648ee18ad7a4e7bc305d897d851c2790 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/AppTrafficRulesApi.md @@ -0,0 +1,98 @@ +# \AppTrafficRulesApi + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplicationsTrafficRuleGET**](AppTrafficRulesApi.md#ApplicationsTrafficRuleGET) | **Get** /applications/{appInstanceId}/traffic_rules/{trafficRuleId} | +[**ApplicationsTrafficRulePUT**](AppTrafficRulesApi.md#ApplicationsTrafficRulePUT) | **Put** /applications/{appInstanceId}/traffic_rules/{trafficRuleId} | +[**ApplicationsTrafficRulesGET**](AppTrafficRulesApi.md#ApplicationsTrafficRulesGET) | **Get** /applications/{appInstanceId}/traffic_rules | + + +# **ApplicationsTrafficRuleGET** +> TrafficRule ApplicationsTrafficRuleGET(ctx, appInstanceId, trafficRuleId) + + +This method retrieves information about all the traffic rules associated with a MEC application instance. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **trafficRuleId** | **string**| Represents a traffic rule. | + +### Return type + +[**TrafficRule**](TrafficRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsTrafficRulePUT** +> TrafficRule ApplicationsTrafficRulePUT(ctx, body, appInstanceId, trafficRuleId) + + +This method retrieves information about all the traffic rules associated with a MEC application instance. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**TrafficRule**](TrafficRule.md)| One or more updated attributes that are allowed to be changed | + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **trafficRuleId** | **string**| Represents a traffic rule. | + +### Return type + +[**TrafficRule**](TrafficRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsTrafficRulesGET** +> []TrafficRule ApplicationsTrafficRulesGET(ctx, appInstanceId) + + +This method retrieves information about all the traffic rules associated with a MEC application instance. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**[]TrafficRule**](TrafficRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-app-support-client/docs/CurrentTime.md b/go-packages/meep-app-support-client/docs/CurrentTime.md new file mode 100644 index 0000000000000000000000000000000000000000..e5b1834d43837209ff1fba35cdea1566eceef04e --- /dev/null +++ b/go-packages/meep-app-support-client/docs/CurrentTime.md @@ -0,0 +1,12 @@ +# CurrentTime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Seconds** | **int32** | The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC | [default to null] +**NanoSeconds** | **int32** | The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC | [default to null] +**TimeSourceStatus** | **string** | Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/DestinationInterface.md b/go-packages/meep-app-support-client/docs/DestinationInterface.md new file mode 100644 index 0000000000000000000000000000000000000000..b1bb61600f023d7051396b9bd7bf328f06738fe8 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/DestinationInterface.md @@ -0,0 +1,14 @@ +# DestinationInterface + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InterfaceType** | [***DestinationInterfaceInterfaceType**](DestinationInterface.InterfaceType.md) | | [default to null] +**TunnelInfo** | [***TunnelInfo**](TunnelInfo.md) | | [optional] [default to null] +**SrcMacAddress** | **string** | | [optional] [default to null] +**DstMacAddress** | **string** | | [optional] [default to null] +**DstIpAddress** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/DestinationInterfaceInterfaceType.md b/go-packages/meep-app-support-client/docs/DestinationInterfaceInterfaceType.md new file mode 100644 index 0000000000000000000000000000000000000000..4f7df04c5f966e1ba51306a8529e5d1efdd02115 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/DestinationInterfaceInterfaceType.md @@ -0,0 +1,9 @@ +# DestinationInterfaceInterfaceType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/DnsRule.md b/go-packages/meep-app-support-client/docs/DnsRule.md new file mode 100644 index 0000000000000000000000000000000000000000..27d141571bc03720f682ac9aed9dfd4cb6c9dd30 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/DnsRule.md @@ -0,0 +1,15 @@ +# DnsRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DnsRuleId** | **string** | | [default to null] +**DomainName** | **string** | | [default to null] +**IpAddressType** | [***DnsRuleIpAddressType**](DnsRule.IpAddressType.md) | | [default to null] +**IpAddress** | **string** | | [default to null] +**Ttl** | **int32** | | [optional] [default to null] +**State** | [***DnsRuleState**](DnsRule.State.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/DnsRuleIpAddressType.md b/go-packages/meep-app-support-client/docs/DnsRuleIpAddressType.md new file mode 100644 index 0000000000000000000000000000000000000000..5feda51256c35cd74550d336535c45c00ad42474 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/DnsRuleIpAddressType.md @@ -0,0 +1,9 @@ +# DnsRuleIpAddressType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/DnsRuleState.md b/go-packages/meep-app-support-client/docs/DnsRuleState.md new file mode 100644 index 0000000000000000000000000000000000000000..e3bad22feab0745d870901c8afef8155cbbebf2f --- /dev/null +++ b/go-packages/meep-app-support-client/docs/DnsRuleState.md @@ -0,0 +1,9 @@ +# DnsRuleState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/LinkType.md b/go-packages/meep-app-support-client/docs/LinkType.md new file mode 100644 index 0000000000000000000000000000000000000000..58cd3a581c7f622d6168187d6cd0ccf155071b10 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/LinkType.md @@ -0,0 +1,10 @@ +# LinkType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/LinkTypeConfirmTermination.md b/go-packages/meep-app-support-client/docs/LinkTypeConfirmTermination.md new file mode 100644 index 0000000000000000000000000000000000000000..0564bfdc21082b4c1ebdf96208c7d9987c469bfc --- /dev/null +++ b/go-packages/meep-app-support-client/docs/LinkTypeConfirmTermination.md @@ -0,0 +1,10 @@ +# LinkTypeConfirmTermination + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkList.md b/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkList.md new file mode 100644 index 0000000000000000000000000000000000000000..ed4339005ffffd7dff151b3f8e09acce07fa9218 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkList.md @@ -0,0 +1,10 @@ +# MecAppSuptApiSubscriptionLinkList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [***MecAppSuptApiSubscriptionLinkListLinks**](MecAppSuptApiSubscriptionLinkList.Links.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkListLinks.md b/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkListLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..6df0115d22483186336ea8c45d3533f5e83107ef --- /dev/null +++ b/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkListLinks.md @@ -0,0 +1,11 @@ +# MecAppSuptApiSubscriptionLinkListLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [***LinkType**](LinkType.md) | | [default to null] +**Subscriptions** | [**[]MecAppSuptApiSubscriptionLinkListSubscription**](MecAppSuptApiSubscriptionLinkList.Subscription.md) | The MEC application instance's subscriptions | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkListSubscription.md b/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkListSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..c7845902f53bbbe181390624cc0dc9f7b1c8449b --- /dev/null +++ b/go-packages/meep-app-support-client/docs/MecAppSuptApiSubscriptionLinkListSubscription.md @@ -0,0 +1,11 @@ +# MecAppSuptApiSubscriptionLinkListSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | | [default to null] +**Rel** | **string** | The values shall be set to AppTerminationNotificationSubscription. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/OperationActionType.md b/go-packages/meep-app-support-client/docs/OperationActionType.md new file mode 100644 index 0000000000000000000000000000000000000000..01fbf04d358b94e2fd511b3a59d274604ecdd57c --- /dev/null +++ b/go-packages/meep-app-support-client/docs/OperationActionType.md @@ -0,0 +1,9 @@ +# OperationActionType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/ProblemDetails.md b/go-packages/meep-app-support-client/docs/ProblemDetails.md new file mode 100644 index 0000000000000000000000000000000000000000..45c114639ac45e06f72b49bfa63161b6c7b007a1 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/ProblemDetails.md @@ -0,0 +1,14 @@ +# ProblemDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | | [optional] [default to null] +**Title** | **string** | | [optional] [default to null] +**Status** | **int32** | | [optional] [default to null] +**Detail** | **string** | | [optional] [default to null] +**Instance** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/ReadyIndicationType.md b/go-packages/meep-app-support-client/docs/ReadyIndicationType.md new file mode 100644 index 0000000000000000000000000000000000000000..c354a0c9f074df13a69b247fe80625333dfb08c6 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/ReadyIndicationType.md @@ -0,0 +1,9 @@ +# ReadyIndicationType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/Self.md b/go-packages/meep-app-support-client/docs/Self.md new file mode 100644 index 0000000000000000000000000000000000000000..bfbbd49a461154a08606853107fbe54efec2e6a1 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/Self.md @@ -0,0 +1,10 @@ +# Self + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [***LinkType**](LinkType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TimingApi.md b/go-packages/meep-app-support-client/docs/TimingApi.md new file mode 100644 index 0000000000000000000000000000000000000000..d508e72c32b8e6099f37b0f56b96a2ca4d7b1c31 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingApi.md @@ -0,0 +1,58 @@ +# \TimingApi + +All URIs are relative to *https://localhost/sandboxname/mec_app_support/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TimingCapsGET**](TimingApi.md#TimingCapsGET) | **Get** /timing/timing_caps | +[**TimingCurrentTimeGET**](TimingApi.md#TimingCurrentTimeGET) | **Get** /timing/current_time | + + +# **TimingCapsGET** +> TimingCaps TimingCapsGET(ctx, ) + + +This method retrieves the information of the platform's timing capabilities which corresponds to the timing capabilities query + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**TimingCaps**](TimingCaps.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **TimingCurrentTimeGET** +> CurrentTime TimingCurrentTimeGET(ctx, ) + + +This method retrieves the information of the platform's current time which corresponds to the get platform time procedure + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**CurrentTime**](CurrentTime.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-app-support-client/docs/TimingCaps.md b/go-packages/meep-app-support-client/docs/TimingCaps.md new file mode 100644 index 0000000000000000000000000000000000000000..2bed39c1842b7dd1a1b819ae2d6ecbe8b1f87086 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingCaps.md @@ -0,0 +1,12 @@ +# TimingCaps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TimeStamp** | [***TimingCapsTimeStamp**](TimingCaps.TimeStamp.md) | | [optional] [default to null] +**NtpServers** | [**[]TimingCapsNtpServers**](TimingCaps.NtpServers.md) | Available NTP servers | [optional] [default to null] +**PtpMasters** | [**[]TimingCapsPtpMasters**](TimingCaps_PtpMasters.md) | Available PTP Masters | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TimingCapsNtpServers.md b/go-packages/meep-app-support-client/docs/TimingCapsNtpServers.md new file mode 100644 index 0000000000000000000000000000000000000000..23193b200954c67000732227be723dff749b1b30 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingCapsNtpServers.md @@ -0,0 +1,16 @@ +# TimingCapsNtpServers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NtpServerAddrType** | [***TimingCapsNtpServersNtpServerAddrType**](TimingCaps.NtpServers.NtpServerAddrType.md) | | [default to null] +**NtpServerAddr** | **string** | | [default to null] +**MinPollingInterval** | **int32** | | [default to null] +**MaxPollingInterval** | **int32** | | [default to null] +**LocalPriority** | **int32** | | [default to null] +**AuthenticationOption** | [***TimingCapsNtpServersAuthenticationOption**](TimingCaps.NtpServers.AuthenticationOption.md) | | [default to null] +**AuthenticationKeyNum** | **int32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TimingCapsNtpServersAuthenticationOption.md b/go-packages/meep-app-support-client/docs/TimingCapsNtpServersAuthenticationOption.md new file mode 100644 index 0000000000000000000000000000000000000000..e1616dd0332e3d461a5f63fb4331faf18348a1c6 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingCapsNtpServersAuthenticationOption.md @@ -0,0 +1,9 @@ +# TimingCapsNtpServersAuthenticationOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TimingCapsNtpServersNtpServerAddrType.md b/go-packages/meep-app-support-client/docs/TimingCapsNtpServersNtpServerAddrType.md new file mode 100644 index 0000000000000000000000000000000000000000..09d84767b37d412740f5c9faa908155c041ebdbb --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingCapsNtpServersNtpServerAddrType.md @@ -0,0 +1,9 @@ +# TimingCapsNtpServersNtpServerAddrType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TimingCapsPtpMasters.md b/go-packages/meep-app-support-client/docs/TimingCapsPtpMasters.md new file mode 100644 index 0000000000000000000000000000000000000000..a88fffc5a2f7f975c40382bf23e95084cf8d29bb --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingCapsPtpMasters.md @@ -0,0 +1,12 @@ +# TimingCapsPtpMasters + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PtpMasterIpAddress** | **string** | | [default to null] +**PtpMasterLocalPriority** | **int32** | | [default to null] +**DelayReqMaxRate** | **int32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TimingCapsTimeStamp.md b/go-packages/meep-app-support-client/docs/TimingCapsTimeStamp.md new file mode 100644 index 0000000000000000000000000000000000000000..8853c448e6ae28fd463db0f6ff9730b595840db9 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TimingCapsTimeStamp.md @@ -0,0 +1,11 @@ +# TimingCapsTimeStamp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Seconds** | **int32** | The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC | [default to null] +**NanoSeconds** | **int32** | The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TrafficFilter.md b/go-packages/meep-app-support-client/docs/TrafficFilter.md new file mode 100644 index 0000000000000000000000000000000000000000..e38e6a16ddaa2d95319912da9cbaa3891efa42dd --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TrafficFilter.md @@ -0,0 +1,22 @@ +# TrafficFilter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SrcAddress** | **[]string** | An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. | [optional] [default to null] +**DstAddress** | **[]string** | An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. | [optional] [default to null] +**SrcPort** | **[]string** | A port or a range of ports | [optional] [default to null] +**DstPort** | **[]string** | A port or a range of ports | [optional] [default to null] +**Protocol** | **[]string** | Specify the protocol of the traffic filter | [optional] [default to null] +**Token** | **[]string** | Used for token based traffic rule | [optional] [default to null] +**SrcTunnelAddress** | **[]string** | Used for GTP tunnel based traffic rule | [optional] [default to null] +**TgtTunnelAddress** | **[]string** | Used for GTP tunnel based traffic rule | [optional] [default to null] +**SrcTunnelPort** | **[]string** | Used for GTP tunnel based traffic rule | [optional] [default to null] +**DstTunnelPort** | **[]string** | Used for GTP tunnel based traffic rule | [optional] [default to null] +**QCI** | **int32** | | [optional] [default to null] +**DSCP** | **int32** | | [optional] [default to null] +**TC** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TrafficRule.md b/go-packages/meep-app-support-client/docs/TrafficRule.md new file mode 100644 index 0000000000000000000000000000000000000000..398b33f04d16672660aa0b1eb1fee30c273234eb --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TrafficRule.md @@ -0,0 +1,16 @@ +# TrafficRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TrafficRuleId** | **string** | | [default to null] +**FilterType** | [***TrafficRuleFilterType**](TrafficRule.FilterType.md) | | [default to null] +**Priority** | **int32** | | [default to null] +**TrafficFilter** | [**[]TrafficFilter**](TrafficFilter.md) | | [default to null] +**Action** | [***TrafficRuleAction**](TrafficRule.Action.md) | | [default to null] +**DstInterface** | [***DestinationInterface**](DestinationInterface.md) | | [optional] [default to null] +**State** | [***TrafficRuleState**](TrafficRule.State.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TrafficRuleAction.md b/go-packages/meep-app-support-client/docs/TrafficRuleAction.md new file mode 100644 index 0000000000000000000000000000000000000000..8f51ae09b2b782e5ca5d2dc7252305a75fa70f0c --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TrafficRuleAction.md @@ -0,0 +1,9 @@ +# TrafficRuleAction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TrafficRuleFilterType.md b/go-packages/meep-app-support-client/docs/TrafficRuleFilterType.md new file mode 100644 index 0000000000000000000000000000000000000000..7010801a476ee3a7a62d97754b0b6175d15b73df --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TrafficRuleFilterType.md @@ -0,0 +1,9 @@ +# TrafficRuleFilterType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TrafficRuleState.md b/go-packages/meep-app-support-client/docs/TrafficRuleState.md new file mode 100644 index 0000000000000000000000000000000000000000..1a5c849ba642a374711da79b45d29d7a63b17489 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TrafficRuleState.md @@ -0,0 +1,9 @@ +# TrafficRuleState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TunnelInfo.md b/go-packages/meep-app-support-client/docs/TunnelInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..b02d1272e63e8e57a01649843e54dffb841eb852 --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TunnelInfo.md @@ -0,0 +1,12 @@ +# TunnelInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TunnelType** | [***TunnelInfoTunnelType**](TunnelInfo.TunnelType.md) | | [default to null] +**TunnelDstAddress** | **string** | | [optional] [default to null] +**TunnelSrcAddress** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/docs/TunnelInfoTunnelType.md b/go-packages/meep-app-support-client/docs/TunnelInfoTunnelType.md new file mode 100644 index 0000000000000000000000000000000000000000..487fda5c2891ad5bfabfc7fd20d8e814e60a281b --- /dev/null +++ b/go-packages/meep-app-support-client/docs/TunnelInfoTunnelType.md @@ -0,0 +1,9 @@ +# TunnelInfoTunnelType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-app-support-client/git_push.sh b/go-packages/meep-app-support-client/git_push.sh new file mode 100644 index 0000000000000000000000000000000000000000..ae01b182ae9eb047d0999a496b060e62d7b01e5c --- /dev/null +++ b/go-packages/meep-app-support-client/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/go-packages/meep-app-support-client/model_app_ready_confirmation.go b/go-packages/meep-app-support-client/model_app_ready_confirmation.go new file mode 100644 index 0000000000000000000000000000000000000000..bfc65227bbcc79fa7973eff7a209c00534c9195b --- /dev/null +++ b/go-packages/meep-app-support-client/model_app_ready_confirmation.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running. +type AppReadyConfirmation struct { + Indication *ReadyIndicationType `json:"indication"` +} diff --git a/go-packages/meep-app-support-client/model_app_termination_confirmation.go b/go-packages/meep-app-support-client/model_app_termination_confirmation.go new file mode 100644 index 0000000000000000000000000000000000000000..376400ce58b726bf16777e8b44485749942bed86 --- /dev/null +++ b/go-packages/meep-app-support-client/model_app_termination_confirmation.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the information that the MEC application instance provides to the MEC platform when informing it that the application has completed its application level related terminate/stop actions, e.g. retention of application state in the case of stop. +type AppTerminationConfirmation struct { + OperationAction *OperationActionType `json:"operationAction"` +} diff --git a/go-packages/meep-app-support-client/model_app_termination_notification.go b/go-packages/meep-app-support-client/model_app_termination_notification.go new file mode 100644 index 0000000000000000000000000000000000000000..419c5f70273b7144fb2d0bc668effa9522600594 --- /dev/null +++ b/go-packages/meep-app-support-client/model_app_termination_notification.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop. +type AppTerminationNotification struct { + NotificationType string `json:"notificationType"` + OperationAction *OperationActionType `json:"operationAction"` + MaxGracefulTimeout int32 `json:"maxGracefulTimeout"` + Links *AppTerminationNotificationLinks `json:"_links"` +} diff --git a/go-packages/meep-app-support-client/model_app_termination_notification_links.go b/go-packages/meep-app-support-client/model_app_termination_notification_links.go new file mode 100644 index 0000000000000000000000000000000000000000..ebf4c1736f2393856b96118565f69763e66bb39b --- /dev/null +++ b/go-packages/meep-app-support-client/model_app_termination_notification_links.go @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Object containing hyperlinks related to the resource. +type AppTerminationNotificationLinks struct { + Subscription *LinkType `json:"subscription"` + ConfirmTermination *LinkTypeConfirmTermination `json:"confirmTermination,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_app_termination_notification_subscription.go b/go-packages/meep-app-support-client/model_app_termination_notification_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..2baa07211881941e79210d7b6fa2d5f1d60e0b66 --- /dev/null +++ b/go-packages/meep-app-support-client/model_app_termination_notification_subscription.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop. +type AppTerminationNotificationSubscription struct { + SubscriptionType string `json:"subscriptionType"` + CallbackReference string `json:"callbackReference"` + Links *Self `json:"_links"` + AppInstanceId string `json:"appInstanceId"` +} diff --git a/go-packages/meep-app-support-client/model_current_time.go b/go-packages/meep-app-support-client/model_current_time.go new file mode 100644 index 0000000000000000000000000000000000000000..c152acd8e80f70f24b07ca931ea5727d158fc060 --- /dev/null +++ b/go-packages/meep-app-support-client/model_current_time.go @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the information provided by the MEC platform in response to the Get Platform Time Request message. +type CurrentTime struct { + // The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + Seconds int32 `json:"seconds"` + // The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + NanoSeconds int32 `json:"nanoSeconds"` + // Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source + TimeSourceStatus string `json:"timeSourceStatus"` +} diff --git a/go-packages/meep-app-support-client/model_destination_interface.go b/go-packages/meep-app-support-client/model_destination_interface.go new file mode 100644 index 0000000000000000000000000000000000000000..1bcba50fce3b71c087e674c2af60b4554dbaa344 --- /dev/null +++ b/go-packages/meep-app-support-client/model_destination_interface.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the destination interface. If the action is FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, two values shall be provided. If the action is DROP, no value shall be provided. +type DestinationInterface struct { + InterfaceType *DestinationInterfaceInterfaceType `json:"interfaceType"` + TunnelInfo *TunnelInfo `json:"tunnelInfo,omitempty"` + SrcMacAddress string `json:"srcMacAddress,omitempty"` + DstMacAddress string `json:"dstMacAddress,omitempty"` + DstIpAddress string `json:"dstIpAddress,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_destination_interface_interface_type.go b/go-packages/meep-app-support-client/model_destination_interface_interface_type.go new file mode 100644 index 0000000000000000000000000000000000000000..9c7737320a267c0fe7c4c654c524e527b61a379b --- /dev/null +++ b/go-packages/meep-app-support-client/model_destination_interface_interface_type.go @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// DestinationInterfaceInterfaceType : Type of the interface +type DestinationInterfaceInterfaceType string + +// List of DestinationInterface.InterfaceType +const ( + TUNNEL_DestinationInterfaceInterfaceType DestinationInterfaceInterfaceType = "TUNNEL" + MAC_DestinationInterfaceInterfaceType DestinationInterfaceInterfaceType = "MAC" + IP_DestinationInterfaceInterfaceType DestinationInterfaceInterfaceType = "IP" +) diff --git a/go-packages/meep-app-support-client/model_dns_rule.go b/go-packages/meep-app-support-client/model_dns_rule.go new file mode 100644 index 0000000000000000000000000000000000000000..1992520a06670f82b443f11351005609358bdc32 --- /dev/null +++ b/go-packages/meep-app-support-client/model_dns_rule.go @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the general information of a DNS rule. +type DnsRule struct { + DnsRuleId string `json:"dnsRuleId"` + DomainName string `json:"domainName"` + IpAddressType *DnsRuleIpAddressType `json:"ipAddressType"` + IpAddress string `json:"ipAddress"` + Ttl int32 `json:"ttl,omitempty"` + State *DnsRuleState `json:"state"` +} diff --git a/go-packages/meep-app-support-client/model_dns_rule_ip_address_type.go b/go-packages/meep-app-support-client/model_dns_rule_ip_address_type.go new file mode 100644 index 0000000000000000000000000000000000000000..4ea152b85806d51b7033fcf4e7377ff0f6a9c453 --- /dev/null +++ b/go-packages/meep-app-support-client/model_dns_rule_ip_address_type.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// DnsRuleIpAddressType : IP address type +type DnsRuleIpAddressType string + +// List of DnsRule.IpAddressType +const ( + V6_DnsRuleIpAddressType DnsRuleIpAddressType = "IP_V6" + V4_DnsRuleIpAddressType DnsRuleIpAddressType = "IP_V4" +) diff --git a/go-packages/meep-app-support-client/model_dns_rule_state.go b/go-packages/meep-app-support-client/model_dns_rule_state.go new file mode 100644 index 0000000000000000000000000000000000000000..d2d68af3d730a03124605eb3ee2a9a64c19ca2ef --- /dev/null +++ b/go-packages/meep-app-support-client/model_dns_rule_state.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// DnsRuleState : DNS rule state. This attribute may be updated using HTTP PUT method +type DnsRuleState string + +// List of DnsRule.State +const ( + ACTIVE_DnsRuleState DnsRuleState = "ACTIVE" + INACTIVE_DnsRuleState DnsRuleState = "INACTIVE" +) diff --git a/go-packages/meep-app-support-client/model_link_type.go b/go-packages/meep-app-support-client/model_link_type.go new file mode 100644 index 0000000000000000000000000000000000000000..dc17eae5ed742a19876ef72e04db8bdb852cfd04 --- /dev/null +++ b/go-packages/meep-app-support-client/model_link_type.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents a type of link and may be referenced from data structures +type LinkType struct { + Href string `json:"href,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_link_type_confirm_termination.go b/go-packages/meep-app-support-client/model_link_type_confirm_termination.go new file mode 100644 index 0000000000000000000000000000000000000000..bfae8515a1984f9e7294bd3d24dc6f80536e321e --- /dev/null +++ b/go-packages/meep-app-support-client/model_link_type_confirm_termination.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Link to the task resource where to confirm termination in case the application is ready to be terminated before expiry of the timeout. +type LinkTypeConfirmTermination struct { + Href string `json:"href,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list.go b/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list.go new file mode 100644 index 0000000000000000000000000000000000000000..4eaaf798db6595e7576f69af901cc938ad297b35 --- /dev/null +++ b/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents a list of links related to currently existing subscriptions for a MEC application instance. This information is returned when sending a request to receive current subscriptions. +type MecAppSuptApiSubscriptionLinkList struct { + Links *MecAppSuptApiSubscriptionLinkListLinks `json:"_links"` +} diff --git a/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list_links.go b/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list_links.go new file mode 100644 index 0000000000000000000000000000000000000000..0113fb8706b8cf1086450a1bbb8d4dd05291e539 --- /dev/null +++ b/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list_links.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Self-referring URI. +type MecAppSuptApiSubscriptionLinkListLinks struct { + Self *LinkType `json:"self"` + // The MEC application instance's subscriptions + Subscriptions []MecAppSuptApiSubscriptionLinkListSubscription `json:"subscriptions,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list_subscription.go b/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..355b488b25d3f4360b3f89e6351ee5c209205027 --- /dev/null +++ b/go-packages/meep-app-support-client/model_mec_app_supt_api_subscription_link_list_subscription.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// A link to a subscription. +type MecAppSuptApiSubscriptionLinkListSubscription struct { + Href string `json:"href"` + // The values shall be set to AppTerminationNotificationSubscription. + Rel string `json:"rel"` +} diff --git a/go-packages/meep-app-support-client/model_operation_action_type.go b/go-packages/meep-app-support-client/model_operation_action_type.go new file mode 100644 index 0000000000000000000000000000000000000000..2009861ec0bebd47c0df7d331c5b36d5f5ea6974 --- /dev/null +++ b/go-packages/meep-app-support-client/model_operation_action_type.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// OperationActionType : Operation that is being performed on the MEC application instance. +type OperationActionType string + +// List of OperationActionType +const ( + STOPPING_OperationActionType OperationActionType = "STOPPING" + TERMINATING_OperationActionType OperationActionType = "TERMINATING" +) diff --git a/go-packages/meep-app-support-client/model_problem_details.go b/go-packages/meep-app-support-client/model_problem_details.go new file mode 100644 index 0000000000000000000000000000000000000000..aa359beae6e3d11b35e1f7b5ad897bdc487df7aa --- /dev/null +++ b/go-packages/meep-app-support-client/model_problem_details.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +type ProblemDetails struct { + Type_ string `json:"type,omitempty"` + Title string `json:"title,omitempty"` + Status int32 `json:"status,omitempty"` + Detail string `json:"detail,omitempty"` + Instance string `json:"instance,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_ready_indication_type.go b/go-packages/meep-app-support-client/model_ready_indication_type.go new file mode 100644 index 0000000000000000000000000000000000000000..2d11a6f6c0ffafcda31297301af8082f2e6ed517 --- /dev/null +++ b/go-packages/meep-app-support-client/model_ready_indication_type.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// ReadyIndicationType : Indication about the MEC application instance. +type ReadyIndicationType string + +// List of ReadyIndicationType +const ( + READY_ReadyIndicationType ReadyIndicationType = "READY" +) diff --git a/go-packages/meep-app-support-client/model_self.go b/go-packages/meep-app-support-client/model_self.go new file mode 100644 index 0000000000000000000000000000000000000000..70c6716f85d66c2cedb6d7ca3814bdbd50309548 --- /dev/null +++ b/go-packages/meep-app-support-client/model_self.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Self-referring URI. +type Self struct { + Self *LinkType `json:"self"` +} diff --git a/go-packages/meep-app-support-client/model_timing_caps.go b/go-packages/meep-app-support-client/model_timing_caps.go new file mode 100644 index 0000000000000000000000000000000000000000..416fb724cae9f3af48696c1f1a530a1e84e39358 --- /dev/null +++ b/go-packages/meep-app-support-client/model_timing_caps.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the information provided by the MEC platform in response to the Timing capabilities Query message. +type TimingCaps struct { + TimeStamp *TimingCapsTimeStamp `json:"timeStamp,omitempty"` + // Available NTP servers + NtpServers []TimingCapsNtpServers `json:"ntpServers,omitempty"` + // Available PTP Masters + PtpMasters []TimingCapsPtpMasters `json:"ptpMasters,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_timing_caps_ntp_servers.go b/go-packages/meep-app-support-client/model_timing_caps_ntp_servers.go new file mode 100644 index 0000000000000000000000000000000000000000..f8597f7f02bbe861634bcef6a333f64cec34888b --- /dev/null +++ b/go-packages/meep-app-support-client/model_timing_caps_ntp_servers.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// NTP server detail. +type TimingCapsNtpServers struct { + NtpServerAddrType *TimingCapsNtpServersNtpServerAddrType `json:"ntpServerAddrType"` + NtpServerAddr string `json:"ntpServerAddr"` + MinPollingInterval int32 `json:"minPollingInterval"` + MaxPollingInterval int32 `json:"maxPollingInterval"` + LocalPriority int32 `json:"localPriority"` + AuthenticationOption *TimingCapsNtpServersAuthenticationOption `json:"authenticationOption"` + AuthenticationKeyNum int32 `json:"authenticationKeyNum"` +} diff --git a/go-packages/meep-app-support-client/model_timing_caps_ntp_servers_authentication_option.go b/go-packages/meep-app-support-client/model_timing_caps_ntp_servers_authentication_option.go new file mode 100644 index 0000000000000000000000000000000000000000..249dd5441968e50dea8ed68c64fac8cf2cf2b830 --- /dev/null +++ b/go-packages/meep-app-support-client/model_timing_caps_ntp_servers_authentication_option.go @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TimingCapsNtpServersAuthenticationOption : NTP authentication option +type TimingCapsNtpServersAuthenticationOption string + +// List of TimingCaps.NtpServers.AuthenticationOption +const ( + NONE_TimingCapsNtpServersAuthenticationOption TimingCapsNtpServersAuthenticationOption = "NONE" + SYMMETRIC_KEY_TimingCapsNtpServersAuthenticationOption TimingCapsNtpServersAuthenticationOption = "SYMMETRIC_KEY" + AUTO_KEY_TimingCapsNtpServersAuthenticationOption TimingCapsNtpServersAuthenticationOption = "AUTO_KEY" +) diff --git a/go-packages/meep-app-support-client/model_timing_caps_ntp_servers_ntp_server_addr_type.go b/go-packages/meep-app-support-client/model_timing_caps_ntp_servers_ntp_server_addr_type.go new file mode 100644 index 0000000000000000000000000000000000000000..8ba95dae081803171877c8ef02b2fb297126300a --- /dev/null +++ b/go-packages/meep-app-support-client/model_timing_caps_ntp_servers_ntp_server_addr_type.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TimingCapsNtpServersNtpServerAddrType : Address type of NTP server +type TimingCapsNtpServersNtpServerAddrType string + +// List of TimingCaps.NtpServers.NtpServerAddrType +const ( + IP_ADDRESS_TimingCapsNtpServersNtpServerAddrType TimingCapsNtpServersNtpServerAddrType = "IP_ADDRESS" + DNS_NAME_TimingCapsNtpServersNtpServerAddrType TimingCapsNtpServersNtpServerAddrType = "DNS_NAME" +) diff --git a/go-packages/meep-app-support-client/model_timing_caps_ptp_masters.go b/go-packages/meep-app-support-client/model_timing_caps_ptp_masters.go new file mode 100644 index 0000000000000000000000000000000000000000..92541e49daf13344685112415d4d8da9bea8170a --- /dev/null +++ b/go-packages/meep-app-support-client/model_timing_caps_ptp_masters.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// NTP server detail. +type TimingCapsPtpMasters struct { + PtpMasterIpAddress string `json:"ptpMasterIpAddress"` + PtpMasterLocalPriority int32 `json:"ptpMasterLocalPriority"` + DelayReqMaxRate int32 `json:"delayReqMaxRate"` +} diff --git a/go-packages/meep-app-support-client/model_timing_caps_time_stamp.go b/go-packages/meep-app-support-client/model_timing_caps_time_stamp.go new file mode 100644 index 0000000000000000000000000000000000000000..586f48140778d203ba70601bf5311a8e4e63c6c9 --- /dev/null +++ b/go-packages/meep-app-support-client/model_timing_caps_time_stamp.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// time +type TimingCapsTimeStamp struct { + // The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + Seconds int32 `json:"seconds"` + // The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + NanoSeconds int32 `json:"nanoSeconds"` +} diff --git a/go-packages/meep-app-support-client/model_traffic_filter.go b/go-packages/meep-app-support-client/model_traffic_filter.go new file mode 100644 index 0000000000000000000000000000000000000000..c4a56c3441beed85755b6bfce1d68965d4260ed7 --- /dev/null +++ b/go-packages/meep-app-support-client/model_traffic_filter.go @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the traffic filter. +type TrafficFilter struct { + // An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. + SrcAddress []string `json:"srcAddress,omitempty"` + // An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. + DstAddress []string `json:"dstAddress,omitempty"` + // A port or a range of ports + SrcPort []string `json:"srcPort,omitempty"` + // A port or a range of ports + DstPort []string `json:"dstPort,omitempty"` + // Specify the protocol of the traffic filter + Protocol []string `json:"protocol,omitempty"` + // Used for token based traffic rule + Token []string `json:"token,omitempty"` + // Used for GTP tunnel based traffic rule + SrcTunnelAddress []string `json:"srcTunnelAddress,omitempty"` + // Used for GTP tunnel based traffic rule + TgtTunnelAddress []string `json:"tgtTunnelAddress,omitempty"` + // Used for GTP tunnel based traffic rule + SrcTunnelPort []string `json:"srcTunnelPort,omitempty"` + // Used for GTP tunnel based traffic rule + DstTunnelPort []string `json:"dstTunnelPort,omitempty"` + QCI int32 `json:"qCI,omitempty"` + DSCP int32 `json:"dSCP,omitempty"` + TC int32 `json:"tC,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_traffic_rule.go b/go-packages/meep-app-support-client/model_traffic_rule.go new file mode 100644 index 0000000000000000000000000000000000000000..474914b395336c7ff79931de458cb9986bebdb3f --- /dev/null +++ b/go-packages/meep-app-support-client/model_traffic_rule.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the general information of a traffic rule. +type TrafficRule struct { + TrafficRuleId string `json:"trafficRuleId"` + FilterType *TrafficRuleFilterType `json:"filterType"` + Priority int32 `json:"priority"` + TrafficFilter []TrafficFilter `json:"trafficFilter"` + Action *TrafficRuleAction `json:"action"` + DstInterface *DestinationInterface `json:"dstInterface,omitempty"` + State *TrafficRuleState `json:"state"` +} diff --git a/go-packages/meep-app-support-client/model_traffic_rule_action.go b/go-packages/meep-app-support-client/model_traffic_rule_action.go new file mode 100644 index 0000000000000000000000000000000000000000..48a48d8cac0a35e7bc00501dcd71d790893ca7cc --- /dev/null +++ b/go-packages/meep-app-support-client/model_traffic_rule_action.go @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TrafficRuleAction : The action of the MEC host data plane when a packet matches the trafficFilter +type TrafficRuleAction string + +// List of TrafficRule.Action +const ( + DROP_TrafficRuleAction TrafficRuleAction = "DROP" + FORWARD_DECAPSULATED_TrafficRuleAction TrafficRuleAction = "FORWARD_DECAPSULATED" + FORWARD_ENCAPSULATED_TrafficRuleAction TrafficRuleAction = "FORWARD_ENCAPSULATED" + PASSTHROUGH_TrafficRuleAction TrafficRuleAction = "PASSTHROUGH" + DUPLICATE_DECAPSULATED_TrafficRuleAction TrafficRuleAction = "DUPLICATE_DECAPSULATED" + DUPLICATE_ENCAPSULATED_TrafficRuleAction TrafficRuleAction = "DUPLICATE_ENCAPSULATED" +) diff --git a/go-packages/meep-app-support-client/model_traffic_rule_filter_type.go b/go-packages/meep-app-support-client/model_traffic_rule_filter_type.go new file mode 100644 index 0000000000000000000000000000000000000000..1640d7dad73e4d5fce904b78793fe0f7fd2789a9 --- /dev/null +++ b/go-packages/meep-app-support-client/model_traffic_rule_filter_type.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TrafficRuleFilterType : Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context +type TrafficRuleFilterType string + +// List of TrafficRule.FilterType +const ( + FLOW_TrafficRuleFilterType TrafficRuleFilterType = "FLOW" + PACKET_TrafficRuleFilterType TrafficRuleFilterType = "PACKET" +) diff --git a/go-packages/meep-app-support-client/model_traffic_rule_state.go b/go-packages/meep-app-support-client/model_traffic_rule_state.go new file mode 100644 index 0000000000000000000000000000000000000000..9c82879c85d5fc0ee6c9d37e1cf85504f6de2932 --- /dev/null +++ b/go-packages/meep-app-support-client/model_traffic_rule_state.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TrafficRuleState : Contains the traffic rule state. This attribute may be updated using HTTP PUT method +type TrafficRuleState string + +// List of TrafficRule.State +const ( + ACTIVE_TrafficRuleState TrafficRuleState = "ACTIVE" + INACTIVE_TrafficRuleState TrafficRuleState = "INACTIVE" +) diff --git a/go-packages/meep-app-support-client/model_tunnel_info.go b/go-packages/meep-app-support-client/model_tunnel_info.go new file mode 100644 index 0000000000000000000000000000000000000000..c565886834e3009b109d45a13dc3e65252732192 --- /dev/null +++ b/go-packages/meep-app-support-client/model_tunnel_info.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the tunnel information. +type TunnelInfo struct { + TunnelType *TunnelInfoTunnelType `json:"tunnelType"` + TunnelDstAddress string `json:"tunnelDstAddress,omitempty"` + TunnelSrcAddress string `json:"tunnelSrcAddress,omitempty"` +} diff --git a/go-packages/meep-app-support-client/model_tunnel_info_tunnel_type.go b/go-packages/meep-app-support-client/model_tunnel_info_tunnel_type.go new file mode 100644 index 0000000000000000000000000000000000000000..677c1e0ec1bcfac8d83a4cf92936f57572a7290a --- /dev/null +++ b/go-packages/meep-app-support-client/model_tunnel_info_tunnel_type.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TunnelInfoTunnelType : This type represents the tunnel information. +type TunnelInfoTunnelType string + +// List of TunnelInfo.TunnelType +const ( + GTP_U_TunnelInfoTunnelType TunnelInfoTunnelType = "GTP_U" + GRE_TunnelInfoTunnelType TunnelInfoTunnelType = "GRE" +) diff --git a/go-packages/meep-app-support-client/response.go b/go-packages/meep-app-support-client/response.go new file mode 100644 index 0000000000000000000000000000000000000000..bfb780c6c84c92122de238ec7cfbff59a1c0a8ba --- /dev/null +++ b/go-packages/meep-app-support-client/response.go @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Application Support API + * + * The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "net/http" +) + +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the swagger operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/go-packages/meep-service-mgmt-client/README.md b/go-packages/meep-service-mgmt-client/README.md new file mode 100644 index 0000000000000000000000000000000000000000..883db9baf7f7a0051a2049fdd47b6e898283b184 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/README.md @@ -0,0 +1,79 @@ +# Go API client for client + +The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + +## 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.1.1 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./client" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost/sandboxname/mec_service_mgmt/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AppServicesApi* | [**AppServicesGET**](docs/AppServicesApi.md#appservicesget) | **Get** /applications/{appInstanceId}/services | +*AppServicesApi* | [**AppServicesPOST**](docs/AppServicesApi.md#appservicespost) | **Post** /applications/{appInstanceId}/services | +*AppServicesApi* | [**AppServicesServiceIdDELETE**](docs/AppServicesApi.md#appservicesserviceiddelete) | **Delete** /applications/{appInstanceId}/services/{serviceId} | +*AppServicesApi* | [**AppServicesServiceIdGET**](docs/AppServicesApi.md#appservicesserviceidget) | **Get** /applications/{appInstanceId}/services/{serviceId} | +*AppServicesApi* | [**AppServicesServiceIdPUT**](docs/AppServicesApi.md#appservicesserviceidput) | **Put** /applications/{appInstanceId}/services/{serviceId} | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionDELETE**](docs/AppSubscriptionsApi.md#applicationssubscriptiondelete) | **Delete** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionGET**](docs/AppSubscriptionsApi.md#applicationssubscriptionget) | **Get** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionsGET**](docs/AppSubscriptionsApi.md#applicationssubscriptionsget) | **Get** /applications/{appInstanceId}/subscriptions | +*AppSubscriptionsApi* | [**ApplicationsSubscriptionsPOST**](docs/AppSubscriptionsApi.md#applicationssubscriptionspost) | **Post** /applications/{appInstanceId}/subscriptions | +*ServicesApi* | [**ServicesGET**](docs/ServicesApi.md#servicesget) | **Get** /services | +*ServicesApi* | [**ServicesServiceIdGET**](docs/ServicesApi.md#servicesserviceidget) | **Get** /services/{serviceId} | +*TransportsApi* | [**TransportsGET**](docs/TransportsApi.md#transportsget) | **Get** /transports | + + +## Documentation For Models + + - [CategoryRef](docs/CategoryRef.md) + - [EndPointInfoAddress](docs/EndPointInfoAddress.md) + - [EndPointInfoAddresses](docs/EndPointInfoAddresses.md) + - [EndPointInfoAlternative](docs/EndPointInfoAlternative.md) + - [EndPointInfoUris](docs/EndPointInfoUris.md) + - [LinkType](docs/LinkType.md) + - [LocalityType](docs/LocalityType.md) + - [MecServiceMgmtApiSubscriptionLinkList](docs/MecServiceMgmtApiSubscriptionLinkList.md) + - [MecServiceMgmtApiSubscriptionLinkListLinks](docs/MecServiceMgmtApiSubscriptionLinkListLinks.md) + - [MecServiceMgmtApiSubscriptionLinkListSubscription](docs/MecServiceMgmtApiSubscriptionLinkListSubscription.md) + - [OneOfServiceInfoPost](docs/OneOfServiceInfoPost.md) + - [OneOfTransportInfoEndpoint](docs/OneOfTransportInfoEndpoint.md) + - [ProblemDetails](docs/ProblemDetails.md) + - [SecurityInfo](docs/SecurityInfo.md) + - [SecurityInfoOAuth2Info](docs/SecurityInfoOAuth2Info.md) + - [SecurityInfoOAuth2InfoGrantType](docs/SecurityInfoOAuth2InfoGrantType.md) + - [Self](docs/Self.md) + - [SerAvailabilityNotificationSubscription](docs/SerAvailabilityNotificationSubscription.md) + - [SerAvailabilityNotificationSubscriptionFilteringCriteria](docs/SerAvailabilityNotificationSubscriptionFilteringCriteria.md) + - [SerializerType](docs/SerializerType.md) + - [ServiceAvailabilityNotification](docs/ServiceAvailabilityNotification.md) + - [ServiceAvailabilityNotificationChangeType](docs/ServiceAvailabilityNotificationChangeType.md) + - [ServiceAvailabilityNotificationServiceReferences](docs/ServiceAvailabilityNotificationServiceReferences.md) + - [ServiceInfo](docs/ServiceInfo.md) + - [ServiceInfoPost](docs/ServiceInfoPost.md) + - [ServiceState](docs/ServiceState.md) + - [Subscription](docs/Subscription.md) + - [TransportInfo](docs/TransportInfo.md) + - [TransportInfoImplSpecificInfo](docs/TransportInfoImplSpecificInfo.md) + - [TransportType](docs/TransportType.md) + + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + +cti_support@etsi.org + diff --git a/go-packages/meep-service-mgmt-client/api/swagger.yaml b/go-packages/meep-service-mgmt-client/api/swagger.yaml new file mode 100644 index 0000000000000000000000000000000000000000..246b564438da943f14f0ca2769c71ca65059efeb --- /dev/null +++ b/go-packages/meep-service-mgmt-client/api/swagger.yaml @@ -0,0 +1,2035 @@ +openapi: 3.0.2 +info: + title: AdvantEDGE MEC Service Management API + description: The ETSI MEC ISG MEC011 MEC Service Management API described using + OpenAPI + contact: + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 2.1.1 +externalDocs: + description: ETSI GS MEC011 Application Enablement API, V2.1.1 + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf +servers: +- url: https://localhost/sandboxname/mec_service_mgmt/v1 +tags: +- name: appSubscriptions +- name: appServices +- name: services +- name: transports +- name: callbacks +paths: + /services: + get: + tags: + - services + description: This method retrieves information about a list of mecService resources. + This method is typically used in "service availability query" procedure + operationId: Services_GET + parameters: + - name: ser_instance_id + in: query + description: A MEC application instance may use multiple ser_instance_ids + as an input parameter to query the availability of a list of MEC service + instances. Either "ser_instance_id" or "ser_name" or "ser_category_id" or + none of them shall be present. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: ser_name + in: query + description: A MEC application instance may use multiple ser_names as an input + parameter to query the availability of a list of MEC service instances. + Either "ser_instance_id" or "ser_name" or "ser_category_id" or none of them + shall be present. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: ser_category_id + in: query + description: A MEC application instance may use ser_category_id as an input + parameter to query the availability of a list of MEC service instances in + a serCategory. Either "ser_instance_id" or "ser_name" or "ser_category_id" + or none of them shall be present. + required: false + style: form + explode: true + schema: + type: string + - name: consumed_local_only + in: query + description: Indicate whether the service can only be consumed by the MEC applications + located in the same locality (as defined by scopeOfLocality) as this service + instance. + required: false + style: form + explode: true + schema: + type: boolean + - name: is_local + in: query + description: Indicate whether the service is located in the same locality + (as defined by scopeOfLocality) as the consuming MEC application. + required: false + style: form + explode: true + schema: + type: boolean + - name: scope_of_locality + in: query + description: A MEC application instance may use scope_of_locality as an input parameter + to query the availability of a list of MEC service instances with a certain + scope of locality. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ServiceInfo' + x-content-type: application/json + examples: + ServiceInfoList: + $ref: '#/components/examples/ServiceInfoList' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "414": + description: It is used to indicate that the server is refusing to process + the request because the request URI is longer than the server is willing + or able to process. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /services/{serviceId}: + get: + tags: + - services + description: This method retrieves information about a mecService resource. + This method is typically used in "service availability query" procedure + operationId: ServicesServiceId_GET + parameters: + - name: serviceId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/services: + get: + tags: + - appServices + description: This method retrieves information about a list of mecService resources. + This method is typically used in "service availability query" procedure + operationId: AppServices_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: ser_instance_id + in: query + description: A MEC application instance may use multiple ser_instance_ids + as an input parameter to query the availability of a list of MEC service + instances. Either "ser_instance_id" or "ser_name" or "ser_category_id" or + none of them shall be present. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: ser_name + in: query + description: A MEC application instance may use multiple ser_names as an input + parameter to query the availability of a list of MEC service instances. + Either "ser_instance_id" or "ser_name" or "ser_category_id" or none of them + shall be present. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: ser_category_id + in: query + description: A MEC application instance may use ser_category_id as an input + parameter to query the availability of a list of MEC service instances in + a serCategory. Either "ser_instance_id" or "ser_name" or "ser_category_id" + or none of them shall be present. + required: false + style: form + explode: true + schema: + type: string + - name: consumed_local_only + in: query + description: Indicate whether the service can only be consumed by the MEC applications + located in the same locality (as defined by scopeOfLocality) as this service + instance. + required: false + style: form + explode: true + schema: + type: boolean + - name: is_local + in: query + description: Indicate whether the service is located in the same locality + (as defined by scopeOfLocality) as the consuming MEC application. + required: false + style: form + explode: true + schema: + type: boolean + - name: scope_of_locality + in: query + description: A MEC application instance may use scope_of_locality as an input parameter + to query the availability of a list of MEC service instances with a certain + scope of locality. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ServiceInfo' + x-content-type: application/json + examples: + ServiceInfoList: + $ref: '#/components/examples/ServiceInfoList' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "414": + description: It is used to indicate that the server is refusing to process + the request because the request URI is longer than the server is willing + or able to process. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + post: + tags: + - appServices + description: This method is used to create a mecService resource. This method + is typically used in "service availability update and new service registration" + procedure + operationId: AppServices_POST + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/Services.Post' + responses: + "201": + description: Upon success, the HTTP response shall include a Location HTTP + header that contains the resource URI of the created resource. + headers: + location: + description: The resource URI of the created resource + style: simple + explode: false + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/services/{serviceId}: + get: + tags: + - appServices + description: This method retrieves information about a mecService resource. + This method is typically used in "service availability query" procedure + operationId: AppServicesServiceId_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: serviceId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + put: + tags: + - appServices + description: This method updates the information about a mecService resource + operationId: AppServicesServiceId_PUT + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: serviceId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ServicesServiceId' + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "412": + description: Precondition Failed. It is used when a condition has failed + during conditional requests, e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + delete: + tags: + - appServices + description: 'This method deletes a mecService resource. This method is typically + used in the service deregistration procedure. ' + operationId: AppServicesServiceId_DELETE + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: serviceId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /applications/{appInstanceId}/subscriptions: + get: + tags: + - appSubscriptions + description: The GET method may be used to request information about all subscriptions + for this requestor. Upon success, the response contains entity body with all + the subscriptions for the requestor. + operationId: ApplicationsSubscriptions_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Upon success, a response body containing the list of links + to the requested subscriptions is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList' + links: + getIndividualmecSerMgmtApiSubscriptionLinkList: + $ref: '#/components/links/GetIndividualmecSerMgmtApiSubscriptionLinkList' + delIndividualmecSerMgmtApiSubscriptionLinkList: + $ref: '#/components/links/DelIndividualmecSerMgmtApiSubscriptionLinkList' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + post: + tags: + - appSubscriptions + description: The POST method may be used to create a new subscription. One example + use case is to create a new subscription to the MEC service availability notifications. + Upon success, the response contains entity body describing the created subscription. + operationId: ApplicationsSubscriptions_POST + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/ApplicationsSubscriptions' + responses: + "201": + description: Entity body in the request contains a subscription to the MEC + service availability notifications that is to be created. + headers: + location: + description: The resource URI of the created resource + style: simple + explode: false + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + links: + getIndividualmecSerMgmtApiSubscription: + $ref: '#/components/links/GetIndividualmecSerMgmtApiSubscription' + delIndividualmecSerMgmtApiSubscription: + $ref: '#/components/links/DelIndividualmecSerMgmtApiSubscription' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + callbacks: + serviceAvailabilityNotification: + $ref: '#/components/callbacks/ServiceAvailabilityNotification' + /applications/{appInstanceId}/subscriptions/{subscriptionId}: + get: + tags: + - appSubscriptions + description: The GET method requests information about a subscription for this + requestor. Upon success, the response contains entity body with the subscription + for the requestor. + operationId: ApplicationsSubscription_GET + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Upon success, a response body containing the requested subscription + is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + delete: + tags: + - appSubscriptions + description: This method deletes a mecSrvMgmtSubscription. This method is typically + used in "Unsubscribing from service availability event notifications" procedure. + operationId: ApplicationsSubscription_DELETE + parameters: + - name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + /transports: + get: + tags: + - transports + description: This method retrieves information about a list of available transports. + This method is typically used by a service-producing application to discover + transports provided by the MEC platform in the "transport information query" + procedure + operationId: Transports_GET + responses: + "200": + description: It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/TransportInfo' + x-content-type: application/json + links: + getTransportInfo: + $ref: '#/components/links/GetTransportInfo' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + "403": + description: 'Forbidden. The operation is not allowed given the current + status of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' +components: + schemas: + Empty: + description: Empty schema + CategoryRef.Href: + type: string + description: Reference of the catalogue + format: uri + example: /example/catalogue1 + CategoryRef.Id: + type: string + description: Unique identifier of the category + example: id12345 + CategoryRef.Name: + type: string + description: Name of the category, example values include RNI, Location & Bandwidth + Management + example: RNI + CategoryRef.Version: + type: string + description: Category version + example: version1 + CategoryRef: + required: + - href + - id + - name + - version + type: object + properties: + href: + $ref: '#/components/schemas/CategoryRef.Href' + id: + $ref: '#/components/schemas/CategoryRef.Id' + name: + $ref: '#/components/schemas/CategoryRef.Name' + version: + $ref: '#/components/schemas/CategoryRef.Version' + description: This type represents the category reference + example: + name: RNI + href: /example/catalogue1 + id: id12345 + version: version1 + CategoryRefs: + minItems: 0 + type: array + description: Categories of services about which to report events. + items: + $ref: '#/components/schemas/CategoryRef' + x-schema-name: CategoryRefs + EndPointInfo.Address.Host: + type: string + description: Host portion of the address + example: 192.0.2.0 + EndPointInfo.Address_Port: + type: integer + description: Port portion of the address + format: uint32 + example: 8080 + EndPointInfo.Address: + required: + - host + - port + type: object + properties: + host: + $ref: '#/components/schemas/EndPointInfo.Address.Host' + port: + $ref: '#/components/schemas/EndPointInfo.Address_Port' + description: A IP address and port pair + EndPointInfo.Addresses: + required: + - addresses + type: object + properties: + addresses: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/EndPointInfo.Address' + description: Entry point information of the service as one or more pairs of + IP address and port + EndPointInfo.Alternative: + required: + - alternative + type: object + properties: + alternative: + type: object + description: Entry point information of the service in a format defined by an + implementation, or in an external specification. + EndPointInfo.Uri: + type: string + description: Entry point information of the service + format: uri + example: /mecSerMgmtApi/service/EntryPoint + EndPointInfo.Uris: + required: + - uris + type: object + properties: + uris: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/EndPointInfo.Uri' + description: Entry point information of the service as string, formatted according + to URI syntax + LinkType: + type: object + properties: + href: + $ref: '#/components/schemas/Href' + description: This type represents a type of link and may be referenced from + data structures + example: + href: /mecSerMgmtApi/example + Href: + type: string + description: URI referring to a resource + format: uri + example: /mecSerMgmtApi/example + MecServiceMgmtApiSubscriptionLinkList.Links: + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + subscriptions: + type: array + description: The MEC application instance's subscriptions + items: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList.Subscription' + description: Self-referring URI. + example: + subscriptions: + - rel: rel + href: null + - rel: rel + href: null + self: + href: /mecSerMgmtApi/example + MecServiceMgmtApiSubscriptionLinkList.Subscription: + required: + - href + - rel + type: object + properties: + href: + $ref: '#/components/schemas/Href' + rel: + type: string + description: The value shall be se to SerAvailabilityNotificationSubscription. + description: A link to a subscription. + example: + rel: rel + href: null + MecServiceMgmtApiSubscriptionLinkList: + required: + - _links + type: object + properties: + _links: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList.Links' + description: This type represents a list of links related to currently existing + subscriptions for a MEC application instance. This information is returned + when sending a request to receive current subscriptions. + example: + _links: + subscriptions: + - rel: rel + href: null + - rel: rel + href: null + self: + href: /mecSerMgmtApi/example + ProblemDetails: + type: object + properties: + type: + $ref: '#/components/schemas/Problem.type' + title: + $ref: '#/components/schemas/Problem.title' + status: + $ref: '#/components/schemas/Problem.status' + detail: + $ref: '#/components/schemas/Problem.detail' + instance: + $ref: '#/components/schemas/Problem.instance' + Problem.detail: + type: string + description: A human-readable explanation specific to this occurrence of the + problem + Problem.instance: + type: string + description: A URI reference that identifies the specific occurrence of the + problem + format: uri + Problem.status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + Problem.title: + type: string + description: A short, human-readable summary of the problem type + Problem.type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies the + problem type + format: uri + SecurityInfo.OAuth2Info.GrantType: + type: string + description: OAuth 2.0 grant type + example: OAUTH2_CLIENT_CREDENTIALS + enum: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_IMPLICIT_GRANT + - OAUTH2_RESOURCE_OWNER + - OAUTH2_CLIENT_CREDENTIALS + SecurityInfo.OAuth2Info.GrantTypes: + maxItems: 4 + minItems: 1 + type: array + description: List of supported OAuth 2.0 grant types. + items: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantType' + x-schema-name: SecurityInfo.OAuth2Info.GrantTypes + SecurityInfo.OAuth2Info.TokenEndpoint: + type: string + description: The token endpoint + format: uri + example: /mecSerMgmtApi/security/TokenEndPoint + SecurityInfo.OAuth2Info: + required: + - grantTypes + - tokenEndpoint + type: object + properties: + grantTypes: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes' + tokenEndpoint: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint' + description: Parameters related to use of OAuth 2.0 + example: + tokenEndpoint: /mecSerMgmtApi/security/TokenEndPoint + grantTypes: + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + SecurityInfo: + type: object + properties: + oAuth2Info: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info' + description: This type represents security information related to a transport + example: + oAuth2Info: + tokenEndpoint: /mecSerMgmtApi/security/TokenEndPoint + grantTypes: + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + Self: + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + description: Self-referring URI. + readOnly: true + example: + self: + href: /mecSerMgmtApi/example + SerAvailabilityNotificationSubscription.CallbackReference: + type: string + description: URI selected by the MEC application instance to receive notifications + on the subscribed MEC service availability information. This shall be included + in both the request and the response. + format: uri + SerAvailabilityNotificationSubscription: + required: + - _links + - callbackReference + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType' + callbackReference: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference' + _links: + $ref: '#/components/schemas/Self' + filteringCriteria: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription.FilteringCriteria' + description: This type represents a subscription to the notifications from the MEC + platform regarding the availability of a MEC service or a list of MEC services. + example: + filteringCriteria: + serNames: + - ExampleService + - ExampleService + serInstanceIds: + - ServiceInstance123 + - ServiceInstance123 + serCategories: + - name: RNI + href: /example/catalogue1 + id: id12345 + version: version1 + - name: RNI + href: /example/catalogue1 + id: id12345 + version: version1 + states: + - ACTIVE + - ACTIVE + isLocal: true + subscriptionType: SerAvailabilityNotificationSubscription + _links: + self: + href: /mecSerMgmtApi/example + callbackReference: http://example.com/aeiou + SerAvailabilityNotificationSubscription.FilteringCriteria: + type: object + not: + required: + - serCategories + - serInstanceIds + - serNames + properties: + serInstanceIds: + $ref: '#/components/schemas/SerInstanceIds' + serNames: + $ref: '#/components/schemas/SerNames' + serCategories: + $ref: '#/components/schemas/CategoryRefs' + states: + $ref: '#/components/schemas/ServiceStates' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' + description: Filtering criteria to match services for which events are requested + to be reported. If absent, matches all services. All child attributes are + combined with the logical "AND" operation. + example: + serNames: + - ExampleService + - ExampleService + serInstanceIds: + - ServiceInstance123 + - ServiceInstance123 + serCategories: + - name: RNI + href: /example/catalogue1 + id: id12345 + version: version1 + - name: RNI + href: /example/catalogue1 + id: id12345 + version: version1 + states: + - ACTIVE + - ACTIVE + isLocal: true + SerAvailabilityNotificationSubscription.SubscriptionType: + type: string + description: Shall be set to SerAvailabilityNotificationSubscription. + example: SerAvailabilityNotificationSubscription + ServiceAvailabilityNotification: + required: + - _links + - notificationType + - serviceReferences + type: object + properties: + notificationType: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType' + serviceReferences: + type: array + items: + $ref: '#/components/schemas/ServiceAvailabilityNotification.ServiceReferences' + _links: + $ref: '#/components/schemas/Subscription' + description: This type represents the service availability information. + ServiceAvailabilityNotification.ServiceReferences: + required: + - changeType + - serInstanceId + - serName + - state + type: object + properties: + link: + $ref: '#/components/schemas/LinkType' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + state: + $ref: '#/components/schemas/ServiceState' + changeType: + $ref: '#/components/schemas/ServiceAvailabilityNotification.ChangeType' + description: List of links to services whose availability has changed. + ServiceAvailabilityNotification.ChangeType: + type: string + description: "Type of the change. Valid values:\n ADDED: The service was newly\ + \ added.\n REMOVED: The service was removed.\n STATE_CHANGED: Only the state\ + \ of the service was changed. \n ATTRIBUTES_CHANGED: At least one attribute\ + \ of the service other than state was changed. The change may or may not include\ + \ changing the state." + enum: + - ADDED + - REMOVED + - STATE_CHANGED + - ATTRIBUTES_CHANGED + SerializerType: + type: string + description: The enumeration represents types of serializers + example: JSON + enum: + - JSON + - XML + - PROTOBUF3 + LocalityType: + type: string + description: The scope of locality as expressed by "consumedLocalOnly" and "isLocal". + If absent, defaults to MEC_HOST + example: MEC_SYSTEM + enum: + - MEC_SYSTEM + - MEC_HOST + - NFVI_POP + - ZONE + - ZONE_GROUP + - NFVI_NODE + ServiceState: + type: string + description: This enumeration defines the possible states of a service. + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + ServiceStates: + minItems: 0 + type: array + description: States of the services about which to report events. If the event + is a state change, this filter represents the state after the change. + items: + $ref: '#/components/schemas/ServiceState' + x-schema-name: ServiceStates + ServiceInfo.SerInstanceId: + type: string + description: Identifier of the service instance assigned by the MEC platform. + readOnly: true + example: ServiceInstance123 + SerInstanceIds: + minItems: 0 + type: array + description: Identifiers of service instances about which to report events. + items: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + x-schema-name: SerInstanceIds + ServiceInfo.SerName: + type: string + description: The name of the service. This is how the service producing MEC + application identifies the service instance it produces. + example: ExampleService + SerNames: + minItems: 0 + type: array + description: Names of services about which to report events. + items: + $ref: '#/components/schemas/ServiceInfo.SerName' + x-schema-name: SerNames + ServiceInfo.TransportId: + type: string + description: Identifier of the platform-provided transport to be used by the + service. Valid identifiers may be obtained using the "Transport information + query" procedure. May be present in POST requests to signal the use of a platform-provided + transport for the service, and shall be absent otherwise. + writeOnly: true + example: Rest1 + ServiceInfo.Version: + type: string + description: Service version + example: ServiceVersion1 + ServiceInfo.ConsumedLocalOnly: + type: boolean + description: Indicate whether the service can only be consumed by the MEC applications + located in the same locality (as defined by scopeOfLocality) as this service + instance. + example: false + ServiceInfo.IsLocal: + type: boolean + description: Indicate whether the service is located in the same locality (as + defined by scopeOfLocality) as the consuming MEC application. + example: true + ServiceInfo.Post: + required: + - serName + - serializer + - state + - version + type: object + properties: + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serCategory: + $ref: '#/components/schemas/CategoryRef' + version: + $ref: '#/components/schemas/ServiceInfo.Version' + state: + $ref: '#/components/schemas/ServiceState' + transportId: + $ref: '#/components/schemas/ServiceInfo.TransportId' + transportInfo: + $ref: '#/components/schemas/TransportInfo' + serializer: + $ref: '#/components/schemas/SerializerType' + scopeOfLocality: + $ref: '#/components/schemas/LocalityType' + consumedLocalOnly: + $ref: '#/components/schemas/ServiceInfo.ConsumedLocalOnly' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' + description: This type represents the general information of a MEC service. + oneOf: + - required: + - transportId + - required: + - transportInfo + ServiceInfo: + required: + - serName + - serializer + - state + - transportInfo + - version + type: object + properties: + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serCategory: + $ref: '#/components/schemas/CategoryRef' + version: + $ref: '#/components/schemas/ServiceInfo.Version' + state: + $ref: '#/components/schemas/ServiceState' + transportInfo: + $ref: '#/components/schemas/TransportInfo' + serializer: + $ref: '#/components/schemas/SerializerType' + scopeOfLocality: + $ref: '#/components/schemas/LocalityType' + consumedLocalOnly: + $ref: '#/components/schemas/ServiceInfo.ConsumedLocalOnly' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' + description: This type represents the general information of a MEC service. + example: + serCategory: + name: RNI + href: /example/catalogue1 + id: id12345 + version: version1 + scopeOfLocality: MEC_SYSTEM + transportInfo: + implSpecificInfo: {} + protocol: HTTP + endpoint: "" + security: + oAuth2Info: + tokenEndpoint: /mecSerMgmtApi/security/TokenEndPoint + grantTypes: + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + name: REST + description: REST API + id: TransId12345 + type: REST_HTTP + version: "2.0" + serializer: JSON + serName: ExampleService + state: ACTIVE + consumedLocalOnly: false + version: ServiceVersion1 + serInstanceId: ServiceInstance123 + isLocal: true + Subscription: + required: + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/LinkType' + description: A link to the related subscription + TransportInfo.Description: + type: string + description: Human-readable description of this transport + example: REST API + TransportInfo.Id: + type: string + description: The identifier of this transport + example: TransId12345 + TransportInfo.ImplSpecificInfo: + type: object + description: Additional implementation specific details of the transport + TransportInfo.Name: + type: string + description: The name of this transport + example: REST + TransportInfo.Protocol: + type: string + description: The name of the protocol used. Shall be set to HTTP for a REST + API. + example: HTTP + TransportInfo.Version: + type: string + description: The version of the protocol used + example: "2.0" + TransportInfo: + required: + - endpoint + - id + - name + - protocol + - security + - type + - version + type: object + properties: + id: + $ref: '#/components/schemas/TransportInfo.Id' + name: + $ref: '#/components/schemas/TransportInfo.Name' + description: + $ref: '#/components/schemas/TransportInfo.Description' + type: + $ref: '#/components/schemas/TransportType' + protocol: + $ref: '#/components/schemas/TransportInfo.Protocol' + version: + $ref: '#/components/schemas/TransportInfo.Version' + endpoint: + type: object + description: This type represents information about a transport endpoint + oneOf: + - $ref: '#/components/schemas/EndPointInfo.Uris' + - $ref: '#/components/schemas/EndPointInfo.Addresses' + - $ref: '#/components/schemas/EndPointInfo.Alternative' + security: + $ref: '#/components/schemas/SecurityInfo' + implSpecificInfo: + $ref: '#/components/schemas/TransportInfo.ImplSpecificInfo' + description: This type represents the general information of a MEC service. + example: + implSpecificInfo: {} + protocol: HTTP + endpoint: "" + security: + oAuth2Info: + tokenEndpoint: /mecSerMgmtApi/security/TokenEndPoint + grantTypes: + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + - OAUTH2_CLIENT_CREDENTIALS + name: REST + description: REST API + id: TransId12345 + type: REST_HTTP + version: "2.0" + TransportType: + type: string + description: The enumeration TransportType represents types of transports + example: REST_HTTP + enum: + - REST_HTTP + - MB_TOPIC_BASED + - MB_ROUTING + - MB_PUBSUB + - RPC + - RPC_STREAMING + - WEBSOCKET + responses: + ApplicationsSubscriptions.200: + description: Upon success, a response body containing the list of links to the + requested subscriptions is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList' + links: + getIndividualmecSerMgmtApiSubscriptionLinkList: + $ref: '#/components/links/GetIndividualmecSerMgmtApiSubscriptionLinkList' + delIndividualmecSerMgmtApiSubscriptionLinkList: + $ref: '#/components/links/DelIndividualmecSerMgmtApiSubscriptionLinkList' + ApplicationsSubscriptions.201: + description: Entity body in the request contains a subscription to the MEC service + availability notifications that is to be created. + headers: + location: + description: The resource URI of the created resource + style: simple + explode: false + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + links: + getIndividualmecSerMgmtApiSubscription: + $ref: '#/components/links/GetIndividualmecSerMgmtApiSubscription' + delIndividualmecSerMgmtApiSubscription: + $ref: '#/components/links/DelIndividualmecSerMgmtApiSubscription' + ApplicationsSubscription.200: + description: Upon success, a response body containing the requested subscription + is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + Services.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ServiceInfo' + x-content-type: application/json + examples: + ServiceInfoList: + $ref: '#/components/examples/ServiceInfoList' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + Services.201: + description: Upon success, the HTTP response shall include a Location HTTP header + that contains the resource URI of the created resource. + headers: + location: + description: The resource URI of the created resource + style: simple + explode: false + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + ServicesServiceId.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + Transports.200: + description: It is used to indicate nonspecific success. The response body contains + a representation of the resource. + content: + application/json: + schema: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/TransportInfo' + x-content-type: application/json + links: + getTransportInfo: + $ref: '#/components/links/GetTransportInfo' + Error.400: + description: Bad Request. It is used to indicate that incorrect parameters were + passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.401: + description: Unauthorized. It is used when the client did not submit the appropriate + credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.403: + description: 'Forbidden. The operation is not allowed given the current status + of the resource. ' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + Error.404: + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.409: + description: Conflict. The operation cannot be executed currently, due to a + conflict with the state of the resource. Typically, this is because the application instance + resource is in NOT_INSTANTIATED state. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.412: + description: Precondition Failed. It is used when a condition has failed during + conditional requests, e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.414: + description: It is used to indicate that the server is refusing to process the + request because the request URI is longer than the server is willing or able + to process. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.429: + description: Too Many Requests. It is used when a rate limiter has triggered. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + parameters: + Path.AppInstanceId: + name: appInstanceId + in: path + description: Represents a MEC application instance. Note that the appInstanceId + is allocated by the MEC platform manager. + required: true + style: simple + explode: false + schema: + type: string + Path.SubscriptionId: + name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + Path.ServiceId: + name: serviceId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + Query.Ser_category_id: + name: ser_category_id + in: query + description: A MEC application instance may use ser_category_id as an input + parameter to query the availability of a list of MEC service instances in + a serCategory. Either "ser_instance_id" or "ser_name" or "ser_category_id" + or none of them shall be present. + required: false + style: form + explode: true + schema: + type: string + Query.Ser_instance_id: + name: ser_instance_id + in: query + description: A MEC application instance may use multiple ser_instance_ids as + an input parameter to query the availability of a list of MEC service instances. + Either "ser_instance_id" or "ser_name" or "ser_category_id" or none of them + shall be present. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + Query.Ser_name: + name: ser_name + in: query + description: A MEC application instance may use multiple ser_names as an input + parameter to query the availability of a list of MEC service instances. Either + "ser_instance_id" or "ser_name" or "ser_category_id" or none of them shall + be present. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + Query.LocalityType: + name: scope_of_locality + in: query + description: A MEC application instance may use scope_of_locality as an input parameter + to query the availability of a list of MEC service instances with a certain + scope of locality. + required: false + style: form + explode: true + schema: + type: string + Query.Is_local: + name: is_local + in: query + description: Indicate whether the service is located in the same locality (as defined + by scopeOfLocality) as the consuming MEC application. + required: false + style: form + explode: true + schema: + type: boolean + Query.Consumed_local_only: + name: consumed_local_only + in: query + description: Indicate whether the service can only be consumed by the MEC applications + located in the same locality (as defined by scopeOfLocality) as this service + instance. + required: false + style: form + explode: true + schema: + type: boolean + examples: + ServiceInfo: + value: + serInstanceId: ServiceInstance123 + serName: ExampleService + serCategory: + href: catItem1 + id: id12345 + name: RNI + version: version1 + version: ServiceVersion1 + state: ACTIVE + transportInfo: + id: TransId12345 + name: REST + description: REST API + type: REST_HTTP + protocol: HTTP + version: "2.0" + endpoint: + uris: + - /mecSerMgmtApi/service/EntryPoint + security: + oAuth2Info: + grantTypes: + - OAUTH2_CLIENT_CREDENTIALS + tokenEndpoint: /mecSerMgmtApi/security/TokenEndPoint + serializer: JSON + ServiceInfoList: + value: + - serInstanceId: ServiceInstance123 + serName: ExampleService + serCategory: + href: catItem1 + id: id12345 + name: RNI + version: version1 + version: ServiceVersion1 + state: ACTIVE + transportInfo: + id: TransId12345 + name: REST + description: REST API + type: REST_HTTP + protocol: HTTP + version: "2.0" + endpoint: + addresses: + - host: 192.0.2.0 + port: 8080 + security: + oAuth2Info: + grantTypes: + - OAUTH2_CLIENT_CREDENTIALS + tokenEndpoint: /mecSerMgmtApi/security/TokenEndPoint + serializer: JSON + requestBodies: + ApplicationsSubscriptions: + description: Entity body in the request contains a subscription to the MEC application + termination notifications that is to be created. + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + required: true + Services: + description: New ServiceInfo with updated "state" is included as entity body + of the request + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + required: true + Services.Post: + description: New ServiceInfo with updated "state" is included as entity body + of the request + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo.Post' + required: true + ServicesServiceId: + description: New ServiceInfo with updated "state" is included as entity body + of the request + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + required: true + ServiceAvailabilityNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAvailabilityNotification' + required: true + links: + GetIndividualmecService: + operationId: Sm_ServicesServiceId_GET + parameters: + serviceId: $response.body#/serviceId + description: The `serviceId` value returned in the response can be used as the + `serviceId` parameter in `GET /services/{serviceId}` + PutIndividualmecService: + operationId: Sm_ServicesServiceId_PUT + parameters: + serviceId: $response.body#/serviceId + description: The `serviceId` value returned in the response can be used as the + `serviceId` parameter in `PUT /services/{serviceId}` + GetTransportInfo: + operationId: Sm_AppServices_POST + parameters: + transportId: $response.body#/0/id + description: The `id` value returned in the response can be used as the `transportId` + parameter in `POST /applications/{appInstanceId}/services`. The first transport + is provided as the link as wildcards are not supported + GetIndividualmecSerMgmtApiSubscription: + operationId: Sm_ApplicationsSubscription_GET + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` + DelIndividualmecSerMgmtApiSubscription: + operationId: Sm_ApplicationsSubscription_DELETE + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` + GetIndividualmecSerMgmtApiSubscriptionLinkList: + operationId: Sm_ApplicationsSubscription_GET + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` + DelIndividualmecSerMgmtApiSubscriptionLinkList: + operationId: Sm_ApplicationsSubscription_DELETE + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId + = href.match(regex)[1];// where "href" is an attribute within the subscription + attribute within the _links attribute + subscriptionId: TBC + description: The `subscriptionId` value returned in the response can be used + as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` + callbacks: + ServiceAvailabilityNotification: + '{$request.body#/callbackReference}': + post: + tags: + - callbacks + description: "'Represents the service availability information that is\ + \ used in the following cases - when the MEC platform announces the newly\ + \ available\n services to the authorized relevant MEC applications (e.g.\ + \ \n the applications that indicate the services as \"optional\" \n or\ + \ \"required\") that are subscribed to the corresponding \n service availability\ + \ notifications\n- when the MEC platform notifies the authorized relevant\ + \ applications that are subscribed to the corresponding service availability\ + \ notifications about the service availability changes.'" + operationId: Sm_ServiceAvailabilityNotification_POST + requestBody: + $ref: '#/components/requestBodies/ServiceAvailabilityNotification' + responses: + "200": + description: Expected responses from callback consumer, if it accepts + the callback diff --git a/go-packages/meep-service-mgmt-client/api_app_services.go b/go-packages/meep-service-mgmt-client/api_app_services.go new file mode 100644 index 0000000000000000000000000000000000000000..84b4956f8003bfaf6489f485f66f2665b792bb2c --- /dev/null +++ b/go-packages/meep-service-mgmt-client/api_app_services.go @@ -0,0 +1,691 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type AppServicesApiService service + +/* +AppServicesApiService +This method retrieves information about a list of mecService resources. This method is typically used in \"service availability query\" procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param optional nil or *AppServicesGETOpts - Optional Parameters: + * @param "SerInstanceId" (optional.Interface of []string) - A MEC application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. + * @param "SerName" (optional.Interface of []string) - A MEC application instance may use multiple ser_names as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. + * @param "SerCategoryId" (optional.String) - A MEC application instance may use ser_category_id as an input parameter to query the availability of a list of MEC service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. + * @param "ConsumedLocalOnly" (optional.Bool) - Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance. + * @param "IsLocal" (optional.Bool) - Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application. + * @param "ScopeOfLocality" (optional.String) - A MEC application instance may use scope_of_locality as an input parameter to query the availability of a list of MEC service instances with a certain scope of locality. + +@return []ServiceInfo +*/ + +type AppServicesGETOpts struct { + SerInstanceId optional.Interface + SerName optional.Interface + SerCategoryId optional.String + ConsumedLocalOnly optional.Bool + IsLocal optional.Bool + ScopeOfLocality optional.String +} + +func (a *AppServicesApiService) AppServicesGET(ctx context.Context, appInstanceId string, localVarOptionals *AppServicesGETOpts) ([]ServiceInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ServiceInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/services" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SerInstanceId.IsSet() { + localVarQueryParams.Add("ser_instance_id", parameterToString(localVarOptionals.SerInstanceId.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.SerName.IsSet() { + localVarQueryParams.Add("ser_name", parameterToString(localVarOptionals.SerName.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.SerCategoryId.IsSet() { + localVarQueryParams.Add("ser_category_id", parameterToString(localVarOptionals.SerCategoryId.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ConsumedLocalOnly.IsSet() { + localVarQueryParams.Add("consumed_local_only", parameterToString(localVarOptionals.ConsumedLocalOnly.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.IsLocal.IsSet() { + localVarQueryParams.Add("is_local", parameterToString(localVarOptionals.IsLocal.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ScopeOfLocality.IsSet() { + localVarQueryParams.Add("scope_of_locality", parameterToString(localVarOptionals.ScopeOfLocality.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ServiceInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 414 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppServicesApiService +This method is used to create a mecService resource. This method is typically used in \"service availability update and new service registration\" procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body New ServiceInfo with updated "state" is included as entity body of the request + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return ServiceInfo +*/ +func (a *AppServicesApiService) AppServicesPOST(ctx context.Context, body ServiceInfoPost, appInstanceId string) (ServiceInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ServiceInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/services" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + 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 localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v ServiceInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppServicesApiService +This method deletes a mecService resource. This method is typically used in the service deregistration procedure. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param serviceId Represents a MEC service instance. + + +*/ +func (a *AppServicesApiService) AppServicesServiceIdDELETE(ctx context.Context, appInstanceId string, serviceId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/services/{serviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceId"+"}", fmt.Sprintf("%v", serviceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/problem+json", "text/plain"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + 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 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + 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 +} + +/* +AppServicesApiService +This method retrieves information about a mecService resource. This method is typically used in \"service availability query\" procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param serviceId Represents a MEC service instance. + +@return ServiceInfo +*/ +func (a *AppServicesApiService) AppServicesServiceIdGET(ctx context.Context, appInstanceId string, serviceId string) (ServiceInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ServiceInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/services/{serviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceId"+"}", fmt.Sprintf("%v", serviceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ServiceInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppServicesApiService +This method updates the information about a mecService resource + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body New ServiceInfo with updated "state" is included as entity body of the request + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param serviceId Represents a MEC service instance. + +@return ServiceInfo +*/ +func (a *AppServicesApiService) AppServicesServiceIdPUT(ctx context.Context, body ServiceInfo, appInstanceId string, serviceId string) (ServiceInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ServiceInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/services/{serviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceId"+"}", fmt.Sprintf("%v", serviceId), -1) + + 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 localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ServiceInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 412 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-service-mgmt-client/api_app_subscriptions.go b/go-packages/meep-service-mgmt-client/api_app_subscriptions.go new file mode 100644 index 0000000000000000000000000000000000000000..6f864b5006a44c9d163e6b0524f27adcc9ef3bc8 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/api_app_subscriptions.go @@ -0,0 +1,505 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AppSubscriptionsApiService service + +/* +AppSubscriptionsApiService +This method deletes a mecSrvMgmtSubscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param subscriptionId Represents a subscription to the notifications from the MEC platform. + + +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionDELETE(ctx context.Context, appInstanceId string, subscriptionId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/problem+json", "text/plain"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + 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 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + 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 +} + +/* +AppSubscriptionsApiService +The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + * @param subscriptionId Represents a subscription to the notifications from the MEC platform. + +@return SerAvailabilityNotificationSubscription +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionGET(ctx context.Context, appInstanceId string, subscriptionId string) (SerAvailabilityNotificationSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SerAvailabilityNotificationSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v SerAvailabilityNotificationSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppSubscriptionsApiService +The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return MecServiceMgmtApiSubscriptionLinkList +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionsGET(ctx context.Context, appInstanceId string) (MecServiceMgmtApiSubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue MecServiceMgmtApiSubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v MecServiceMgmtApiSubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +AppSubscriptionsApiService +The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Entity body in the request contains a subscription to the MEC application termination notifications that is to be created. + * @param appInstanceId Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. + +@return SerAvailabilityNotificationSubscription +*/ +func (a *AppSubscriptionsApiService) ApplicationsSubscriptionsPOST(ctx context.Context, body SerAvailabilityNotificationSubscription, appInstanceId string) (SerAvailabilityNotificationSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SerAvailabilityNotificationSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/applications/{appInstanceId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"appInstanceId"+"}", fmt.Sprintf("%v", appInstanceId), -1) + + 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 localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v SerAvailabilityNotificationSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-service-mgmt-client/api_services.go b/go-packages/meep-service-mgmt-client/api_services.go new file mode 100644 index 0000000000000000000000000000000000000000..89afab8a05dc3ee8686cd184573f75cd63df7304 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/api_services.go @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type ServicesApiService service + +/* +ServicesApiService +This method retrieves information about a list of mecService resources. This method is typically used in \"service availability query\" procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *ServicesGETOpts - Optional Parameters: + * @param "SerInstanceId" (optional.Interface of []string) - A MEC application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. + * @param "SerName" (optional.Interface of []string) - A MEC application instance may use multiple ser_names as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. + * @param "SerCategoryId" (optional.String) - A MEC application instance may use ser_category_id as an input parameter to query the availability of a list of MEC service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. + * @param "ConsumedLocalOnly" (optional.Bool) - Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance. + * @param "IsLocal" (optional.Bool) - Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application. + * @param "ScopeOfLocality" (optional.String) - A MEC application instance may use scope_of_locality as an input parameter to query the availability of a list of MEC service instances with a certain scope of locality. + +@return []ServiceInfo +*/ + +type ServicesGETOpts struct { + SerInstanceId optional.Interface + SerName optional.Interface + SerCategoryId optional.String + ConsumedLocalOnly optional.Bool + IsLocal optional.Bool + ScopeOfLocality optional.String +} + +func (a *ServicesApiService) ServicesGET(ctx context.Context, localVarOptionals *ServicesGETOpts) ([]ServiceInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ServiceInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/services" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SerInstanceId.IsSet() { + localVarQueryParams.Add("ser_instance_id", parameterToString(localVarOptionals.SerInstanceId.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.SerName.IsSet() { + localVarQueryParams.Add("ser_name", parameterToString(localVarOptionals.SerName.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.SerCategoryId.IsSet() { + localVarQueryParams.Add("ser_category_id", parameterToString(localVarOptionals.SerCategoryId.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ConsumedLocalOnly.IsSet() { + localVarQueryParams.Add("consumed_local_only", parameterToString(localVarOptionals.ConsumedLocalOnly.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.IsLocal.IsSet() { + localVarQueryParams.Add("is_local", parameterToString(localVarOptionals.IsLocal.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ScopeOfLocality.IsSet() { + localVarQueryParams.Add("scope_of_locality", parameterToString(localVarOptionals.ScopeOfLocality.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ServiceInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 414 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ServicesApiService +This method retrieves information about a mecService resource. This method is typically used in \"service availability query\" procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param serviceId Represents a MEC service instance. + +@return ServiceInfo +*/ +func (a *ServicesApiService) ServicesServiceIdGET(ctx context.Context, serviceId string) (ServiceInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ServiceInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/services/{serviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"serviceId"+"}", fmt.Sprintf("%v", serviceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ServiceInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-service-mgmt-client/api_transports.go b/go-packages/meep-service-mgmt-client/api_transports.go new file mode 100644 index 0000000000000000000000000000000000000000..4279bb8d7aed4a21819b12a0e4ddcdfd407c0f75 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/api_transports.go @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type TransportsApiService service + +/* +TransportsApiService +This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the MEC platform in the \"transport information query\" procedure + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return []TransportInfo +*/ +func (a *TransportsApiService) TransportsGET(ctx context.Context) ([]TransportInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []TransportInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/transports" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // 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 + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []TransportInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, 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 localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-service-mgmt-client/client.go b/go-packages/meep-service-mgmt-client/client.go new file mode 100644 index 0000000000000000000000000000000000000000..0c8a542cade91fc28193a9a9dac9be08928737a4 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/client.go @@ -0,0 +1,488 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") +) + +// APIClient manages communication with the AdvantEDGE MEC Service Management API API v2.1.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AppServicesApi *AppServicesApiService + + AppSubscriptionsApi *AppSubscriptionsApiService + + ServicesApi *ServicesApiService + + TransportsApi *TransportsApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AppServicesApi = (*AppServicesApiService)(&c.common) + c.AppSubscriptionsApi = (*AppSubscriptionsApiService)(&c.common) + c.ServicesApi = (*ServicesApiService)(&c.common) + c.TransportsApi = (*TransportsApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } + + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + } + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericSwaggerError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericSwaggerError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericSwaggerError) Model() interface{} { + return e.model +} diff --git a/go-packages/meep-service-mgmt-client/configuration.go b/go-packages/meep-service-mgmt-client/configuration.go new file mode 100644 index 0000000000000000000000000000000000000000..040cc2dfb1db083e1196bb1cfb785e1749639c52 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/configuration.go @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +type Configuration struct { + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + cfg := &Configuration{ + BasePath: "https://localhost/sandboxname/mec_service_mgmt/v1", + DefaultHeader: make(map[string]string), + UserAgent: "Swagger-Codegen/1.0.0/go", + } + return cfg +} + +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/go-packages/meep-service-mgmt-client/docs/AppServicesApi.md b/go-packages/meep-service-mgmt-client/docs/AppServicesApi.md new file mode 100644 index 0000000000000000000000000000000000000000..2b22d2e10717b8bce79a08947164be4c38cd056c --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/AppServicesApi.md @@ -0,0 +1,172 @@ +# \AppServicesApi + +All URIs are relative to *https://localhost/sandboxname/mec_service_mgmt/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AppServicesGET**](AppServicesApi.md#AppServicesGET) | **Get** /applications/{appInstanceId}/services | +[**AppServicesPOST**](AppServicesApi.md#AppServicesPOST) | **Post** /applications/{appInstanceId}/services | +[**AppServicesServiceIdDELETE**](AppServicesApi.md#AppServicesServiceIdDELETE) | **Delete** /applications/{appInstanceId}/services/{serviceId} | +[**AppServicesServiceIdGET**](AppServicesApi.md#AppServicesServiceIdGET) | **Get** /applications/{appInstanceId}/services/{serviceId} | +[**AppServicesServiceIdPUT**](AppServicesApi.md#AppServicesServiceIdPUT) | **Put** /applications/{appInstanceId}/services/{serviceId} | + + +# **AppServicesGET** +> []ServiceInfo AppServicesGET(ctx, appInstanceId, optional) + + +This method retrieves information about a list of mecService resources. This method is typically used in \"service availability query\" procedure + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **optional** | ***AppServicesGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AppServicesGETOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serInstanceId** | [**optional.Interface of []string**](string.md)| A MEC application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. | + **serName** | [**optional.Interface of []string**](string.md)| A MEC application instance may use multiple ser_names as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. | + **serCategoryId** | **optional.String**| A MEC application instance may use ser_category_id as an input parameter to query the availability of a list of MEC service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. | + **consumedLocalOnly** | **optional.Bool**| Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance. | + **isLocal** | **optional.Bool**| Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application. | + **scopeOfLocality** | **optional.String**| A MEC application instance may use scope_of_locality as an input parameter to query the availability of a list of MEC service instances with a certain scope of locality. | + +### Return type + +[**[]ServiceInfo**](ServiceInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **AppServicesPOST** +> ServiceInfo AppServicesPOST(ctx, body, appInstanceId) + + +This method is used to create a mecService resource. This method is typically used in \"service availability update and new service registration\" procedure + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**ServiceInfoPost**](ServiceInfoPost.md)| New ServiceInfo with updated "state" is included as entity body of the request | + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**ServiceInfo**](ServiceInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **AppServicesServiceIdDELETE** +> AppServicesServiceIdDELETE(ctx, appInstanceId, serviceId) + + +This method deletes a mecService resource. This method is typically used in the service deregistration procedure. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **serviceId** | **string**| Represents a MEC service instance. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **AppServicesServiceIdGET** +> ServiceInfo AppServicesServiceIdGET(ctx, appInstanceId, serviceId) + + +This method retrieves information about a mecService resource. This method is typically used in \"service availability query\" procedure + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **serviceId** | **string**| Represents a MEC service instance. | + +### Return type + +[**ServiceInfo**](ServiceInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **AppServicesServiceIdPUT** +> ServiceInfo AppServicesServiceIdPUT(ctx, body, appInstanceId, serviceId) + + +This method updates the information about a mecService resource + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**ServiceInfo**](ServiceInfo.md)| New ServiceInfo with updated "state" is included as entity body of the request | + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **serviceId** | **string**| Represents a MEC service instance. | + +### Return type + +[**ServiceInfo**](ServiceInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-service-mgmt-client/docs/AppSubscriptionsApi.md b/go-packages/meep-service-mgmt-client/docs/AppSubscriptionsApi.md new file mode 100644 index 0000000000000000000000000000000000000000..77f1c4d7918f6602089ef06f828e17de31fa4049 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/AppSubscriptionsApi.md @@ -0,0 +1,127 @@ +# \AppSubscriptionsApi + +All URIs are relative to *https://localhost/sandboxname/mec_service_mgmt/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApplicationsSubscriptionDELETE**](AppSubscriptionsApi.md#ApplicationsSubscriptionDELETE) | **Delete** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +[**ApplicationsSubscriptionGET**](AppSubscriptionsApi.md#ApplicationsSubscriptionGET) | **Get** /applications/{appInstanceId}/subscriptions/{subscriptionId} | +[**ApplicationsSubscriptionsGET**](AppSubscriptionsApi.md#ApplicationsSubscriptionsGET) | **Get** /applications/{appInstanceId}/subscriptions | +[**ApplicationsSubscriptionsPOST**](AppSubscriptionsApi.md#ApplicationsSubscriptionsPOST) | **Post** /applications/{appInstanceId}/subscriptions | + + +# **ApplicationsSubscriptionDELETE** +> ApplicationsSubscriptionDELETE(ctx, appInstanceId, subscriptionId) + + +This method deletes a mecSrvMgmtSubscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **subscriptionId** | **string**| Represents a subscription to the notifications from the MEC platform. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsSubscriptionGET** +> SerAvailabilityNotificationSubscription ApplicationsSubscriptionGET(ctx, appInstanceId, subscriptionId) + + +The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + **subscriptionId** | **string**| Represents a subscription to the notifications from the MEC platform. | + +### Return type + +[**SerAvailabilityNotificationSubscription**](SerAvailabilityNotificationSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsSubscriptionsGET** +> MecServiceMgmtApiSubscriptionLinkList ApplicationsSubscriptionsGET(ctx, appInstanceId) + + +The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**MecServiceMgmtApiSubscriptionLinkList**](MecServiceMgmtApiSubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ApplicationsSubscriptionsPOST** +> SerAvailabilityNotificationSubscription ApplicationsSubscriptionsPOST(ctx, body, appInstanceId) + + +The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**SerAvailabilityNotificationSubscription**](SerAvailabilityNotificationSubscription.md)| Entity body in the request contains a subscription to the MEC application termination notifications that is to be created. | + **appInstanceId** | **string**| Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager. | + +### Return type + +[**SerAvailabilityNotificationSubscription**](SerAvailabilityNotificationSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-service-mgmt-client/docs/CategoryRef.md b/go-packages/meep-service-mgmt-client/docs/CategoryRef.md new file mode 100644 index 0000000000000000000000000000000000000000..58ca0595b92bf83ce7144ff2ae7dac6a6aa3e358 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/CategoryRef.md @@ -0,0 +1,13 @@ +# CategoryRef + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | | [default to null] +**Id** | **string** | | [default to null] +**Name** | **string** | | [default to null] +**Version** | **string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/EndPointInfoAddress.md b/go-packages/meep-service-mgmt-client/docs/EndPointInfoAddress.md new file mode 100644 index 0000000000000000000000000000000000000000..f52e7b8140cd375d5854ccf4565412bd4479edb4 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/EndPointInfoAddress.md @@ -0,0 +1,11 @@ +# EndPointInfoAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | | [default to null] +**Port** | **int32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/EndPointInfoAddresses.md b/go-packages/meep-service-mgmt-client/docs/EndPointInfoAddresses.md new file mode 100644 index 0000000000000000000000000000000000000000..ad34d8888d3b631167d76d78870cdbb0651f77a8 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/EndPointInfoAddresses.md @@ -0,0 +1,10 @@ +# EndPointInfoAddresses + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Addresses** | [**[]EndPointInfoAddress**](EndPointInfo.Address.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/EndPointInfoAlternative.md b/go-packages/meep-service-mgmt-client/docs/EndPointInfoAlternative.md new file mode 100644 index 0000000000000000000000000000000000000000..8427e7abb126cee69091ff4ae89e910f6998fc2e --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/EndPointInfoAlternative.md @@ -0,0 +1,10 @@ +# EndPointInfoAlternative + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alternative** | [***interface{}**](interface{}.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/EndPointInfoUris.md b/go-packages/meep-service-mgmt-client/docs/EndPointInfoUris.md new file mode 100644 index 0000000000000000000000000000000000000000..b6696023ae7375c61c8ed482749dd8f6aa0ca17f --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/EndPointInfoUris.md @@ -0,0 +1,10 @@ +# EndPointInfoUris + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uris** | **[]string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/LinkType.md b/go-packages/meep-service-mgmt-client/docs/LinkType.md new file mode 100644 index 0000000000000000000000000000000000000000..58cd3a581c7f622d6168187d6cd0ccf155071b10 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/LinkType.md @@ -0,0 +1,10 @@ +# LinkType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/LocalityType.md b/go-packages/meep-service-mgmt-client/docs/LocalityType.md new file mode 100644 index 0000000000000000000000000000000000000000..dfb44207044df2ea22361f153cbcfe940b6f3d2e --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/LocalityType.md @@ -0,0 +1,9 @@ +# LocalityType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkList.md b/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkList.md new file mode 100644 index 0000000000000000000000000000000000000000..c4cafba01cb9195d168dd782d5a981a6513c2b65 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkList.md @@ -0,0 +1,10 @@ +# MecServiceMgmtApiSubscriptionLinkList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [***MecServiceMgmtApiSubscriptionLinkListLinks**](MecServiceMgmtApiSubscriptionLinkList.Links.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkListLinks.md b/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkListLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..8eb0a2b4ad6ea1b9eeb98f205aa2512141cf365f --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkListLinks.md @@ -0,0 +1,11 @@ +# MecServiceMgmtApiSubscriptionLinkListLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [***LinkType**](LinkType.md) | | [default to null] +**Subscriptions** | [**[]MecServiceMgmtApiSubscriptionLinkListSubscription**](MecServiceMgmtApiSubscriptionLinkList.Subscription.md) | The MEC application instance's subscriptions | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkListSubscription.md b/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkListSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..948961f2803f604aafee3581da1a1e4af38d8239 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/MecServiceMgmtApiSubscriptionLinkListSubscription.md @@ -0,0 +1,11 @@ +# MecServiceMgmtApiSubscriptionLinkListSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | | [default to null] +**Rel** | **string** | The value shall be se to SerAvailabilityNotificationSubscription. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/OneOfServiceInfoPost.md b/go-packages/meep-service-mgmt-client/docs/OneOfServiceInfoPost.md new file mode 100644 index 0000000000000000000000000000000000000000..27972ecbcf642a239b312ceda745785f54fde05c --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/OneOfServiceInfoPost.md @@ -0,0 +1,9 @@ +# OneOfServiceInfoPost + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/OneOfTransportInfoEndpoint.md b/go-packages/meep-service-mgmt-client/docs/OneOfTransportInfoEndpoint.md new file mode 100644 index 0000000000000000000000000000000000000000..418cb8289a70bd495b4ca6a1a84f2431fecd62a6 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/OneOfTransportInfoEndpoint.md @@ -0,0 +1,9 @@ +# OneOfTransportInfoEndpoint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ProblemDetails.md b/go-packages/meep-service-mgmt-client/docs/ProblemDetails.md new file mode 100644 index 0000000000000000000000000000000000000000..45c114639ac45e06f72b49bfa63161b6c7b007a1 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ProblemDetails.md @@ -0,0 +1,14 @@ +# ProblemDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | | [optional] [default to null] +**Title** | **string** | | [optional] [default to null] +**Status** | **int32** | | [optional] [default to null] +**Detail** | **string** | | [optional] [default to null] +**Instance** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/SecurityInfo.md b/go-packages/meep-service-mgmt-client/docs/SecurityInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..867de5aff21316166e8d145831f268aa8d5af6ca --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/SecurityInfo.md @@ -0,0 +1,10 @@ +# SecurityInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OAuth2Info** | [***SecurityInfoOAuth2Info**](SecurityInfo.OAuth2Info.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/SecurityInfoOAuth2Info.md b/go-packages/meep-service-mgmt-client/docs/SecurityInfoOAuth2Info.md new file mode 100644 index 0000000000000000000000000000000000000000..f71641e6f5c839edd6b048cfe1daaf825bed4957 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/SecurityInfoOAuth2Info.md @@ -0,0 +1,11 @@ +# SecurityInfoOAuth2Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GrantTypes** | [***[]SecurityInfoOAuth2InfoGrantType**](array.md) | | [default to null] +**TokenEndpoint** | **string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/SecurityInfoOAuth2InfoGrantType.md b/go-packages/meep-service-mgmt-client/docs/SecurityInfoOAuth2InfoGrantType.md new file mode 100644 index 0000000000000000000000000000000000000000..aeaad5ab96f4e1867868cb31756d3e6f77a57031 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/SecurityInfoOAuth2InfoGrantType.md @@ -0,0 +1,9 @@ +# SecurityInfoOAuth2InfoGrantType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/Self.md b/go-packages/meep-service-mgmt-client/docs/Self.md new file mode 100644 index 0000000000000000000000000000000000000000..bfbbd49a461154a08606853107fbe54efec2e6a1 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/Self.md @@ -0,0 +1,10 @@ +# Self + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [***LinkType**](LinkType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/SerAvailabilityNotificationSubscription.md b/go-packages/meep-service-mgmt-client/docs/SerAvailabilityNotificationSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..caaa313e97271c779e832c4cb08f7ba81c3409f9 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/SerAvailabilityNotificationSubscription.md @@ -0,0 +1,13 @@ +# SerAvailabilityNotificationSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubscriptionType** | **string** | | [default to null] +**CallbackReference** | **string** | | [default to null] +**Links** | [***Self**](Self.md) | | [default to null] +**FilteringCriteria** | [***SerAvailabilityNotificationSubscriptionFilteringCriteria**](SerAvailabilityNotificationSubscription.FilteringCriteria.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/SerAvailabilityNotificationSubscriptionFilteringCriteria.md b/go-packages/meep-service-mgmt-client/docs/SerAvailabilityNotificationSubscriptionFilteringCriteria.md new file mode 100644 index 0000000000000000000000000000000000000000..76e1bb7f784734cf7cffd868be1c7fb7977fc923 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/SerAvailabilityNotificationSubscriptionFilteringCriteria.md @@ -0,0 +1,14 @@ +# SerAvailabilityNotificationSubscriptionFilteringCriteria + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SerInstanceIds** | [***[]string**](array.md) | | [optional] [default to null] +**SerNames** | [***[]string**](array.md) | | [optional] [default to null] +**SerCategories** | [***[]CategoryRef**](array.md) | | [optional] [default to null] +**States** | [***[]ServiceState**](array.md) | | [optional] [default to null] +**IsLocal** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/SerializerType.md b/go-packages/meep-service-mgmt-client/docs/SerializerType.md new file mode 100644 index 0000000000000000000000000000000000000000..5ca28aeef35002f591675c9d2cf8c1a16107dce7 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/SerializerType.md @@ -0,0 +1,9 @@ +# SerializerType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotification.md b/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotification.md new file mode 100644 index 0000000000000000000000000000000000000000..dca546d8dad0d44d8b429b66965d1022c5464606 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotification.md @@ -0,0 +1,12 @@ +# ServiceAvailabilityNotification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NotificationType** | **string** | | [default to null] +**ServiceReferences** | [**[]ServiceAvailabilityNotificationServiceReferences**](ServiceAvailabilityNotification.ServiceReferences.md) | | [default to null] +**Links** | [***Subscription**](Subscription.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotificationChangeType.md b/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotificationChangeType.md new file mode 100644 index 0000000000000000000000000000000000000000..0b54ccfb4628cea1b07d19735cf2a54a4aeae167 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotificationChangeType.md @@ -0,0 +1,9 @@ +# ServiceAvailabilityNotificationChangeType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotificationServiceReferences.md b/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotificationServiceReferences.md new file mode 100644 index 0000000000000000000000000000000000000000..a415bfa95d35e7f334d82a67519c707c2556c7e2 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServiceAvailabilityNotificationServiceReferences.md @@ -0,0 +1,14 @@ +# ServiceAvailabilityNotificationServiceReferences + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Link** | [***LinkType**](LinkType.md) | | [optional] [default to null] +**SerName** | **string** | | [default to null] +**SerInstanceId** | **string** | | [default to null] +**State** | [***ServiceState**](ServiceState.md) | | [default to null] +**ChangeType** | [***ServiceAvailabilityNotificationChangeType**](ServiceAvailabilityNotification.ChangeType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServiceInfo.md b/go-packages/meep-service-mgmt-client/docs/ServiceInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..c19c5ff6b43788f000f7d7c6db53b53e59f1422b --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServiceInfo.md @@ -0,0 +1,19 @@ +# ServiceInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SerInstanceId** | **string** | | [optional] [default to null] +**SerName** | **string** | | [default to null] +**SerCategory** | [***CategoryRef**](CategoryRef.md) | | [optional] [default to null] +**Version** | **string** | | [default to null] +**State** | [***ServiceState**](ServiceState.md) | | [default to null] +**TransportInfo** | [***TransportInfo**](TransportInfo.md) | | [default to null] +**Serializer** | [***SerializerType**](SerializerType.md) | | [default to null] +**ScopeOfLocality** | [***LocalityType**](LocalityType.md) | | [optional] [default to null] +**ConsumedLocalOnly** | **bool** | | [optional] [default to null] +**IsLocal** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServiceInfoPost.md b/go-packages/meep-service-mgmt-client/docs/ServiceInfoPost.md new file mode 100644 index 0000000000000000000000000000000000000000..683ac3b5a1fa0fb7dbedd109c25b8dac4cfd97d5 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServiceInfoPost.md @@ -0,0 +1,20 @@ +# ServiceInfoPost + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SerInstanceId** | **string** | | [optional] [default to null] +**SerName** | **string** | | [default to null] +**SerCategory** | [***CategoryRef**](CategoryRef.md) | | [optional] [default to null] +**Version** | **string** | | [default to null] +**State** | [***ServiceState**](ServiceState.md) | | [default to null] +**TransportId** | **string** | | [optional] [default to null] +**TransportInfo** | [***TransportInfo**](TransportInfo.md) | | [optional] [default to null] +**Serializer** | [***SerializerType**](SerializerType.md) | | [default to null] +**ScopeOfLocality** | [***LocalityType**](LocalityType.md) | | [optional] [default to null] +**ConsumedLocalOnly** | **bool** | | [optional] [default to null] +**IsLocal** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServiceState.md b/go-packages/meep-service-mgmt-client/docs/ServiceState.md new file mode 100644 index 0000000000000000000000000000000000000000..ab82f9bf0670b5747fe6e4fcd4718f57b1f10a7d --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServiceState.md @@ -0,0 +1,9 @@ +# ServiceState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/ServicesApi.md b/go-packages/meep-service-mgmt-client/docs/ServicesApi.md new file mode 100644 index 0000000000000000000000000000000000000000..6927c0b86dd69bde2fed79b35cb4321841c61d2a --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/ServicesApi.md @@ -0,0 +1,78 @@ +# \ServicesApi + +All URIs are relative to *https://localhost/sandboxname/mec_service_mgmt/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ServicesGET**](ServicesApi.md#ServicesGET) | **Get** /services | +[**ServicesServiceIdGET**](ServicesApi.md#ServicesServiceIdGET) | **Get** /services/{serviceId} | + + +# **ServicesGET** +> []ServiceInfo ServicesGET(ctx, optional) + + +This method retrieves information about a list of mecService resources. This method is typically used in \"service availability query\" procedure + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ServicesGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ServicesGETOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **serInstanceId** | [**optional.Interface of []string**](string.md)| A MEC application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. | + **serName** | [**optional.Interface of []string**](string.md)| A MEC application instance may use multiple ser_names as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. | + **serCategoryId** | **optional.String**| A MEC application instance may use ser_category_id as an input parameter to query the availability of a list of MEC service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present. | + **consumedLocalOnly** | **optional.Bool**| Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance. | + **isLocal** | **optional.Bool**| Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application. | + **scopeOfLocality** | **optional.String**| A MEC application instance may use scope_of_locality as an input parameter to query the availability of a list of MEC service instances with a certain scope of locality. | + +### Return type + +[**[]ServiceInfo**](ServiceInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ServicesServiceIdGET** +> ServiceInfo ServicesServiceIdGET(ctx, serviceId) + + +This method retrieves information about a mecService resource. This method is typically used in \"service availability query\" procedure + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **serviceId** | **string**| Represents a MEC service instance. | + +### Return type + +[**ServiceInfo**](ServiceInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-service-mgmt-client/docs/Subscription.md b/go-packages/meep-service-mgmt-client/docs/Subscription.md new file mode 100644 index 0000000000000000000000000000000000000000..53ed3eeaf5fde53b20f5b84a5e3e2165355e67ab --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/Subscription.md @@ -0,0 +1,10 @@ +# Subscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subscription** | [***LinkType**](LinkType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/TransportInfo.md b/go-packages/meep-service-mgmt-client/docs/TransportInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..b9cb472786d14d822c60ade969cf7cda29cd4eca --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/TransportInfo.md @@ -0,0 +1,18 @@ +# TransportInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [default to null] +**Name** | **string** | | [default to null] +**Description** | **string** | | [optional] [default to null] +**Type_** | [***TransportType**](TransportType.md) | | [default to null] +**Protocol** | **string** | | [default to null] +**Version** | **string** | | [default to null] +**Endpoint** | [***OneOfTransportInfoEndpoint**](OneOfTransportInfoEndpoint.md) | This type represents information about a transport endpoint | [default to null] +**Security** | [***SecurityInfo**](SecurityInfo.md) | | [default to null] +**ImplSpecificInfo** | [***TransportInfoImplSpecificInfo**](TransportInfo.ImplSpecificInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/TransportInfoImplSpecificInfo.md b/go-packages/meep-service-mgmt-client/docs/TransportInfoImplSpecificInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..75583c472a41d0c27b2765c8f8f460fcd8cadafd --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/TransportInfoImplSpecificInfo.md @@ -0,0 +1,9 @@ +# TransportInfoImplSpecificInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/TransportType.md b/go-packages/meep-service-mgmt-client/docs/TransportType.md new file mode 100644 index 0000000000000000000000000000000000000000..f736c2711e1f9a5de9d08e4a80221621ca8bb670 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/TransportType.md @@ -0,0 +1,9 @@ +# TransportType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go-packages/meep-service-mgmt-client/docs/TransportsApi.md b/go-packages/meep-service-mgmt-client/docs/TransportsApi.md new file mode 100644 index 0000000000000000000000000000000000000000..b4d3f67cbdd039681340967b536c9eaa59497749 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/docs/TransportsApi.md @@ -0,0 +1,33 @@ +# \TransportsApi + +All URIs are relative to *https://localhost/sandboxname/mec_service_mgmt/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TransportsGET**](TransportsApi.md#TransportsGET) | **Get** /transports | + + +# **TransportsGET** +> []TransportInfo TransportsGET(ctx, ) + + +This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the MEC platform in the \"transport information query\" procedure + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**[]TransportInfo**](TransportInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-service-mgmt-client/git_push.sh b/go-packages/meep-service-mgmt-client/git_push.sh new file mode 100644 index 0000000000000000000000000000000000000000..ae01b182ae9eb047d0999a496b060e62d7b01e5c --- /dev/null +++ b/go-packages/meep-service-mgmt-client/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/go-packages/meep-service-mgmt-client/model_category_ref.go b/go-packages/meep-service-mgmt-client/model_category_ref.go new file mode 100644 index 0000000000000000000000000000000000000000..019d5af9bb94702cd39e7a5ddc6c3e0396aaeb5f --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_category_ref.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the category reference +type CategoryRef struct { + Href string `json:"href"` + Id string `json:"id"` + Name string `json:"name"` + Version string `json:"version"` +} diff --git a/go-packages/meep-service-mgmt-client/model_end_point_info_address.go b/go-packages/meep-service-mgmt-client/model_end_point_info_address.go new file mode 100644 index 0000000000000000000000000000000000000000..432d60eb22817cc9183be4f08ffbfe7a0521e401 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_end_point_info_address.go @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// A IP address and port pair +type EndPointInfoAddress struct { + Host string `json:"host"` + Port int32 `json:"port"` +} diff --git a/go-packages/meep-service-mgmt-client/model_end_point_info_addresses.go b/go-packages/meep-service-mgmt-client/model_end_point_info_addresses.go new file mode 100644 index 0000000000000000000000000000000000000000..edea9fb8c0f1611885012551e760a52f09ed2617 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_end_point_info_addresses.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Entry point information of the service as one or more pairs of IP address and port +type EndPointInfoAddresses struct { + Addresses []EndPointInfoAddress `json:"addresses"` +} diff --git a/go-packages/meep-service-mgmt-client/model_end_point_info_alternative.go b/go-packages/meep-service-mgmt-client/model_end_point_info_alternative.go new file mode 100644 index 0000000000000000000000000000000000000000..5f6ce5ce25bac966ea50917daf77e699a916f370 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_end_point_info_alternative.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Entry point information of the service in a format defined by an implementation, or in an external specification. +type EndPointInfoAlternative struct { + Alternative *interface{} `json:"alternative"` +} diff --git a/go-packages/meep-service-mgmt-client/model_end_point_info_uris.go b/go-packages/meep-service-mgmt-client/model_end_point_info_uris.go new file mode 100644 index 0000000000000000000000000000000000000000..2445cfb01b441b5248ef2f87aa8c0a5f7cbbdc3c --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_end_point_info_uris.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Entry point information of the service as string, formatted according to URI syntax +type EndPointInfoUris struct { + Uris []string `json:"uris"` +} diff --git a/go-packages/meep-service-mgmt-client/model_link_type.go b/go-packages/meep-service-mgmt-client/model_link_type.go new file mode 100644 index 0000000000000000000000000000000000000000..dc66aa43c805ba892fe0c1f79783e9419077f292 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_link_type.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents a type of link and may be referenced from data structures +type LinkType struct { + Href string `json:"href,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_locality_type.go b/go-packages/meep-service-mgmt-client/model_locality_type.go new file mode 100644 index 0000000000000000000000000000000000000000..b005d8016d75b422008f32389b5efe146e860458 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_locality_type.go @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// LocalityType : The scope of locality as expressed by \"consumedLocalOnly\" and \"isLocal\". If absent, defaults to MEC_HOST +type LocalityType string + +// List of LocalityType +const ( + MEC_SYSTEM_LocalityType LocalityType = "MEC_SYSTEM" + MEC_HOST_LocalityType LocalityType = "MEC_HOST" + NFVI_POP_LocalityType LocalityType = "NFVI_POP" + ZONE_LocalityType LocalityType = "ZONE" + ZONE_GROUP_LocalityType LocalityType = "ZONE_GROUP" + NFVI_NODE_LocalityType LocalityType = "NFVI_NODE" +) diff --git a/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list.go b/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list.go new file mode 100644 index 0000000000000000000000000000000000000000..a7edc49bacbb01002a64a03a39fdeebe534c6f04 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents a list of links related to currently existing subscriptions for a MEC application instance. This information is returned when sending a request to receive current subscriptions. +type MecServiceMgmtApiSubscriptionLinkList struct { + Links *MecServiceMgmtApiSubscriptionLinkListLinks `json:"_links"` +} diff --git a/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list_links.go b/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list_links.go new file mode 100644 index 0000000000000000000000000000000000000000..88e310ff130de8c3c2ddccd605c50808747eaa50 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list_links.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Self-referring URI. +type MecServiceMgmtApiSubscriptionLinkListLinks struct { + Self *LinkType `json:"self"` + // The MEC application instance's subscriptions + Subscriptions []MecServiceMgmtApiSubscriptionLinkListSubscription `json:"subscriptions,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list_subscription.go b/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..20fc31dadc83ec826cbda9ebb9340e5fb046b35f --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_mec_service_mgmt_api_subscription_link_list_subscription.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// A link to a subscription. +type MecServiceMgmtApiSubscriptionLinkListSubscription struct { + Href string `json:"href"` + // The value shall be se to SerAvailabilityNotificationSubscription. + Rel string `json:"rel"` +} diff --git a/go-packages/meep-service-mgmt-client/model_one_of_service_info_post.go b/go-packages/meep-service-mgmt-client/model_one_of_service_info_post.go new file mode 100644 index 0000000000000000000000000000000000000000..1a4eb2bd1d5ed2046d3b290f25d349bf19f068e0 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_one_of_service_info_post.go @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +type OneOfServiceInfoPost struct { +} diff --git a/go-packages/meep-service-mgmt-client/model_one_of_transport_info_endpoint.go b/go-packages/meep-service-mgmt-client/model_one_of_transport_info_endpoint.go new file mode 100644 index 0000000000000000000000000000000000000000..f372bac975c61db2d2cf1021ec7e460e45e603c0 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_one_of_transport_info_endpoint.go @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +type OneOfTransportInfoEndpoint struct { +} diff --git a/go-packages/meep-service-mgmt-client/model_problem_details.go b/go-packages/meep-service-mgmt-client/model_problem_details.go new file mode 100644 index 0000000000000000000000000000000000000000..f1781253e2cce5ccd235ccaa0d2ef53ff7ec3dd8 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_problem_details.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +type ProblemDetails struct { + Type_ string `json:"type,omitempty"` + Title string `json:"title,omitempty"` + Status int32 `json:"status,omitempty"` + Detail string `json:"detail,omitempty"` + Instance string `json:"instance,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_security_info.go b/go-packages/meep-service-mgmt-client/model_security_info.go new file mode 100644 index 0000000000000000000000000000000000000000..817a16a1d555eb8b371e9d6ac5fcd4d39b0f51fb --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_security_info.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents security information related to a transport +type SecurityInfo struct { + OAuth2Info *SecurityInfoOAuth2Info `json:"oAuth2Info,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_security_info_o_auth2_info.go b/go-packages/meep-service-mgmt-client/model_security_info_o_auth2_info.go new file mode 100644 index 0000000000000000000000000000000000000000..332cabc990d280ff87429fabbc77342fa5707365 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_security_info_o_auth2_info.go @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Parameters related to use of OAuth 2.0 +type SecurityInfoOAuth2Info struct { + GrantTypes *[]SecurityInfoOAuth2InfoGrantType `json:"grantTypes"` + TokenEndpoint string `json:"tokenEndpoint"` +} diff --git a/go-packages/meep-service-mgmt-client/model_security_info_o_auth2_info_grant_type.go b/go-packages/meep-service-mgmt-client/model_security_info_o_auth2_info_grant_type.go new file mode 100644 index 0000000000000000000000000000000000000000..fda65863812d16c8f89a6b192cec80e109869bb2 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_security_info_o_auth2_info_grant_type.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// SecurityInfoOAuth2InfoGrantType : OAuth 2.0 grant type +type SecurityInfoOAuth2InfoGrantType string + +// List of SecurityInfo.OAuth2Info.GrantType +const ( + AUTHORIZATION_CODE_SecurityInfoOAuth2InfoGrantType SecurityInfoOAuth2InfoGrantType = "OAUTH2_AUTHORIZATION_CODE" + IMPLICIT_GRANT_SecurityInfoOAuth2InfoGrantType SecurityInfoOAuth2InfoGrantType = "OAUTH2_IMPLICIT_GRANT" + RESOURCE_OWNER_SecurityInfoOAuth2InfoGrantType SecurityInfoOAuth2InfoGrantType = "OAUTH2_RESOURCE_OWNER" + CLIENT_CREDENTIALS_SecurityInfoOAuth2InfoGrantType SecurityInfoOAuth2InfoGrantType = "OAUTH2_CLIENT_CREDENTIALS" +) diff --git a/go-packages/meep-service-mgmt-client/model_self.go b/go-packages/meep-service-mgmt-client/model_self.go new file mode 100644 index 0000000000000000000000000000000000000000..3e07e22b85a0de40a137d666040400f559e69373 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_self.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Self-referring URI. +type Self struct { + Self *LinkType `json:"self"` +} diff --git a/go-packages/meep-service-mgmt-client/model_ser_availability_notification_subscription.go b/go-packages/meep-service-mgmt-client/model_ser_availability_notification_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..df533ddb56ee43ab010793e75ec3ef6e61419eae --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_ser_availability_notification_subscription.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents a subscription to the notifications from the MEC platform regarding the availability of a MEC service or a list of MEC services. +type SerAvailabilityNotificationSubscription struct { + SubscriptionType string `json:"subscriptionType"` + CallbackReference string `json:"callbackReference"` + Links *Self `json:"_links"` + FilteringCriteria *SerAvailabilityNotificationSubscriptionFilteringCriteria `json:"filteringCriteria,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_ser_availability_notification_subscription_filtering_criteria.go b/go-packages/meep-service-mgmt-client/model_ser_availability_notification_subscription_filtering_criteria.go new file mode 100644 index 0000000000000000000000000000000000000000..819bc8cdd44e4741c3920f9dc49bdc34faabbaee --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_ser_availability_notification_subscription_filtering_criteria.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Filtering criteria to match services for which events are requested to be reported. If absent, matches all services. All child attributes are combined with the logical \"AND\" operation. +type SerAvailabilityNotificationSubscriptionFilteringCriteria struct { + SerInstanceIds *[]string `json:"serInstanceIds,omitempty"` + SerNames *[]string `json:"serNames,omitempty"` + SerCategories *[]CategoryRef `json:"serCategories,omitempty"` + States *[]ServiceState `json:"states,omitempty"` + IsLocal bool `json:"isLocal,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_serializer_type.go b/go-packages/meep-service-mgmt-client/model_serializer_type.go new file mode 100644 index 0000000000000000000000000000000000000000..83a65853a5e76c3d8a37d9ece02e3e9ecf700835 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_serializer_type.go @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// SerializerType : The enumeration represents types of serializers +type SerializerType string + +// List of SerializerType +const ( + JSON_SerializerType SerializerType = "JSON" + XML_SerializerType SerializerType = "XML" + PROTOBUF3_SerializerType SerializerType = "PROTOBUF3" +) diff --git a/go-packages/meep-service-mgmt-client/model_service_availability_notification.go b/go-packages/meep-service-mgmt-client/model_service_availability_notification.go new file mode 100644 index 0000000000000000000000000000000000000000..0c05c9ea9c5128ce8e7279b75b0d2500f8cbc13a --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_service_availability_notification.go @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the service availability information. +type ServiceAvailabilityNotification struct { + NotificationType string `json:"notificationType"` + ServiceReferences []ServiceAvailabilityNotificationServiceReferences `json:"serviceReferences"` + Links *Subscription `json:"_links"` +} diff --git a/go-packages/meep-service-mgmt-client/model_service_availability_notification_change_type.go b/go-packages/meep-service-mgmt-client/model_service_availability_notification_change_type.go new file mode 100644 index 0000000000000000000000000000000000000000..a247b59284f6549168ed2b11c18c2220788ce462 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_service_availability_notification_change_type.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// ServiceAvailabilityNotificationChangeType : Type of the change. Valid values: ADDED: The service was newly added. REMOVED: The service was removed. STATE_CHANGED: Only the state of the service was changed. ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state. +type ServiceAvailabilityNotificationChangeType string + +// List of ServiceAvailabilityNotification.ChangeType +const ( + ADDED_ServiceAvailabilityNotificationChangeType ServiceAvailabilityNotificationChangeType = "ADDED" + REMOVED_ServiceAvailabilityNotificationChangeType ServiceAvailabilityNotificationChangeType = "REMOVED" + STATE_CHANGED_ServiceAvailabilityNotificationChangeType ServiceAvailabilityNotificationChangeType = "STATE_CHANGED" + ATTRIBUTES_CHANGED_ServiceAvailabilityNotificationChangeType ServiceAvailabilityNotificationChangeType = "ATTRIBUTES_CHANGED" +) diff --git a/go-packages/meep-service-mgmt-client/model_service_availability_notification_service_references.go b/go-packages/meep-service-mgmt-client/model_service_availability_notification_service_references.go new file mode 100644 index 0000000000000000000000000000000000000000..0188bb44fe681af66978af6b52d62ef87479760c --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_service_availability_notification_service_references.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// List of links to services whose availability has changed. +type ServiceAvailabilityNotificationServiceReferences struct { + Link *LinkType `json:"link,omitempty"` + SerName string `json:"serName"` + SerInstanceId string `json:"serInstanceId"` + State *ServiceState `json:"state"` + ChangeType *ServiceAvailabilityNotificationChangeType `json:"changeType"` +} diff --git a/go-packages/meep-service-mgmt-client/model_service_info.go b/go-packages/meep-service-mgmt-client/model_service_info.go new file mode 100644 index 0000000000000000000000000000000000000000..1f36b58bbe9eadd96539d2466bbc871bc7bf0e47 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_service_info.go @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the general information of a MEC service. +type ServiceInfo struct { + SerInstanceId string `json:"serInstanceId,omitempty"` + SerName string `json:"serName"` + SerCategory *CategoryRef `json:"serCategory,omitempty"` + Version string `json:"version"` + State *ServiceState `json:"state"` + TransportInfo *TransportInfo `json:"transportInfo"` + Serializer *SerializerType `json:"serializer"` + ScopeOfLocality *LocalityType `json:"scopeOfLocality,omitempty"` + ConsumedLocalOnly bool `json:"consumedLocalOnly,omitempty"` + IsLocal bool `json:"isLocal,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_service_info_post.go b/go-packages/meep-service-mgmt-client/model_service_info_post.go new file mode 100644 index 0000000000000000000000000000000000000000..1ec2656cb08d4c0199a92c7a7c56a3079ea87f75 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_service_info_post.go @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the general information of a MEC service. +type ServiceInfoPost struct { + SerInstanceId string `json:"serInstanceId,omitempty"` + SerName string `json:"serName"` + SerCategory *CategoryRef `json:"serCategory,omitempty"` + Version string `json:"version"` + State *ServiceState `json:"state"` + TransportId string `json:"transportId,omitempty"` + TransportInfo *TransportInfo `json:"transportInfo,omitempty"` + Serializer *SerializerType `json:"serializer"` + ScopeOfLocality *LocalityType `json:"scopeOfLocality,omitempty"` + ConsumedLocalOnly bool `json:"consumedLocalOnly,omitempty"` + IsLocal bool `json:"isLocal,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_service_state.go b/go-packages/meep-service-mgmt-client/model_service_state.go new file mode 100644 index 0000000000000000000000000000000000000000..b9a5b38fdb2f8d4e2334e486e11ea9d6c84cdd9b --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_service_state.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// ServiceState : This enumeration defines the possible states of a service. +type ServiceState string + +// List of ServiceState +const ( + ACTIVE_ServiceState ServiceState = "ACTIVE" + INACTIVE_ServiceState ServiceState = "INACTIVE" +) diff --git a/go-packages/meep-service-mgmt-client/model_subscription.go b/go-packages/meep-service-mgmt-client/model_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..eca7a1039efd773d1d37370236202525a3f37873 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_subscription.go @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// A link to the related subscription +type Subscription struct { + Subscription *LinkType `json:"subscription"` +} diff --git a/go-packages/meep-service-mgmt-client/model_transport_info.go b/go-packages/meep-service-mgmt-client/model_transport_info.go new file mode 100644 index 0000000000000000000000000000000000000000..e19973eb82b6b59eb083b524b6968988f82ad46d --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_transport_info.go @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// This type represents the general information of a MEC service. +type TransportInfo struct { + Id string `json:"id"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Type_ *TransportType `json:"type"` + Protocol string `json:"protocol"` + Version string `json:"version"` + // This type represents information about a transport endpoint + Endpoint *OneOfTransportInfoEndpoint `json:"endpoint"` + Security *SecurityInfo `json:"security"` + ImplSpecificInfo *TransportInfoImplSpecificInfo `json:"implSpecificInfo,omitempty"` +} diff --git a/go-packages/meep-service-mgmt-client/model_transport_info_impl_specific_info.go b/go-packages/meep-service-mgmt-client/model_transport_info_impl_specific_info.go new file mode 100644 index 0000000000000000000000000000000000000000..6cd2de576f839668db0371839de2dabf7c92c044 --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_transport_info_impl_specific_info.go @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// Additional implementation specific details of the transport +type TransportInfoImplSpecificInfo struct { +} diff --git a/go-packages/meep-service-mgmt-client/model_transport_type.go b/go-packages/meep-service-mgmt-client/model_transport_type.go new file mode 100644 index 0000000000000000000000000000000000000000..05d3a44d4381faa3eb10a93f276c886dab97b83b --- /dev/null +++ b/go-packages/meep-service-mgmt-client/model_transport_type.go @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +// TransportType : The enumeration TransportType represents types of transports +type TransportType string + +// List of TransportType +const ( + REST_HTTP_TransportType TransportType = "REST_HTTP" + MB_TOPIC_BASED_TransportType TransportType = "MB_TOPIC_BASED" + MB_ROUTING_TransportType TransportType = "MB_ROUTING" + MB_PUBSUB_TransportType TransportType = "MB_PUBSUB" + RPC_TransportType TransportType = "RPC" + RPC_STREAMING_TransportType TransportType = "RPC_STREAMING" + WEBSOCKET_TransportType TransportType = "WEBSOCKET" +) diff --git a/go-packages/meep-service-mgmt-client/response.go b/go-packages/meep-service-mgmt-client/response.go new file mode 100644 index 0000000000000000000000000000000000000000..dc6367de72c9cd77b03ccab6ed066ccabc24405e --- /dev/null +++ b/go-packages/meep-service-mgmt-client/response.go @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2020 InterDigital Communications, Inc + * + * 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. + * + * AdvantEDGE MEC Service Management API + * + * The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + * + * API version: 2.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package client + +import ( + "net/http" +) + +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the swagger operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +}