openapi_M5_NetworkAssistance

package
v1.18.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

README

Go API client for openapi_M5_NetworkAssistance

5GMS AF M5 Network Assistance API © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 2.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import openapi_M5_NetworkAssistance "github.com/GIT_USER_ID/GIT_REPO_ID/openapi_M5_NetworkAssistance"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), openapi_M5_NetworkAssistance.ContextServerIndex, 1)
Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), openapi_M5_NetworkAssistance.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), openapi_M5_NetworkAssistance.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi_M5_NetworkAssistance.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://example.com/3gpp-m5/v2

Class Method HTTP request Description
DefaultApi CreateNetworkAssistanceSession Post /network-assistance/ Create a new Network Assistance Session.
DefaultApi DestroyNetworkAssistanceSession Delete /network-assistance/{naSessionId} Destroy an existing Network Assistance Session resource
DefaultApi PatchNetworkAssistanceSession Patch /network-assistance/{naSessionId} Patch an existing Network Assistance Session resource
DefaultApi RequestBitRateRecommendation Get /network-assistance/{naSessionId}/recommendation Obtain a bit rate recommendation for the next recommendation window
DefaultApi RequestDeliveryBoost Post /network-assistance/{naSessionId}/boost-request Request a delivery boost
DefaultApi RetrieveNetworkAssistanceSession Get /network-assistance/{naSessionId} Retrieve an existing Network Assistance Session resource
DefaultApi UpdateNetworkAssistanceSession Put /network-assistance/{naSessionId} Update an existing Network Assistance Session resource

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	DefaultApi *DefaultApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the M5_NetworkAssistance API v2.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *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 (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI 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:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ApiCreateNetworkAssistanceSessionRequest

type ApiCreateNetworkAssistanceSessionRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiCreateNetworkAssistanceSessionRequest) Execute

type ApiDestroyNetworkAssistanceSessionRequest

type ApiDestroyNetworkAssistanceSessionRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiDestroyNetworkAssistanceSessionRequest) Execute

type ApiPatchNetworkAssistanceSessionRequest

type ApiPatchNetworkAssistanceSessionRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiPatchNetworkAssistanceSessionRequest) Execute

func (ApiPatchNetworkAssistanceSessionRequest) NetworkAssistanceSession

A JSON patch to a Network Assistance Session resource

type ApiRequestBitRateRecommendationRequest

type ApiRequestBitRateRecommendationRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiRequestBitRateRecommendationRequest) Execute

type ApiRequestDeliveryBoostRequest

type ApiRequestDeliveryBoostRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiRequestDeliveryBoostRequest) Execute

type ApiRetrieveNetworkAssistanceSessionRequest

type ApiRetrieveNetworkAssistanceSessionRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiRetrieveNetworkAssistanceSessionRequest) Execute

type ApiUpdateNetworkAssistanceSessionRequest

type ApiUpdateNetworkAssistanceSessionRequest struct {
	ApiService *DefaultApiService
	// contains filtered or unexported fields
}

func (ApiUpdateNetworkAssistanceSessionRequest) Execute

func (ApiUpdateNetworkAssistanceSessionRequest) NetworkAssistanceSession

A replacement JSON representation of a Network Assistance Session resource

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type DefaultApiService

type DefaultApiService service

DefaultApiService DefaultApi service

func (*DefaultApiService) CreateNetworkAssistanceSession

func (a *DefaultApiService) CreateNetworkAssistanceSession(ctx context.Context) ApiCreateNetworkAssistanceSessionRequest

CreateNetworkAssistanceSession Create a new Network Assistance Session.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateNetworkAssistanceSessionRequest

func (*DefaultApiService) CreateNetworkAssistanceSessionExecute

Execute executes the request

@return NetworkAssistanceSession

func (*DefaultApiService) DestroyNetworkAssistanceSession

func (a *DefaultApiService) DestroyNetworkAssistanceSession(ctx context.Context, naSessionId string) ApiDestroyNetworkAssistanceSessionRequest

