openapi_LpiParameterProvision

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for openapi_LpiParameterProvision

API for Location Privacy Indication Parameters Provisioning.
© 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: 1.1.2
  • 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/oauth2
go get golang.org/x/net/context

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

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

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_LpiParameterProvision.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_LpiParameterProvision.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_LpiParameterProvision.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi_LpiParameterProvision.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://example.com/3gpp-lpi-pp/v1

Class Method HTTP request Description
IndividualLPIParametersProvisioningApi DeleteAnResource Delete /{afId}/provisionedLpis/{provisionedLpiId} Deletes an already existing LPI Parameters Provisioning resource
IndividualLPIParametersProvisioningApi FullyUpdateAnResource Put /{afId}/provisionedLpis/{provisionedLpiId} Fully updates/replaces an existing LPI Parameters Provisioning resource
IndividualLPIParametersProvisioningApi PartialUpdateAnResource Patch /{afId}/provisionedLpis/{provisionedLpiId} Partially modifies an existing LPI Parameters Provisioning resource.
IndividualLPIParametersProvisioningApi ReadAnResource Get /{afId}/provisionedLpis/{provisionedLpiId} read an active LPI Parameters Provisioning resource for the AF and the provisioned LPI Id
LPIParametersProvisioningsApi CreateNewResource Post /{afId}/provisionedLpis Creates a new LPI Parameters Provisioning resource
LPIParametersProvisioningsApi ReadAllResources Get /{afId}/provisionedLpis read all of the active LPI Parameters Provisioning resources for the AF

Documentation For Models

Documentation For Authorization

oAuth2ClientCredentials
  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

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 (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// 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 {
	IndividualLPIParametersProvisioningApi *IndividualLPIParametersProvisioningApiService

	LPIParametersProvisioningsApi *LPIParametersProvisioningsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the 3gpp-lpi-pp API v1.1.2 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 ApiCreateNewResourceRequest

type ApiCreateNewResourceRequest struct {
	ApiService *LPIParametersProvisioningsApiService
	// contains filtered or unexported fields
}

func (ApiCreateNewResourceRequest) Execute

func (ApiCreateNewResourceRequest) LpiParametersProvision

func (r ApiCreateNewResourceRequest) LpiParametersProvision(lpiParametersProvision LpiParametersProvision) ApiCreateNewResourceRequest

new resource creation

type ApiDeleteAnResourceRequest

type ApiDeleteAnResourceRequest struct {
	ApiService *IndividualLPIParametersProvisioningApiService
	// contains filtered or unexported fields
}

func (ApiDeleteAnResourceRequest) Execute

type ApiFullyUpdateAnResourceRequest

type ApiFullyUpdateAnResourceRequest struct {
	ApiService *IndividualLPIParametersProvisioningApiService
	// contains filtered or unexported fields
}

func (ApiFullyUpdateAnResourceRequest) Execute

func (ApiFullyUpdateAnResourceRequest) LpiParametersProvision

func (r ApiFullyUpdateAnResourceRequest) LpiParametersProvision(lpiParametersProvision LpiParametersProvision) ApiFullyUpdateAnResourceRequest

Parameters to update/replace the existing resource

type ApiPartialUpdateAnResourceRequest

type ApiPartialUpdateAnResourceRequest struct {
	ApiService *IndividualLPIParametersProvisioningApiService
	// contains filtered or unexported fields
}

func (ApiPartialUpdateAnResourceRequest) Execute

func (ApiPartialUpdateAnResourceRequest) LpiParametersProvisionPatch

func (r ApiPartialUpdateAnResourceRequest) LpiParametersProvisionPatch(lpiParametersProvisionPatch LpiParametersProvisionPatch) ApiPartialUpdateAnResourceRequest

Parameters to modify the existing resource.

type