DestroyNetworkAssistanceSession Destroy an existing Network Assistance Session resource

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param naSessionId The resource identifier of an existing Network Assistance Session resource
@return ApiDestroyNetworkAssistanceSessionRequest

func (*DefaultApiService) DestroyNetworkAssistanceSessionExecute

func (a *DefaultApiService) DestroyNetworkAssistanceSessionExecute(r ApiDestroyNetworkAssistanceSessionRequest) (*http.Response, error)

Execute executes the request

func (*DefaultApiService) PatchNetworkAssistanceSession

func (a *DefaultApiService) PatchNetworkAssistanceSession(ctx context.Context, naSessionId string) ApiPatchNetworkAssistanceSessionRequest

PatchNetworkAssistanceSession Patch an existing Network Assistance Session resource

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param naSessionId The resource identifier of an existing Network Assistance Session resource
@return ApiPatchNetworkAssistanceSessionRequest

func (*DefaultApiService) PatchNetworkAssistanceSessionExecute

Execute executes the request

@return NetworkAssistanceSession

func (*DefaultApiService) RequestBitRateRecommendation

func (a *DefaultApiService) RequestBitRateRecommendation(ctx context.Context, naSessionId string) ApiRequestBitRateRecommendationRequest

RequestBitRateRecommendation Obtain a bit rate recommendation for the next recommendation window

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param naSessionId The resource identifier of an existing Network Assistance Session resource
@return ApiRequestBitRateRecommendationRequest

func (*DefaultApiService) RequestBitRateRecommendationExecute

func (a *DefaultApiService) RequestBitRateRecommendationExecute(r ApiRequestBitRateRecommendationRequest) (*M5QoSSpecification, *http.Response, error)

Execute executes the request

@return M5QoSSpecification

func (*DefaultApiService) RequestDeliveryBoost

func (a *DefaultApiService) RequestDeliveryBoost(ctx context.Context, naSessionId string) ApiRequestDeliveryBoostRequest

RequestDeliveryBoost Request a delivery boost

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param naSessionId The resource identifier of an existing Network Assistance Session resource
@return ApiRequestDeliveryBoostRequest

func (*DefaultApiService) RequestDeliveryBoostExecute

Execute executes the request

@return OperationSuccessResponse

func (*DefaultApiService) RetrieveNetworkAssistanceSession

func (a *DefaultApiService) RetrieveNetworkAssistanceSession(ctx context.Context, naSessionId string) ApiRetrieveNetworkAssistanceSessionRequest

RetrieveNetworkAssistanceSession Retrieve an existing Network Assistance Session resource

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param naSessionId The resource identifier of an existing Network Assistance Session resource
@return ApiRetrieveNetworkAssistanceSessionRequest

func (*DefaultApiService) RetrieveNetworkAssistanceSessionExecute

Execute executes the request

@return NetworkAssistanceSession

func (*DefaultApiService) UpdateNetworkAssistanceSession

func (a *DefaultApiService) UpdateNetworkAssistanceSession(ctx context.Context, naSessionId string) ApiUpdateNetworkAssistanceSessionRequest

UpdateNetworkAssistanceSession Update an existing Network Assistance Session resource

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param naSessionId The resource identifier of an existing Network Assistance Session resource
@return ApiUpdateNetworkAssistanceSessionRequest

func (*DefaultApiService) UpdateNetworkAssistanceSessionExecute

func (a *DefaultApiService) UpdateNetworkAssistanceSessionExecute(r ApiUpdateNetworkAssistanceSessionRequest) (*http.Response, error)

Execute executes the request

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type IpPacketFilterSet

type IpPacketFilterSet struct {
	SrcIp     *string `json:"srcIp,omitempty"`
	DstIp     *string `json:"dstIp,omitempty"`
	Protocol  *int32  `json:"protocol,omitempty"`
	SrcPort   *int32  `json:"srcPort,omitempty"`
	DstPort   *int32  `json:"dstPort,omitempty"`
	ToSTc     *string `json:"toSTc,omitempty"`
	FlowLabel *int32  `json:"flowLabel,omitempty"`
	Spi       *int32  `json:"spi,omitempty"`
	Direction string  `json:"direction"`
}

IpPacketFilterSet struct for IpPacketFilterSet

func NewIpPacketFilterSet

func NewIpPacketFilterSet(direction string) *IpPacketFilterSet

NewIpPacketFilterSet instantiates a new IpPacketFilterSet object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewIpPacketFilterSetWithDefaults

func NewIpPacketFilterSetWithDefaults() *IpPacketFilterSet

NewIpPacketFilterSetWithDefaults instantiates a new IpPacketFilterSet object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*IpPacketFilterSet) GetDirection

func (o *IpPacketFilterSet) GetDirection() string

GetDirection returns the Direction field value

func (*IpPacketFilterSet) GetDirectionOk

func (o *IpPacketFilterSet) GetDirectionOk() (*string, bool)

GetDirectionOk returns a tuple with the Direction field value and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetDstIp

func (o *IpPacketFilterSet) GetDstIp() string

GetDstIp returns the DstIp field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetDstIpOk

func (o *IpPacketFilterSet) GetDstIpOk() (*string, bool)

GetDstIpOk returns a tuple with the DstIp field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetDstPort

func (o *IpPacketFilterSet) GetDstPort() int32

GetDstPort returns the DstPort field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetDstPortOk

func (o *IpPacketFilterSet) GetDstPortOk() (*int32, bool)

GetDstPortOk returns a tuple with the DstPort field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetFlowLabel

func (o *IpPacketFilterSet) GetFlowLabel() int32

GetFlowLabel returns the FlowLabel field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetFlowLabelOk

func (o *IpPacketFilterSet) GetFlowLabelOk() (*int32, bool)

GetFlowLabelOk returns a tuple with the FlowLabel field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetProtocol

func (o *IpPacketFilterSet) GetProtocol() int32

GetProtocol returns the Protocol field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetProtocolOk

func (o *IpPacketFilterSet) GetProtocolOk() (*int32, bool)

GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetSpi

func (o *IpPacketFilterSet) GetSpi() int32

GetSpi returns the Spi field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetSpiOk

func (o *IpPacketFilterSet) GetSpiOk() (*int32, bool)

GetSpiOk returns a tuple with the Spi field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetSrcIp

func (o *IpPacketFilterSet) GetSrcIp() string

GetSrcIp returns the SrcIp field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetSrcIpOk

func (o *IpPacketFilterSet) GetSrcIpOk() (*string, bool)

GetSrcIpOk returns a tuple with the SrcIp field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetSrcPort

func (o *IpPacketFilterSet) GetSrcPort() int32

GetSrcPort returns the SrcPort field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetSrcPortOk

func (o *IpPacketFilterSet) GetSrcPortOk() (*int32, bool)

GetSrcPortOk returns a tuple with the SrcPort field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) GetToSTc

func (o *IpPacketFilterSet) GetToSTc() string

GetToSTc returns the ToSTc field value if set, zero value otherwise.

func (*IpPacketFilterSet) GetToSTcOk

func (o *IpPacketFilterSet) GetToSTcOk() (*string, bool)

GetToSTcOk returns a tuple with the ToSTc field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpPacketFilterSet) HasDstIp

func (o *IpPacketFilterSet) HasDstIp() bool

HasDstIp returns a boolean if a field has been set.

func (*IpPacketFilterSet) HasDstPort

func (o *IpPacketFilterSet) HasDstPort() bool

HasDstPort returns a boolean if a field has been set.

func (*IpPacketFilterSet) HasFlowLabel

func (o *IpPacketFilterSet) HasFlowLabel() bool

HasFlowLabel returns a boolean if a field has been set.

func (*IpPacketFilterSet) HasProtocol

func (o *IpPacketFilterSet) HasProtocol() bool

HasProtocol returns a boolean if a field has been set.

func (*IpPacketFilterSet) HasSpi

func (o *IpPacketFilterSet) HasSpi() bool

HasSpi returns a boolean if a field has been set.

func (*IpPacketFilterSet) HasSrcIp

func (o *IpPacketFilterSet) HasSrcIp() bool

HasSrcIp returns a boolean if a field has been set.

func (*IpPacketFilterSet)