diff --git a/apim/.gitignore b/apim/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/apim/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/apim/.openapi-generator-ignore b/apim/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/apim/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/apim/.openapi-generator/FILES b/apim/.openapi-generator/FILES new file mode 100644 index 0000000..7c4e935 --- /dev/null +++ b/apim/.openapi-generator/FILES @@ -0,0 +1,62 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_default.go +client.go +configuration.go +docs/ApimInstanceCollection.md +docs/ApimInstanceCollectionApis.md +docs/ApimInstanceCollectionAssets.md +docs/ApimInstanceDetails.md +docs/ApimInstancePatchResponse.md +docs/ApimInstancePostBody.md +docs/ApimInstancePostResponse.md +docs/Audit.md +docs/AuditCreated.md +docs/DefaultApi.md +docs/Deployment.md +docs/DeploymentPostBody.md +docs/Endpoint.md +docs/EndpointPostBody.md +docs/EndpointPostBodyTlsContexts.md +docs/EndpointPostBodyTlsContextsInbound.md +docs/EndpointTlsContexts.md +docs/EndpointTlsContextsInbound.md +docs/ErrorsResponse.md +docs/ErrorsResponseErrors.md +docs/InlineResponse404.md +docs/Routing.md +docs/RoutingRules.md +docs/RoutingUpstreams.md +docs/Spec.md +git_push.sh +go.mod +go.sum +model_apim_instance_collection.go +model_apim_instance_collection_apis.go +model_apim_instance_collection_assets.go +model_apim_instance_details.go +model_apim_instance_patch_response.go +model_apim_instance_post_body.go +model_apim_instance_post_response.go +model_audit.go +model_audit_created.go +model_deployment.go +model_deployment_post_body.go +model_endpoint.go +model_endpoint_post_body.go +model_endpoint_post_body_tls_contexts.go +model_endpoint_post_body_tls_contexts_inbound.go +model_endpoint_tls_contexts.go +model_endpoint_tls_contexts_inbound.go +model_errors_response.go +model_errors_response_errors.go +model_inline_response_404.go +model_routing.go +model_routing_rules.go +model_routing_upstreams.go +model_spec.go +response.go +utils.go diff --git a/apim/.openapi-generator/VERSION b/apim/.openapi-generator/VERSION new file mode 100644 index 0000000..acf69b4 --- /dev/null +++ b/apim/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.1.0 \ No newline at end of file diff --git a/apim/.travis.yml b/apim/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/apim/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/apim/README.md b/apim/README.md new file mode 100644 index 0000000..5c73871 --- /dev/null +++ b/apim/README.md @@ -0,0 +1,151 @@ +# Go API client for apim + +API Manager API + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import sw "./apim" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +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`. + +```golang +ctx := context.WithValue(context.Background(), sw.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`. + +```golang +ctx := context.WithValue(context.Background(), sw.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 identifield 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(), sw.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://anypoint.mulesoft.com/apimanager/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**DeleteApimInstance**](docs/DefaultApi.md#deleteapiminstance) | **Delete** /organizations/{orgId}/environments/{envId}/apis/{envApiId} | Delete a specific API Manager Instance +*DefaultApi* | [**GetApimInstanceDetails**](docs/DefaultApi.md#getapiminstancedetails) | **Get** /organizations/{orgId}/environments/{envId}/apis/{envApiId} | Retrieves a specific API Manager Instance +*DefaultApi* | [**GetEnvApimInstances**](docs/DefaultApi.md#getenvapiminstances) | **Get** /organizations/{orgId}/environments/{envId}/apis | Retrieves a collection of API Manager Instances +*DefaultApi* | [**PatchApimInstance**](docs/DefaultApi.md#patchapiminstance) | **Patch** /organizations/{orgId}/environments/{envId}/apis/{envApiId} | Patches a specific API Manager Instance +*DefaultApi* | [**PostApimInstance**](docs/DefaultApi.md#postapiminstance) | **Post** /organizations/{orgId}/environments/{envId}/apis | Creates an API Manager Instance + + +## Documentation For Models + + - [ApimInstanceCollection](docs/ApimInstanceCollection.md) + - [ApimInstanceCollectionApis](docs/ApimInstanceCollectionApis.md) + - [ApimInstanceCollectionAssets](docs/ApimInstanceCollectionAssets.md) + - [ApimInstanceDetails](docs/ApimInstanceDetails.md) + - [ApimInstancePatchResponse](docs/ApimInstancePatchResponse.md) + - [ApimInstancePostBody](docs/ApimInstancePostBody.md) + - [ApimInstancePostResponse](docs/ApimInstancePostResponse.md) + - [Audit](docs/Audit.md) + - [AuditCreated](docs/AuditCreated.md) + - [Deployment](docs/Deployment.md) + - [DeploymentPostBody](docs/DeploymentPostBody.md) + - [Endpoint](docs/Endpoint.md) + - [EndpointPostBody](docs/EndpointPostBody.md) + - [EndpointPostBodyTlsContexts](docs/EndpointPostBodyTlsContexts.md) + - [EndpointPostBodyTlsContextsInbound](docs/EndpointPostBodyTlsContextsInbound.md) + - [EndpointTlsContexts](docs/EndpointTlsContexts.md) + - [EndpointTlsContextsInbound](docs/EndpointTlsContextsInbound.md) + - [ErrorsResponse](docs/ErrorsResponse.md) + - [ErrorsResponseErrors](docs/ErrorsResponseErrors.md) + - [InlineResponse404](docs/InlineResponse404.md) + - [Routing](docs/Routing.md) + - [RoutingRules](docs/RoutingRules.md) + - [RoutingUpstreams](docs/RoutingUpstreams.md) + - [Spec](docs/Spec.md) + + +## Documentation For Authorization + + + +### bearerAuth + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING") +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 + + + diff --git a/apim/api/openapi.yaml b/apim/api/openapi.yaml new file mode 100644 index 0000000..6a643fc --- /dev/null +++ b/apim/api/openapi.yaml @@ -0,0 +1,2143 @@ +openapi: 3.0.0 +info: + description: API Manager API + title: API Manager API + version: 1.0.0 +servers: +- description: Anypoint Cloudhub + url: https://anypoint.mulesoft.com/apimanager/api/v1/ +- description: Anypoint Cloudhub EU + url: https://eu1.anypoint.mulesoft.com/apimanager/api/v1/ +- description: Anypoint Cloudhub GOV + url: https://gov.anypoint.mulesoft.com/apimanager/api/v1/ +security: +- bearerAuth: [] +paths: + /organizations/{orgId}/environments/{envId}/apis: + get: + description: Retrieves collection of API Manager Instances that meets the given + criteria. Connected Apps require the scope "View APIs Configuration" + operationId: GetEnvApimInstances + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: A string that will be checked for a partial or similar matches + of the name, description, label and tags + explode: true + in: query + name: query + required: false + schema: + type: string + style: form + - description: A string that will be checked for an exact match of the groupId + explode: true + in: query + name: groupId + required: false + schema: + type: string + style: form + - description: A string that will be checked for an exact match of the assetId + explode: true + in: query + name: assetId + required: false + schema: + type: string + style: form + - description: A string that will be checked for an exact match of the assetVersion + explode: true + in: query + name: assetVersion + required: false + schema: + type: string + style: form + - description: A string that will be checked for an exact match of the instanceLabel + explode: true + in: query + name: instanceLabel + required: false + schema: + type: string + style: form + - description: A string that will be checked for an exact match of the productVersion + explode: true + in: query + name: productVersion + required: false + schema: + type: string + style: form + - description: A string that will be checked for an exact match of the autodiscoveryInstanceName + explode: true + in: query + name: autodiscoveryInstanceName + required: false + schema: + type: string + style: form + - description: Comma-separated list of filters, which can be "active" and/or + "pinned" + explode: true + in: query + name: filters + required: false + schema: + items: + type: string + type: array + style: form + - description: Maximum number of rolegroups to retrieve per request. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The number of records to omit from the response. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Default value is name + explode: true + in: query + name: sort + required: false + schema: + enum: + - id + - name + - createdDate + - updatedDate + type: string + style: form + - description: To activate ascending sorting + explode: true + in: query + name: ascending + required: false + schema: + type: boolean + style: form + responses: + "401": + description: Access token is missing or invalid + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorsResponse' + description: Bad request response + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstanceCollection' + description: Collection of APIM Instances + summary: Retrieves a collection of API Manager Instances + post: + description: Creates an API Manager Instance in a given environment. Connected + Apps require the scope "Manage APIs Configuration". + operationId: PostApimInstance + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePostBody' + description: Post API Manager Instance Body + responses: + "401": + description: Access token is missing or invalid + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorsResponse' + description: Bad request response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePostResponse' + description: Create APIM Instance + summary: Creates an API Manager Instance + /organizations/{orgId}/environments/{envId}/apis/{envApiId}: + delete: + description: Delete a specific API Manager Instance in a specific environment + and organization. Connected Apps require the scope "Manage APIs Configuration". + operationId: DeleteApimInstance + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api manager instance id for a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + "204": + description: API Instance Delete + summary: Delete a specific API Manager Instance + get: + description: Retrieves a specific API Manager Instance for a specific environment + and organization. Connected Apps require the scope "View APIs Configuration". + operationId: GetApimInstanceDetails + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api manager instance id for a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + - description: Include the configured proxyTemplate to its associated endpoint + explode: true + in: query + name: includeProxyTemplate + required: false + schema: + type: boolean + style: form + - description: Include the configured validation to its associated endpoint + explode: true + in: query + name: includeValidation + required: false + schema: + type: boolean + style: form + - description: Include the configured TLS contexts + explode: true + in: query + name: includeTlsContexts + required: false + schema: + type: boolean + style: form + responses: + "401": + description: Access token is missing or invalid + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorsResponse' + description: Bad request response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstanceDetails' + description: API Instance + summary: Retrieves a specific API Manager Instance + patch: + description: Patches a specific API Manager Instance in a specific environment + and organization. Connected Apps require the scope "Manage APIs Configuration". + operationId: PatchApimInstance + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api manager instance id for a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + - description: Allows patching the API autodiscoveryInstanceName. You may want + to change the 'api.version' configuration on all Mule 2 & Mule 3 applications + tracking this API. + explode: true + in: query + name: force + required: false + schema: + type: boolean + style: form + - description: For APIs deployed to Flex, if endpoint proxyUri or inbound TLS + Contexts are being updated, apis in the same port are also updated + explode: true + in: query + name: updateApisInSamePort + required: false + schema: + type: boolean + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePatchBody' + description: Patch API Manager Instance Body + responses: + "401": + description: Access token is missing or invalid + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorsResponse' + description: Bad request response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePatchResponse' + description: API Instance Patch + summary: Patches a specific API Manager Instance +components: + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + content: + application/json: + schema: + $ref: '#/components/schemas/errorsResponse' + description: Bad request response + NotFoundError: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + SuccessGetApimInstanceCollection: + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstanceCollection' + description: Collection of APIM Instances + SuccessPostApimInstance: + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePostResponse' + description: Create APIM Instance + SuccessGetApimInstanceDetails: + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstanceDetails' + description: API Instance + SuccessPatchApimInstance: + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePatchResponse' + description: API Instance Patch + SuccessDeleteApimInstance: + description: API Instance Delete + schemas: + errorsResponse: + properties: + errors: + items: + $ref: '#/components/schemas/errorsResponse_errors' + type: array + title: errorsResponse + type: object + ApimInstanceCollection: + example: + total: 0 + assets: + - organizationId: organizationId + totalApis: 3 + apis: + - pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + - pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + groupId: groupId + name: name + id: 6 + exchangeAssetName: exchangeAssetName + masterOrganizationId: masterOrganizationId + autodiscoveryApiName: autodiscoveryApiName + - organizationId: organizationId + totalApis: 3 + apis: + - pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + - pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + groupId: groupId + name: name + id: 6 + exchangeAssetName: exchangeAssetName + masterOrganizationId: masterOrganizationId + autodiscoveryApiName: autodiscoveryApiName + properties: + total: + type: integer + assets: + items: + $ref: '#/components/schemas/ApimInstanceCollection_assets' + type: array + type: object + ApimInstancePostBody: + example: + routing: + - '{}' + - '{}' + endpoint: + deploymentType: deploymentType + referencesUserDomain: referencesUserDomain + muleVersion4OrAbove: true + proxyUri: proxyUri + tlsContexts: + inbound: + tlsContextId: tlsContextId + name: name + secretGroupId: secretGroupId + type: type + isCloudHub: isCloudHub + uri: uri + proxyRegistrationUri: proxyRegistrationUri + responseTimeout: responseTimeout + technology: flexGateway + instanceLabel: instanceLabel + spec: + assetId: assetId + groupId: groupId + version: version + deployment: + targetName: targetName + environmentId: environmentId + targetId: targetId + expectedStatus: expectedStatus + type: type + gatewayVersion: gatewayVersion + overwrite: true + properties: + technology: + enum: + - flexGateway + - mule3 + - mule4 + - serviceMesh + type: string + endpoint: + $ref: '#/components/schemas/EndpointPostBody' + spec: + $ref: '#/components/schemas/Spec' + routing: + items: + nullable: true + properties: + label: + type: string + rules: + properties: + methods: + type: string + host: + type: string + path: + type: string + headers: + type: object + type: object + upstreams: + properties: + weight: + type: integer + uri: + type: string + label: + type: string + type: object + type: object + nullable: true + title: RoutingPostBody + type: array + deployment: + $ref: '#/components/schemas/DeploymentPostBody' + instanceLabel: + nullable: true + type: string + title: ApimInstancePostBody + type: object + ApimInstancePostResponse: + example: + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + technology: technology + masterOrganizationId: masterOrganizationId + tags: + - tags + - tags + organizationId: organizationId + productVersion: productVersion + endpoint: + console: console + referencesUserDomain: referencesUserDomain + lastActiveDate: 2000-01-23T04:56:07.000+00:00 + apiVersionId: 5 + type: type + uri: uri + apiGatewayVersion: apiGatewayVersion + deploymentType: deploymentType + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + muleVersion4OrAbove: true + proxyUri: proxyUri + policiesVersion: policiesVersion + wsdlConfig: wsdlConfig + id: 1 + tlsContexts: + inbound: + tlsContextId: tlsContextId + authorized: true + name: name + secretGroupId: secretGroupId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + outbound: '{}' + isCloudHub: isCloudHub + proxyRegistrationUri: proxyRegistrationUri + responseTimeout: responseTimeout + validation: validation + environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + stage: stage + providerId: providerId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + assetVersion: assetVersion + instanceLabel: instanceLabel + id: 6 + order: 0 + properties: + environmentId: + format: uuid + type: string + instanceLabel: + type: string + providerId: + nullable: true + type: string + technology: + type: string + assetVersion: + type: string + productVersion: + type: string + order: + type: integer + stage: + type: string + audit: + $ref: '#/components/schemas/Audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + groupId: + type: string + assetId: + type: string + tags: + items: + type: string + type: array + endpoint: + $ref: '#/components/schemas/Endpoint' + autodiscoveryInstanceName: + type: string + type: object + ApimInstanceDetails: + example: + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: 2000-01-23T04:56:07.000+00:00 + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + endpoint: + console: console + referencesUserDomain: referencesUserDomain + lastActiveDate: 2000-01-23T04:56:07.000+00:00 + apiVersionId: 5 + type: type + uri: uri + apiGatewayVersion: apiGatewayVersion + deploymentType: deploymentType + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + muleVersion4OrAbove: true + proxyUri: proxyUri + policiesVersion: policiesVersion + wsdlConfig: wsdlConfig + id: 1 + tlsContexts: + inbound: + tlsContextId: tlsContextId + authorized: true + name: name + secretGroupId: secretGroupId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + outbound: '{}' + isCloudHub: isCloudHub + proxyRegistrationUri: proxyRegistrationUri + responseTimeout: responseTimeout + validation: validation + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 0 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 6 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + properties: + audit: + $ref: '#/components/schemas/Audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + instanceLabel: + type: string + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + productVersion: + type: string + description: + nullable: true + type: string + tags: + items: + type: string + type: array + order: + type: integer + providerId: + nullable: true + type: string + deprecated: + type: boolean + lastActiveDate: + format: date-time + nullable: true + type: string + endpointUri: + type: string + environmentId: + type: string + isPublic: + type: boolean + stage: + type: string + technology: + type: string + endpoint: + $ref: '#/components/schemas/Endpoint' + deployment: + $ref: '#/components/schemas/Deployment' + routing: + items: + $ref: '#/components/schemas/Routing' + title: RoutingCollection + type: array + status: + type: string + autodiscoveryInstanceName: + type: string + title: ApimInstanceDetails + type: object + ApimInstancePatchResponse: + example: + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + endpoint: + console: console + referencesUserDomain: referencesUserDomain + lastActiveDate: 2000-01-23T04:56:07.000+00:00 + apiVersionId: 5 + type: type + uri: uri + apiGatewayVersion: apiGatewayVersion + deploymentType: deploymentType + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + muleVersion4OrAbove: true + proxyUri: proxyUri + policiesVersion: policiesVersion + wsdlConfig: wsdlConfig + id: 1 + tlsContexts: + inbound: + tlsContextId: tlsContextId + authorized: true + name: name + secretGroupId: secretGroupId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + outbound: '{}' + isCloudHub: isCloudHub + proxyRegistrationUri: proxyRegistrationUri + responseTimeout: responseTimeout + validation: validation + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + providerId: providerId + id: 0 + instanceLabel: instanceLabel + endpointUri: endpointUri + technology: technology + masterOrganizationId: masterOrganizationId + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + properties: + audit: + $ref: '#/components/schemas/Audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + instanceLabel: + type: string + providerId: + nullable: true + type: string + endpointUri: + type: string + environmentId: + type: string + technology: + type: string + routing: + items: + $ref: '#/components/schemas/Routing' + title: RoutingCollection + type: array + endpoint: + $ref: '#/components/schemas/Endpoint' + deployment: + $ref: '#/components/schemas/Deployment' + type: object + ApimInstancePatchBody: + example: | + { + "technology": "flexGateway", + "providerId": null, + "endpoint": { + "deploymentType": "HY", + "muleVersion4OrAbove": null, + "type": "raml", + "isCloudHub": null, + "proxyUri": "https://0.0.0.0:8082/", + "referencesUserDomain": null, + "responseTimeout": null, + "tlsContexts": null + }, + "spec": { + "assetId": "flex-backend-app-test", + "groupId": "aa1f55d6-213d-4f60-845c-207286484cd1", + "version": "1.0.0" + }, + "instanceLabel": "instance Label", + "routing": [ + { + "upstreams": [ + { + "weight": 100, + "id": "dc1e2a8b-36b2-402f-8200-d587ef8c5282" + } + ], + "label": "Route 01", + "rules": { + "methods": "GET|PUT|DELETE|OPTIONS|POST|PATCH|HEAD|TRACE|CONNECT", + "host": "myhost2.com", + "path": "/api/(.*)", + "headers": { + "x-correlation-id": "1212", + "x-example": "hello" + } + } + } + ], + "deployment": { + "environmentId": "7074fcdd-9b23-4ab3-97c8-5db5f4adf17d", + "type": "HY", + "expectedStatus": "deployed", + "overwrite": false, + "targetId": "c33dac89-4ca6-4951-9ad5-19ace129029e", + "targetName": "sbo-gateway", + "gatewayVersion": "1.0.0" + } + } + title: ApimInstancePatchBody + type: object + Endpoint: + example: + console: console + referencesUserDomain: referencesUserDomain + lastActiveDate: 2000-01-23T04:56:07.000+00:00 + apiVersionId: 5 + type: type + uri: uri + apiGatewayVersion: apiGatewayVersion + deploymentType: deploymentType + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + muleVersion4OrAbove: true + proxyUri: proxyUri + policiesVersion: policiesVersion + wsdlConfig: wsdlConfig + id: 1 + tlsContexts: + inbound: + tlsContextId: tlsContextId + authorized: true + name: name + secretGroupId: secretGroupId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + outbound: '{}' + isCloudHub: isCloudHub + proxyRegistrationUri: proxyRegistrationUri + responseTimeout: responseTimeout + validation: validation + properties: + audit: + $ref: '#/components/schemas/Audit' + id: + type: integer + type: + nullable: true + type: string + uri: + nullable: true + type: string + apiGatewayVersion: + nullable: true + type: string + proxyUri: + nullable: true + type: string + proxyRegistrationUri: + nullable: true + type: string + lastActiveDate: + format: date-time + nullable: true + type: string + isCloudHub: + nullable: true + type: string + deploymentType: + type: string + policiesVersion: + nullable: true + type: string + referencesUserDomain: + nullable: true + type: string + responseTimeout: + nullable: true + type: string + wsdlConfig: + nullable: true + type: string + muleVersion4OrAbove: + nullable: true + type: boolean + apiVersionId: + type: integer + validation: + nullable: true + type: string + console: + nullable: true + type: string + tlsContexts: + $ref: '#/components/schemas/Endpoint_tlsContexts' + title: Endpoint + type: object + EndpointPostBody: + example: + deploymentType: deploymentType + referencesUserDomain: referencesUserDomain + muleVersion4OrAbove: true + proxyUri: proxyUri + tlsContexts: + inbound: + tlsContextId: tlsContextId + name: name + secretGroupId: secretGroupId + type: type + isCloudHub: isCloudHub + uri: uri + proxyRegistrationUri: proxyRegistrationUri + responseTimeout: responseTimeout + nullable: true + properties: + deploymentType: + type: string + muleVersion4OrAbove: + type: boolean + uri: + type: string + type: + type: string + isCloudHub: + nullable: true + type: string + proxyUri: + nullable: true + type: string + proxyRegistrationUri: + nullable: true + type: string + referencesUserDomain: + nullable: true + type: string + responseTimeout: + nullable: true + type: string + tlsContexts: + $ref: '#/components/schemas/EndpointPostBody_tlsContexts' + title: EndpointPostBody + type: object + Spec: + example: + assetId: assetId + groupId: groupId + version: version + properties: + assetId: + type: string + groupId: + type: string + version: + type: string + title: Spec + type: object + Audit: + example: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + properties: + created: + $ref: '#/components/schemas/Audit_created' + updated: + $ref: '#/components/schemas/Audit_created' + title: Audit + type: object + Deployment: + example: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + nullable: true + properties: + audit: + $ref: '#/components/schemas/Audit' + id: + type: integer + applicationId: + type: string + applicationName: + nullable: true + type: string + gatewayVersion: + nullable: true + type: string + environmentName: + nullable: true + type: string + environmentId: + nullable: true + type: string + targetId: + type: string + targetName: + type: string + deploymentId: + nullable: true + type: string + updatedDate: + format: date-time + type: string + type: + type: string + expectedStatus: + type: string + apiId: + type: integer + title: Deployment + type: object + DeploymentPostBody: + example: + targetName: targetName + environmentId: environmentId + targetId: targetId + expectedStatus: expectedStatus + type: type + gatewayVersion: gatewayVersion + overwrite: true + nullable: true + properties: + environmentId: + type: string + type: + type: string + expectedStatus: + type: string + overwrite: + type: boolean + targetId: + type: string + targetName: + type: string + gatewayVersion: + type: string + title: DeploymentPostBody + type: object + Routing: + example: + upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + nullable: true + properties: + label: + type: string + rules: + $ref: '#/components/schemas/Routing_rules' + upstreams: + items: + $ref: '#/components/schemas/Routing_upstreams' + type: array + title: Routing + type: object + RoutingCollection: + items: + $ref: '#/components/schemas/Routing' + title: RoutingCollection + type: array + RoutingPostBody: + items: + nullable: true + properties: + label: + type: string + rules: + properties: + methods: + type: string + host: + type: string + path: + type: string + headers: + type: object + type: object + upstreams: + properties: + weight: + type: integer + uri: + type: string + label: + type: string + type: object + type: object + nullable: true + title: RoutingPostBody + type: array + inline_response_404: + properties: + name: + type: string + message: + type: string + type: object + errorsResponse_errors: + properties: + type: + title: type + type: string + dataPath: + title: dataPath + type: string + keyword: + title: keyword + type: string + schema: + title: schema + type: string + data: + title: data + type: string + message: + title: message + type: string + type: object + ApimInstanceCollection_apis: + example: + pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + properties: + audit: + $ref: '#/components/schemas/Audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + instanceLabel: + type: string + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + productVersion: + type: string + description: + type: string + tags: + items: + type: string + type: array + order: + type: integer + providerId: + type: string + deprecated: + type: boolean + lastActiveDate: + type: string + endpointUri: + type: string + environmentId: + type: string + isPublic: + type: boolean + stage: + type: string + technology: + type: string + status: + type: string + deployment: + $ref: '#/components/schemas/Deployment' + routing: + items: + $ref: '#/components/schemas/Routing' + title: RoutingCollection + type: array + pinned: + type: boolean + activeContractsCount: + type: integer + autodiscoveryInstanceName: + type: string + type: object + ApimInstanceCollection_assets: + example: + organizationId: organizationId + totalApis: 3 + apis: + - pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + - pinned: true + autodiscoveryInstanceName: autodiscoveryInstanceName + groupId: groupId + deprecated: true + description: description + lastActiveDate: lastActiveDate + masterOrganizationId: masterOrganizationId + organizationId: organizationId + routing: + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + - upstreams: + - weight: 7 + id: id + label: label + uri: uri + - weight: 7 + id: id + label: label + uri: uri + rules: + path: path + headers: '{}' + methods: methods + host: host + label: label + productVersion: productVersion + activeContractsCount: 9 + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + providerId: providerId + isPublic: true + id: 1 + instanceLabel: instanceLabel + endpointUri: endpointUri + order: 5 + deployment: + targetName: targetName + targetId: targetId + expectedStatus: expectedStatus + updatedDate: 2000-01-23T04:56:07.000+00:00 + type: type + environmentId: environmentId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + environmentName: environmentName + deploymentId: deploymentId + id: 5 + applicationId: applicationId + gatewayVersion: gatewayVersion + applicationName: applicationName + apiId: 2 + technology: technology + tags: + - tags + - tags + stage: stage + assetVersion: assetVersion + status: status + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + assetId: assetId + groupId: groupId + name: name + id: 6 + exchangeAssetName: exchangeAssetName + masterOrganizationId: masterOrganizationId + autodiscoveryApiName: autodiscoveryApiName + properties: + audit: + $ref: '#/components/schemas/Audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + name: + type: string + exchangeAssetName: + type: string + groupId: + type: string + assetId: + type: string + apis: + items: + $ref: '#/components/schemas/ApimInstanceCollection_apis' + type: array + totalApis: + type: integer + autodiscoveryApiName: + type: string + type: object + Endpoint_tlsContexts_inbound: + example: + tlsContextId: tlsContextId + authorized: true + name: name + secretGroupId: secretGroupId + nullable: true + properties: + secretGroupId: + type: string + tlsContextId: + type: string + name: + type: string + authorized: + type: boolean + type: object + Endpoint_tlsContexts: + example: + inbound: + tlsContextId: tlsContextId + authorized: true + name: name + secretGroupId: secretGroupId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + outbound: '{}' + properties: + audit: + $ref: '#/components/schemas/Audit' + inbound: + $ref: '#/components/schemas/Endpoint_tlsContexts_inbound' + outbound: + nullable: true + type: object + type: object + EndpointPostBody_tlsContexts_inbound: + example: + tlsContextId: tlsContextId + name: name + secretGroupId: secretGroupId + nullable: true + properties: + tlsContextId: + type: string + secretGroupId: + type: string + name: + type: string + type: object + EndpointPostBody_tlsContexts: + example: + inbound: + tlsContextId: tlsContextId + name: name + secretGroupId: secretGroupId + nullable: true + properties: + inbound: + $ref: '#/components/schemas/EndpointPostBody_tlsContexts_inbound' + type: object + Audit_created: + example: + date: 2000-01-23T04:56:07.000+00:00 + properties: + date: + format: date-time + type: string + type: object + Routing_rules: + example: + path: path + headers: '{}' + methods: methods + host: host + properties: + methods: + type: string + host: + type: string + path: + type: string + headers: + type: object + type: object + Routing_upstreams: + example: + weight: 7 + id: id + label: label + uri: uri + properties: + id: + type: string + weight: + type: integer + uri: + type: string + label: + type: string + type: object + securitySchemes: + bearerAuth: + bearerFormat: JWT + scheme: bearer + type: http diff --git a/apim/api_default.go b/apim/api_default.go new file mode 100644 index 0000000..162c474 --- /dev/null +++ b/apim/api_default.go @@ -0,0 +1,808 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "strings" + "reflect" +) + +// Linger please +var ( + _ _context.Context +) + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type DefaultApiApiDeleteApimInstanceRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string +} + + +func (r DefaultApiApiDeleteApimInstanceRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteApimInstanceExecute(r) +} + +/* + * DeleteApimInstance Delete a specific API Manager Instance + * Delete a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api manager instance id for a given environment + * @return DefaultApiApiDeleteApimInstanceRequest + */ +func (a *DefaultApiService) DeleteApimInstance(ctx _context.Context, orgId string, envId string, envApiId string) DefaultApiApiDeleteApimInstanceRequest { + return DefaultApiApiDeleteApimInstanceRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + } +} + +/* + * Execute executes the request + */ +func (a *DefaultApiService) DeleteApimInstanceExecute(r DefaultApiApiDeleteApimInstanceRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteApimInstance") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse404 + 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 +} + +type DefaultApiApiGetApimInstanceDetailsRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string + includeProxyTemplate *bool + includeValidation *bool + includeTlsContexts *bool +} + +func (r DefaultApiApiGetApimInstanceDetailsRequest) IncludeProxyTemplate(includeProxyTemplate bool) DefaultApiApiGetApimInstanceDetailsRequest { + r.includeProxyTemplate = &includeProxyTemplate + return r +} +func (r DefaultApiApiGetApimInstanceDetailsRequest) IncludeValidation(includeValidation bool) DefaultApiApiGetApimInstanceDetailsRequest { + r.includeValidation = &includeValidation + return r +} +func (r DefaultApiApiGetApimInstanceDetailsRequest) IncludeTlsContexts(includeTlsContexts bool) DefaultApiApiGetApimInstanceDetailsRequest { + r.includeTlsContexts = &includeTlsContexts + return r +} + +func (r DefaultApiApiGetApimInstanceDetailsRequest) Execute() (ApimInstanceDetails, *_nethttp.Response, error) { + return r.ApiService.GetApimInstanceDetailsExecute(r) +} + +/* + * GetApimInstanceDetails Retrieves a specific API Manager Instance + * Retrieves a specific API Manager Instance for a specific environment and organization. Connected Apps require the scope "View APIs Configuration". + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api manager instance id for a given environment + * @return DefaultApiApiGetApimInstanceDetailsRequest + */ +func (a *DefaultApiService) GetApimInstanceDetails(ctx _context.Context, orgId string, envId string, envApiId string) DefaultApiApiGetApimInstanceDetailsRequest { + return DefaultApiApiGetApimInstanceDetailsRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + } +} + +/* + * Execute executes the request + * @return ApimInstanceDetails + */ +func (a *DefaultApiService) GetApimInstanceDetailsExecute(r DefaultApiApiGetApimInstanceDetailsRequest) (ApimInstanceDetails, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApimInstanceDetails + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApimInstanceDetails") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.includeProxyTemplate != nil { + localVarQueryParams.Add("includeProxyTemplate", parameterToString(*r.includeProxyTemplate, "")) + } + if r.includeValidation != nil { + localVarQueryParams.Add("includeValidation", parameterToString(*r.includeValidation, "")) + } + if r.includeTlsContexts != nil { + localVarQueryParams.Add("includeTlsContexts", parameterToString(*r.includeTlsContexts, "")) + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorsResponse + 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 InlineResponse404 + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiGetEnvApimInstancesRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + query *string + groupId *string + assetId *string + assetVersion *string + instanceLabel *string + productVersion *string + autodiscoveryInstanceName *string + filters *[]string + limit *int32 + offset *int32 + sort *string + ascending *bool +} + +func (r DefaultApiApiGetEnvApimInstancesRequest) Query(query string) DefaultApiApiGetEnvApimInstancesRequest { + r.query = &query + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) GroupId(groupId string) DefaultApiApiGetEnvApimInstancesRequest { + r.groupId = &groupId + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) AssetId(assetId string) DefaultApiApiGetEnvApimInstancesRequest { + r.assetId = &assetId + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) AssetVersion(assetVersion string) DefaultApiApiGetEnvApimInstancesRequest { + r.assetVersion = &assetVersion + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) InstanceLabel(instanceLabel string) DefaultApiApiGetEnvApimInstancesRequest { + r.instanceLabel = &instanceLabel + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) ProductVersion(productVersion string) DefaultApiApiGetEnvApimInstancesRequest { + r.productVersion = &productVersion + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) AutodiscoveryInstanceName(autodiscoveryInstanceName string) DefaultApiApiGetEnvApimInstancesRequest { + r.autodiscoveryInstanceName = &autodiscoveryInstanceName + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) Filters(filters []string) DefaultApiApiGetEnvApimInstancesRequest { + r.filters = &filters + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) Limit(limit int32) DefaultApiApiGetEnvApimInstancesRequest { + r.limit = &limit + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) Offset(offset int32) DefaultApiApiGetEnvApimInstancesRequest { + r.offset = &offset + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) Sort(sort string) DefaultApiApiGetEnvApimInstancesRequest { + r.sort = &sort + return r +} +func (r DefaultApiApiGetEnvApimInstancesRequest) Ascending(ascending bool) DefaultApiApiGetEnvApimInstancesRequest { + r.ascending = &ascending + return r +} + +func (r DefaultApiApiGetEnvApimInstancesRequest) Execute() (ApimInstanceCollection, *_nethttp.Response, error) { + return r.ApiService.GetEnvApimInstancesExecute(r) +} + +/* + * GetEnvApimInstances Retrieves a collection of API Manager Instances + * Retrieves collection of API Manager Instances that meets the given criteria. Connected Apps require the scope "View APIs Configuration" + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @return DefaultApiApiGetEnvApimInstancesRequest + */ +func (a *DefaultApiService) GetEnvApimInstances(ctx _context.Context, orgId string, envId string) DefaultApiApiGetEnvApimInstancesRequest { + return DefaultApiApiGetEnvApimInstancesRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + } +} + +/* + * Execute executes the request + * @return ApimInstanceCollection + */ +func (a *DefaultApiService) GetEnvApimInstancesExecute(r DefaultApiApiGetEnvApimInstancesRequest) (ApimInstanceCollection, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApimInstanceCollection + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetEnvApimInstances") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.query != nil { + localVarQueryParams.Add("query", parameterToString(*r.query, "")) + } + if r.groupId != nil { + localVarQueryParams.Add("groupId", parameterToString(*r.groupId, "")) + } + if r.assetId != nil { + localVarQueryParams.Add("assetId", parameterToString(*r.assetId, "")) + } + if r.assetVersion != nil { + localVarQueryParams.Add("assetVersion", parameterToString(*r.assetVersion, "")) + } + if r.instanceLabel != nil { + localVarQueryParams.Add("instanceLabel", parameterToString(*r.instanceLabel, "")) + } + if r.productVersion != nil { + localVarQueryParams.Add("productVersion", parameterToString(*r.productVersion, "")) + } + if r.autodiscoveryInstanceName != nil { + localVarQueryParams.Add("autodiscoveryInstanceName", parameterToString(*r.autodiscoveryInstanceName, "")) + } + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters", parameterToString(t, "multi")) + } + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.ascending != nil { + localVarQueryParams.Add("ascending", parameterToString(*r.ascending, "")) + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorsResponse + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiPatchApimInstanceRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string + force *bool + updateApisInSamePort *bool + body *map[string]interface{} +} + +func (r DefaultApiApiPatchApimInstanceRequest) Force(force bool) DefaultApiApiPatchApimInstanceRequest { + r.force = &force + return r +} +func (r DefaultApiApiPatchApimInstanceRequest) UpdateApisInSamePort(updateApisInSamePort bool) DefaultApiApiPatchApimInstanceRequest { + r.updateApisInSamePort = &updateApisInSamePort + return r +} +func (r DefaultApiApiPatchApimInstanceRequest) Body(body map[string]interface{}) DefaultApiApiPatchApimInstanceRequest { + r.body = &body + return r +} + +func (r DefaultApiApiPatchApimInstanceRequest) Execute() (ApimInstancePatchResponse, *_nethttp.Response, error) { + return r.ApiService.PatchApimInstanceExecute(r) +} + +/* + * PatchApimInstance Patches a specific API Manager Instance + * Patches a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api manager instance id for a given environment + * @return DefaultApiApiPatchApimInstanceRequest + */ +func (a *DefaultApiService) PatchApimInstance(ctx _context.Context, orgId string, envId string, envApiId string) DefaultApiApiPatchApimInstanceRequest { + return DefaultApiApiPatchApimInstanceRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + } +} + +/* + * Execute executes the request + * @return ApimInstancePatchResponse + */ +func (a *DefaultApiService) PatchApimInstanceExecute(r DefaultApiApiPatchApimInstanceRequest) (ApimInstancePatchResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApimInstancePatchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PatchApimInstance") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.force != nil { + localVarQueryParams.Add("force", parameterToString(*r.force, "")) + } + if r.updateApisInSamePort != nil { + localVarQueryParams.Add("updateApisInSamePort", parameterToString(*r.updateApisInSamePort, "")) + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorsResponse + 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 InlineResponse404 + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiPostApimInstanceRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + apimInstancePostBody *ApimInstancePostBody +} + +func (r DefaultApiApiPostApimInstanceRequest) ApimInstancePostBody(apimInstancePostBody ApimInstancePostBody) DefaultApiApiPostApimInstanceRequest { + r.apimInstancePostBody = &apimInstancePostBody + return r +} + +func (r DefaultApiApiPostApimInstanceRequest) Execute() (ApimInstancePostResponse, *_nethttp.Response, error) { + return r.ApiService.PostApimInstanceExecute(r) +} + +/* + * PostApimInstance Creates an API Manager Instance + * Creates an API Manager Instance in a given environment. Connected Apps require the scope "Manage APIs Configuration". + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @return DefaultApiApiPostApimInstanceRequest + */ +func (a *DefaultApiService) PostApimInstance(ctx _context.Context, orgId string, envId string) DefaultApiApiPostApimInstanceRequest { + return DefaultApiApiPostApimInstanceRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + } +} + +/* + * Execute executes the request + * @return ApimInstancePostResponse + */ +func (a *DefaultApiService) PostApimInstanceExecute(r DefaultApiApiPostApimInstanceRequest) (ApimInstancePostResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApimInstancePostResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PostApimInstance") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.apimInstancePostBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorsResponse + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/apim/client.go b/apim/client.go new file mode 100644 index 0000000..b880c89 --- /dev/null +++ b/apim/client.go @@ -0,0 +1,535 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the API Manager API API v1.0.0 +// 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 + + DefaultApi *DefaultApiService +} + +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.DefaultApi = (*DefaultApiService)(&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), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +// 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, + formFileName string, + 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 strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && 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(formFileName, 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() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // 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 + } + + // 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 len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + 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 fp, ok := body.(**os.File); ok { + _, err = bodyBuf.ReadFrom(*fp) + } 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) { + err = 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 + } else { + 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) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/apim/configuration.go b/apim/configuration.go new file mode 100644 index 0000000..e381e31 --- /dev/null +++ b/apim/configuration.go @@ -0,0 +1,238 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// 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 an 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") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + // 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") +) + +// 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 +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +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 +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://anypoint.mulesoft.com/apimanager/api/v1", + Description: "Anypoint Cloudhub", + }, + { + URL: "https://eu1.anypoint.mulesoft.com/apimanager/api/v1", + Description: "Anypoint Cloudhub EU", + }, + { + URL: "https://gov.anypoint.mulesoft.com/apimanager/api/v1", + Description: "Anypoint Cloudhub GOV", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/apim/docs/ApimInstanceCollection.md b/apim/docs/ApimInstanceCollection.md new file mode 100644 index 0000000..43ee48e --- /dev/null +++ b/apim/docs/ApimInstanceCollection.md @@ -0,0 +1,82 @@ +# ApimInstanceCollection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **int32** | | [optional] +**Assets** | Pointer to [**[]ApimInstanceCollectionAssets**](ApimInstanceCollectionAssets.md) | | [optional] + +## Methods + +### NewApimInstanceCollection + +`func NewApimInstanceCollection() *ApimInstanceCollection` + +NewApimInstanceCollection instantiates a new ApimInstanceCollection 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 + +### NewApimInstanceCollectionWithDefaults + +`func NewApimInstanceCollectionWithDefaults() *ApimInstanceCollection` + +NewApimInstanceCollectionWithDefaults instantiates a new ApimInstanceCollection 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 + +### GetTotal + +`func (o *ApimInstanceCollection) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ApimInstanceCollection) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *ApimInstanceCollection) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *ApimInstanceCollection) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetAssets + +`func (o *ApimInstanceCollection) GetAssets() []ApimInstanceCollectionAssets` + +GetAssets returns the Assets field if non-nil, zero value otherwise. + +### GetAssetsOk + +`func (o *ApimInstanceCollection) GetAssetsOk() (*[]ApimInstanceCollectionAssets, bool)` + +GetAssetsOk returns a tuple with the Assets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssets + +`func (o *ApimInstanceCollection) SetAssets(v []ApimInstanceCollectionAssets)` + +SetAssets sets Assets field to given value. + +### HasAssets + +`func (o *ApimInstanceCollection) HasAssets() bool` + +HasAssets returns a boolean if a field has been set. + + +[[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/apim/docs/ApimInstanceCollectionApis.md b/apim/docs/ApimInstanceCollectionApis.md new file mode 100644 index 0000000..65cb1dc --- /dev/null +++ b/apim/docs/ApimInstanceCollectionApis.md @@ -0,0 +1,716 @@ +# ApimInstanceCollectionApis + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**MasterOrganizationId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] +**InstanceLabel** | Pointer to **string** | | [optional] +**GroupId** | Pointer to **string** | | [optional] +**AssetId** | Pointer to **string** | | [optional] +**AssetVersion** | Pointer to **string** | | [optional] +**ProductVersion** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Order** | Pointer to **int32** | | [optional] +**ProviderId** | Pointer to **string** | | [optional] +**Deprecated** | Pointer to **bool** | | [optional] +**LastActiveDate** | Pointer to **string** | | [optional] +**EndpointUri** | Pointer to **string** | | [optional] +**EnvironmentId** | Pointer to **string** | | [optional] +**IsPublic** | Pointer to **bool** | | [optional] +**Stage** | Pointer to **string** | | [optional] +**Technology** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Deployment** | Pointer to [**NullableDeployment**](Deployment.md) | | [optional] +**Routing** | Pointer to [**[]Routing**](Routing.md) | | [optional] +**Pinned** | Pointer to **bool** | | [optional] +**ActiveContractsCount** | Pointer to **int32** | | [optional] +**AutodiscoveryInstanceName** | Pointer to **string** | | [optional] + +## Methods + +### NewApimInstanceCollectionApis + +`func NewApimInstanceCollectionApis() *ApimInstanceCollectionApis` + +NewApimInstanceCollectionApis instantiates a new ApimInstanceCollectionApis 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 + +### NewApimInstanceCollectionApisWithDefaults + +`func NewApimInstanceCollectionApisWithDefaults() *ApimInstanceCollectionApis` + +NewApimInstanceCollectionApisWithDefaults instantiates a new ApimInstanceCollectionApis 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 + +### GetAudit + +`func (o *ApimInstanceCollectionApis) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *ApimInstanceCollectionApis) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *ApimInstanceCollectionApis) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *ApimInstanceCollectionApis) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetMasterOrganizationId + +`func (o *ApimInstanceCollectionApis) GetMasterOrganizationId() string` + +GetMasterOrganizationId returns the MasterOrganizationId field if non-nil, zero value otherwise. + +### GetMasterOrganizationIdOk + +`func (o *ApimInstanceCollectionApis) GetMasterOrganizationIdOk() (*string, bool)` + +GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterOrganizationId + +`func (o *ApimInstanceCollectionApis) SetMasterOrganizationId(v string)` + +SetMasterOrganizationId sets MasterOrganizationId field to given value. + +### HasMasterOrganizationId + +`func (o *ApimInstanceCollectionApis) HasMasterOrganizationId() bool` + +HasMasterOrganizationId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ApimInstanceCollectionApis) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ApimInstanceCollectionApis) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ApimInstanceCollectionApis) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *ApimInstanceCollectionApis) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *ApimInstanceCollectionApis) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApimInstanceCollectionApis) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ApimInstanceCollectionApis) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApimInstanceCollectionApis) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetInstanceLabel + +`func (o *ApimInstanceCollectionApis) GetInstanceLabel() string` + +GetInstanceLabel returns the InstanceLabel field if non-nil, zero value otherwise. + +### GetInstanceLabelOk + +`func (o *ApimInstanceCollectionApis) GetInstanceLabelOk() (*string, bool)` + +GetInstanceLabelOk returns a tuple with the InstanceLabel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceLabel + +`func (o *ApimInstanceCollectionApis) SetInstanceLabel(v string)` + +SetInstanceLabel sets InstanceLabel field to given value. + +### HasInstanceLabel + +`func (o *ApimInstanceCollectionApis) HasInstanceLabel() bool` + +HasInstanceLabel returns a boolean if a field has been set. + +### GetGroupId + +`func (o *ApimInstanceCollectionApis) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *ApimInstanceCollectionApis) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *ApimInstanceCollectionApis) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *ApimInstanceCollectionApis) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetAssetId + +`func (o *ApimInstanceCollectionApis) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *ApimInstanceCollectionApis) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *ApimInstanceCollectionApis) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *ApimInstanceCollectionApis) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetAssetVersion + +`func (o *ApimInstanceCollectionApis) GetAssetVersion() string` + +GetAssetVersion returns the AssetVersion field if non-nil, zero value otherwise. + +### GetAssetVersionOk + +`func (o *ApimInstanceCollectionApis) GetAssetVersionOk() (*string, bool)` + +GetAssetVersionOk returns a tuple with the AssetVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetVersion + +`func (o *ApimInstanceCollectionApis) SetAssetVersion(v string)` + +SetAssetVersion sets AssetVersion field to given value. + +### HasAssetVersion + +`func (o *ApimInstanceCollectionApis) HasAssetVersion() bool` + +HasAssetVersion returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *ApimInstanceCollectionApis) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *ApimInstanceCollectionApis) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *ApimInstanceCollectionApis) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *ApimInstanceCollectionApis) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### GetDescription + +`func (o *ApimInstanceCollectionApis) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ApimInstanceCollectionApis) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ApimInstanceCollectionApis) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ApimInstanceCollectionApis) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetTags + +`func (o *ApimInstanceCollectionApis) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ApimInstanceCollectionApis) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ApimInstanceCollectionApis) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ApimInstanceCollectionApis) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetOrder + +`func (o *ApimInstanceCollectionApis) GetOrder() int32` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ApimInstanceCollectionApis) GetOrderOk() (*int32, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ApimInstanceCollectionApis) SetOrder(v int32)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *ApimInstanceCollectionApis) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetProviderId + +`func (o *ApimInstanceCollectionApis) GetProviderId() string` + +GetProviderId returns the ProviderId field if non-nil, zero value otherwise. + +### GetProviderIdOk + +`func (o *ApimInstanceCollectionApis) GetProviderIdOk() (*string, bool)` + +GetProviderIdOk returns a tuple with the ProviderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProviderId + +`func (o *ApimInstanceCollectionApis) SetProviderId(v string)` + +SetProviderId sets ProviderId field to given value. + +### HasProviderId + +`func (o *ApimInstanceCollectionApis) HasProviderId() bool` + +HasProviderId returns a boolean if a field has been set. + +### GetDeprecated + +`func (o *ApimInstanceCollectionApis) GetDeprecated() bool` + +GetDeprecated returns the Deprecated field if non-nil, zero value otherwise. + +### GetDeprecatedOk + +`func (o *ApimInstanceCollectionApis) GetDeprecatedOk() (*bool, bool)` + +GetDeprecatedOk returns a tuple with the Deprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeprecated + +`func (o *ApimInstanceCollectionApis) SetDeprecated(v bool)` + +SetDeprecated sets Deprecated field to given value. + +### HasDeprecated + +`func (o *ApimInstanceCollectionApis) HasDeprecated() bool` + +HasDeprecated returns a boolean if a field has been set. + +### GetLastActiveDate + +`func (o *ApimInstanceCollectionApis) GetLastActiveDate() string` + +GetLastActiveDate returns the LastActiveDate field if non-nil, zero value otherwise. + +### GetLastActiveDateOk + +`func (o *ApimInstanceCollectionApis) GetLastActiveDateOk() (*string, bool)` + +GetLastActiveDateOk returns a tuple with the LastActiveDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastActiveDate + +`func (o *ApimInstanceCollectionApis) SetLastActiveDate(v string)` + +SetLastActiveDate sets LastActiveDate field to given value. + +### HasLastActiveDate + +`func (o *ApimInstanceCollectionApis) HasLastActiveDate() bool` + +HasLastActiveDate returns a boolean if a field has been set. + +### GetEndpointUri + +`func (o *ApimInstanceCollectionApis) GetEndpointUri() string` + +GetEndpointUri returns the EndpointUri field if non-nil, zero value otherwise. + +### GetEndpointUriOk + +`func (o *ApimInstanceCollectionApis) GetEndpointUriOk() (*string, bool)` + +GetEndpointUriOk returns a tuple with the EndpointUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpointUri + +`func (o *ApimInstanceCollectionApis) SetEndpointUri(v string)` + +SetEndpointUri sets EndpointUri field to given value. + +### HasEndpointUri + +`func (o *ApimInstanceCollectionApis) HasEndpointUri() bool` + +HasEndpointUri returns a boolean if a field has been set. + +### GetEnvironmentId + +`func (o *ApimInstanceCollectionApis) GetEnvironmentId() string` + +GetEnvironmentId returns the EnvironmentId field if non-nil, zero value otherwise. + +### GetEnvironmentIdOk + +`func (o *ApimInstanceCollectionApis) GetEnvironmentIdOk() (*string, bool)` + +GetEnvironmentIdOk returns a tuple with the EnvironmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentId + +`func (o *ApimInstanceCollectionApis) SetEnvironmentId(v string)` + +SetEnvironmentId sets EnvironmentId field to given value. + +### HasEnvironmentId + +`func (o *ApimInstanceCollectionApis) HasEnvironmentId() bool` + +HasEnvironmentId returns a boolean if a field has been set. + +### GetIsPublic + +`func (o *ApimInstanceCollectionApis) GetIsPublic() bool` + +GetIsPublic returns the IsPublic field if non-nil, zero value otherwise. + +### GetIsPublicOk + +`func (o *ApimInstanceCollectionApis) GetIsPublicOk() (*bool, bool)` + +GetIsPublicOk returns a tuple with the IsPublic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPublic + +`func (o *ApimInstanceCollectionApis) SetIsPublic(v bool)` + +SetIsPublic sets IsPublic field to given value. + +### HasIsPublic + +`func (o *ApimInstanceCollectionApis) HasIsPublic() bool` + +HasIsPublic returns a boolean if a field has been set. + +### GetStage + +`func (o *ApimInstanceCollectionApis) GetStage() string` + +GetStage returns the Stage field if non-nil, zero value otherwise. + +### GetStageOk + +`func (o *ApimInstanceCollectionApis) GetStageOk() (*string, bool)` + +GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStage + +`func (o *ApimInstanceCollectionApis) SetStage(v string)` + +SetStage sets Stage field to given value. + +### HasStage + +`func (o *ApimInstanceCollectionApis) HasStage() bool` + +HasStage returns a boolean if a field has been set. + +### GetTechnology + +`func (o *ApimInstanceCollectionApis) GetTechnology() string` + +GetTechnology returns the Technology field if non-nil, zero value otherwise. + +### GetTechnologyOk + +`func (o *ApimInstanceCollectionApis) GetTechnologyOk() (*string, bool)` + +GetTechnologyOk returns a tuple with the Technology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTechnology + +`func (o *ApimInstanceCollectionApis) SetTechnology(v string)` + +SetTechnology sets Technology field to given value. + +### HasTechnology + +`func (o *ApimInstanceCollectionApis) HasTechnology() bool` + +HasTechnology returns a boolean if a field has been set. + +### GetStatus + +`func (o *ApimInstanceCollectionApis) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ApimInstanceCollectionApis) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ApimInstanceCollectionApis) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ApimInstanceCollectionApis) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDeployment + +`func (o *ApimInstanceCollectionApis) GetDeployment() Deployment` + +GetDeployment returns the Deployment field if non-nil, zero value otherwise. + +### GetDeploymentOk + +`func (o *ApimInstanceCollectionApis) GetDeploymentOk() (*Deployment, bool)` + +GetDeploymentOk returns a tuple with the Deployment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployment + +`func (o *ApimInstanceCollectionApis) SetDeployment(v Deployment)` + +SetDeployment sets Deployment field to given value. + +### HasDeployment + +`func (o *ApimInstanceCollectionApis) HasDeployment() bool` + +HasDeployment returns a boolean if a field has been set. + +### SetDeploymentNil + +`func (o *ApimInstanceCollectionApis) SetDeploymentNil(b bool)` + + SetDeploymentNil sets the value for Deployment to be an explicit nil + +### UnsetDeployment +`func (o *ApimInstanceCollectionApis) UnsetDeployment()` + +UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +### GetRouting + +`func (o *ApimInstanceCollectionApis) GetRouting() []Routing` + +GetRouting returns the Routing field if non-nil, zero value otherwise. + +### GetRoutingOk + +`func (o *ApimInstanceCollectionApis) GetRoutingOk() (*[]Routing, bool)` + +GetRoutingOk returns a tuple with the Routing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRouting + +`func (o *ApimInstanceCollectionApis) SetRouting(v []Routing)` + +SetRouting sets Routing field to given value. + +### HasRouting + +`func (o *ApimInstanceCollectionApis) HasRouting() bool` + +HasRouting returns a boolean if a field has been set. + +### GetPinned + +`func (o *ApimInstanceCollectionApis) GetPinned() bool` + +GetPinned returns the Pinned field if non-nil, zero value otherwise. + +### GetPinnedOk + +`func (o *ApimInstanceCollectionApis) GetPinnedOk() (*bool, bool)` + +GetPinnedOk returns a tuple with the Pinned field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPinned + +`func (o *ApimInstanceCollectionApis) SetPinned(v bool)` + +SetPinned sets Pinned field to given value. + +### HasPinned + +`func (o *ApimInstanceCollectionApis) HasPinned() bool` + +HasPinned returns a boolean if a field has been set. + +### GetActiveContractsCount + +`func (o *ApimInstanceCollectionApis) GetActiveContractsCount() int32` + +GetActiveContractsCount returns the ActiveContractsCount field if non-nil, zero value otherwise. + +### GetActiveContractsCountOk + +`func (o *ApimInstanceCollectionApis) GetActiveContractsCountOk() (*int32, bool)` + +GetActiveContractsCountOk returns a tuple with the ActiveContractsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActiveContractsCount + +`func (o *ApimInstanceCollectionApis) SetActiveContractsCount(v int32)` + +SetActiveContractsCount sets ActiveContractsCount field to given value. + +### HasActiveContractsCount + +`func (o *ApimInstanceCollectionApis) HasActiveContractsCount() bool` + +HasActiveContractsCount returns a boolean if a field has been set. + +### GetAutodiscoveryInstanceName + +`func (o *ApimInstanceCollectionApis) GetAutodiscoveryInstanceName() string` + +GetAutodiscoveryInstanceName returns the AutodiscoveryInstanceName field if non-nil, zero value otherwise. + +### GetAutodiscoveryInstanceNameOk + +`func (o *ApimInstanceCollectionApis) GetAutodiscoveryInstanceNameOk() (*string, bool)` + +GetAutodiscoveryInstanceNameOk returns a tuple with the AutodiscoveryInstanceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAutodiscoveryInstanceName + +`func (o *ApimInstanceCollectionApis) SetAutodiscoveryInstanceName(v string)` + +SetAutodiscoveryInstanceName sets AutodiscoveryInstanceName field to given value. + +### HasAutodiscoveryInstanceName + +`func (o *ApimInstanceCollectionApis) HasAutodiscoveryInstanceName() bool` + +HasAutodiscoveryInstanceName returns a boolean if a field has been set. + + +[[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/apim/docs/ApimInstanceCollectionAssets.md b/apim/docs/ApimInstanceCollectionAssets.md new file mode 100644 index 0000000..248486b --- /dev/null +++ b/apim/docs/ApimInstanceCollectionAssets.md @@ -0,0 +1,316 @@ +# ApimInstanceCollectionAssets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**MasterOrganizationId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**ExchangeAssetName** | Pointer to **string** | | [optional] +**GroupId** | Pointer to **string** | | [optional] +**AssetId** | Pointer to **string** | | [optional] +**Apis** | Pointer to [**[]ApimInstanceCollectionApis**](ApimInstanceCollectionApis.md) | | [optional] +**TotalApis** | Pointer to **int32** | | [optional] +**AutodiscoveryApiName** | Pointer to **string** | | [optional] + +## Methods + +### NewApimInstanceCollectionAssets + +`func NewApimInstanceCollectionAssets() *ApimInstanceCollectionAssets` + +NewApimInstanceCollectionAssets instantiates a new ApimInstanceCollectionAssets 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 + +### NewApimInstanceCollectionAssetsWithDefaults + +`func NewApimInstanceCollectionAssetsWithDefaults() *ApimInstanceCollectionAssets` + +NewApimInstanceCollectionAssetsWithDefaults instantiates a new ApimInstanceCollectionAssets 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 + +### GetAudit + +`func (o *ApimInstanceCollectionAssets) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *ApimInstanceCollectionAssets) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *ApimInstanceCollectionAssets) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *ApimInstanceCollectionAssets) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetMasterOrganizationId + +`func (o *ApimInstanceCollectionAssets) GetMasterOrganizationId() string` + +GetMasterOrganizationId returns the MasterOrganizationId field if non-nil, zero value otherwise. + +### GetMasterOrganizationIdOk + +`func (o *ApimInstanceCollectionAssets) GetMasterOrganizationIdOk() (*string, bool)` + +GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterOrganizationId + +`func (o *ApimInstanceCollectionAssets) SetMasterOrganizationId(v string)` + +SetMasterOrganizationId sets MasterOrganizationId field to given value. + +### HasMasterOrganizationId + +`func (o *ApimInstanceCollectionAssets) HasMasterOrganizationId() bool` + +HasMasterOrganizationId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ApimInstanceCollectionAssets) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ApimInstanceCollectionAssets) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ApimInstanceCollectionAssets) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *ApimInstanceCollectionAssets) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *ApimInstanceCollectionAssets) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApimInstanceCollectionAssets) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ApimInstanceCollectionAssets) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApimInstanceCollectionAssets) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *ApimInstanceCollectionAssets) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ApimInstanceCollectionAssets) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ApimInstanceCollectionAssets) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ApimInstanceCollectionAssets) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetExchangeAssetName + +`func (o *ApimInstanceCollectionAssets) GetExchangeAssetName() string` + +GetExchangeAssetName returns the ExchangeAssetName field if non-nil, zero value otherwise. + +### GetExchangeAssetNameOk + +`func (o *ApimInstanceCollectionAssets) GetExchangeAssetNameOk() (*string, bool)` + +GetExchangeAssetNameOk returns a tuple with the ExchangeAssetName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExchangeAssetName + +`func (o *ApimInstanceCollectionAssets) SetExchangeAssetName(v string)` + +SetExchangeAssetName sets ExchangeAssetName field to given value. + +### HasExchangeAssetName + +`func (o *ApimInstanceCollectionAssets) HasExchangeAssetName() bool` + +HasExchangeAssetName returns a boolean if a field has been set. + +### GetGroupId + +`func (o *ApimInstanceCollectionAssets) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *ApimInstanceCollectionAssets) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *ApimInstanceCollectionAssets) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *ApimInstanceCollectionAssets) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetAssetId + +`func (o *ApimInstanceCollectionAssets) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *ApimInstanceCollectionAssets) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *ApimInstanceCollectionAssets) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *ApimInstanceCollectionAssets) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetApis + +`func (o *ApimInstanceCollectionAssets) GetApis() []ApimInstanceCollectionApis` + +GetApis returns the Apis field if non-nil, zero value otherwise. + +### GetApisOk + +`func (o *ApimInstanceCollectionAssets) GetApisOk() (*[]ApimInstanceCollectionApis, bool)` + +GetApisOk returns a tuple with the Apis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApis + +`func (o *ApimInstanceCollectionAssets) SetApis(v []ApimInstanceCollectionApis)` + +SetApis sets Apis field to given value. + +### HasApis + +`func (o *ApimInstanceCollectionAssets) HasApis() bool` + +HasApis returns a boolean if a field has been set. + +### GetTotalApis + +`func (o *ApimInstanceCollectionAssets) GetTotalApis() int32` + +GetTotalApis returns the TotalApis field if non-nil, zero value otherwise. + +### GetTotalApisOk + +`func (o *ApimInstanceCollectionAssets) GetTotalApisOk() (*int32, bool)` + +GetTotalApisOk returns a tuple with the TotalApis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalApis + +`func (o *ApimInstanceCollectionAssets) SetTotalApis(v int32)` + +SetTotalApis sets TotalApis field to given value. + +### HasTotalApis + +`func (o *ApimInstanceCollectionAssets) HasTotalApis() bool` + +HasTotalApis returns a boolean if a field has been set. + +### GetAutodiscoveryApiName + +`func (o *ApimInstanceCollectionAssets) GetAutodiscoveryApiName() string` + +GetAutodiscoveryApiName returns the AutodiscoveryApiName field if non-nil, zero value otherwise. + +### GetAutodiscoveryApiNameOk + +`func (o *ApimInstanceCollectionAssets) GetAutodiscoveryApiNameOk() (*string, bool)` + +GetAutodiscoveryApiNameOk returns a tuple with the AutodiscoveryApiName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAutodiscoveryApiName + +`func (o *ApimInstanceCollectionAssets) SetAutodiscoveryApiName(v string)` + +SetAutodiscoveryApiName sets AutodiscoveryApiName field to given value. + +### HasAutodiscoveryApiName + +`func (o *ApimInstanceCollectionAssets) HasAutodiscoveryApiName() bool` + +HasAutodiscoveryApiName returns a boolean if a field has been set. + + +[[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/apim/docs/ApimInstanceDetails.md b/apim/docs/ApimInstanceDetails.md new file mode 100644 index 0000000..38a8289 --- /dev/null +++ b/apim/docs/ApimInstanceDetails.md @@ -0,0 +1,720 @@ +# ApimInstanceDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**MasterOrganizationId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] +**InstanceLabel** | Pointer to **string** | | [optional] +**GroupId** | Pointer to **string** | | [optional] +**AssetId** | Pointer to **string** | | [optional] +**AssetVersion** | Pointer to **string** | | [optional] +**ProductVersion** | Pointer to **string** | | [optional] +**Description** | Pointer to **NullableString** | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Order** | Pointer to **int32** | | [optional] +**ProviderId** | Pointer to **NullableString** | | [optional] +**Deprecated** | Pointer to **bool** | | [optional] +**LastActiveDate** | Pointer to **NullableTime** | | [optional] +**EndpointUri** | Pointer to **string** | | [optional] +**EnvironmentId** | Pointer to **string** | | [optional] +**IsPublic** | Pointer to **bool** | | [optional] +**Stage** | Pointer to **string** | | [optional] +**Technology** | Pointer to **string** | | [optional] +**Endpoint** | Pointer to [**Endpoint**](Endpoint.md) | | [optional] +**Deployment** | Pointer to [**NullableDeployment**](Deployment.md) | | [optional] +**Routing** | Pointer to [**[]Routing**](Routing.md) | | [optional] +**Status** | Pointer to **string** | | [optional] +**AutodiscoveryInstanceName** | Pointer to **string** | | [optional] + +## Methods + +### NewApimInstanceDetails + +`func NewApimInstanceDetails() *ApimInstanceDetails` + +NewApimInstanceDetails instantiates a new ApimInstanceDetails 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 + +### NewApimInstanceDetailsWithDefaults + +`func NewApimInstanceDetailsWithDefaults() *ApimInstanceDetails` + +NewApimInstanceDetailsWithDefaults instantiates a new ApimInstanceDetails 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 + +### GetAudit + +`func (o *ApimInstanceDetails) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *ApimInstanceDetails) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *ApimInstanceDetails) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *ApimInstanceDetails) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetMasterOrganizationId + +`func (o *ApimInstanceDetails) GetMasterOrganizationId() string` + +GetMasterOrganizationId returns the MasterOrganizationId field if non-nil, zero value otherwise. + +### GetMasterOrganizationIdOk + +`func (o *ApimInstanceDetails) GetMasterOrganizationIdOk() (*string, bool)` + +GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterOrganizationId + +`func (o *ApimInstanceDetails) SetMasterOrganizationId(v string)` + +SetMasterOrganizationId sets MasterOrganizationId field to given value. + +### HasMasterOrganizationId + +`func (o *ApimInstanceDetails) HasMasterOrganizationId() bool` + +HasMasterOrganizationId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ApimInstanceDetails) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ApimInstanceDetails) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ApimInstanceDetails) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *ApimInstanceDetails) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *ApimInstanceDetails) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApimInstanceDetails) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ApimInstanceDetails) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApimInstanceDetails) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetInstanceLabel + +`func (o *ApimInstanceDetails) GetInstanceLabel() string` + +GetInstanceLabel returns the InstanceLabel field if non-nil, zero value otherwise. + +### GetInstanceLabelOk + +`func (o *ApimInstanceDetails) GetInstanceLabelOk() (*string, bool)` + +GetInstanceLabelOk returns a tuple with the InstanceLabel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceLabel + +`func (o *ApimInstanceDetails) SetInstanceLabel(v string)` + +SetInstanceLabel sets InstanceLabel field to given value. + +### HasInstanceLabel + +`func (o *ApimInstanceDetails) HasInstanceLabel() bool` + +HasInstanceLabel returns a boolean if a field has been set. + +### GetGroupId + +`func (o *ApimInstanceDetails) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *ApimInstanceDetails) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *ApimInstanceDetails) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *ApimInstanceDetails) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetAssetId + +`func (o *ApimInstanceDetails) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *ApimInstanceDetails) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *ApimInstanceDetails) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *ApimInstanceDetails) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetAssetVersion + +`func (o *ApimInstanceDetails) GetAssetVersion() string` + +GetAssetVersion returns the AssetVersion field if non-nil, zero value otherwise. + +### GetAssetVersionOk + +`func (o *ApimInstanceDetails) GetAssetVersionOk() (*string, bool)` + +GetAssetVersionOk returns a tuple with the AssetVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetVersion + +`func (o *ApimInstanceDetails) SetAssetVersion(v string)` + +SetAssetVersion sets AssetVersion field to given value. + +### HasAssetVersion + +`func (o *ApimInstanceDetails) HasAssetVersion() bool` + +HasAssetVersion returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *ApimInstanceDetails) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *ApimInstanceDetails) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *ApimInstanceDetails) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *ApimInstanceDetails) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### GetDescription + +`func (o *ApimInstanceDetails) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ApimInstanceDetails) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ApimInstanceDetails) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ApimInstanceDetails) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *ApimInstanceDetails) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *ApimInstanceDetails) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetTags + +`func (o *ApimInstanceDetails) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ApimInstanceDetails) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ApimInstanceDetails) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ApimInstanceDetails) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetOrder + +`func (o *ApimInstanceDetails) GetOrder() int32` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ApimInstanceDetails) GetOrderOk() (*int32, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ApimInstanceDetails) SetOrder(v int32)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *ApimInstanceDetails) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetProviderId + +`func (o *ApimInstanceDetails) GetProviderId() string` + +GetProviderId returns the ProviderId field if non-nil, zero value otherwise. + +### GetProviderIdOk + +`func (o *ApimInstanceDetails) GetProviderIdOk() (*string, bool)` + +GetProviderIdOk returns a tuple with the ProviderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProviderId + +`func (o *ApimInstanceDetails) SetProviderId(v string)` + +SetProviderId sets ProviderId field to given value. + +### HasProviderId + +`func (o *ApimInstanceDetails) HasProviderId() bool` + +HasProviderId returns a boolean if a field has been set. + +### SetProviderIdNil + +`func (o *ApimInstanceDetails) SetProviderIdNil(b bool)` + + SetProviderIdNil sets the value for ProviderId to be an explicit nil + +### UnsetProviderId +`func (o *ApimInstanceDetails) UnsetProviderId()` + +UnsetProviderId ensures that no value is present for ProviderId, not even an explicit nil +### GetDeprecated + +`func (o *ApimInstanceDetails) GetDeprecated() bool` + +GetDeprecated returns the Deprecated field if non-nil, zero value otherwise. + +### GetDeprecatedOk + +`func (o *ApimInstanceDetails) GetDeprecatedOk() (*bool, bool)` + +GetDeprecatedOk returns a tuple with the Deprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeprecated + +`func (o *ApimInstanceDetails) SetDeprecated(v bool)` + +SetDeprecated sets Deprecated field to given value. + +### HasDeprecated + +`func (o *ApimInstanceDetails) HasDeprecated() bool` + +HasDeprecated returns a boolean if a field has been set. + +### GetLastActiveDate + +`func (o *ApimInstanceDetails) GetLastActiveDate() time.Time` + +GetLastActiveDate returns the LastActiveDate field if non-nil, zero value otherwise. + +### GetLastActiveDateOk + +`func (o *ApimInstanceDetails) GetLastActiveDateOk() (*time.Time, bool)` + +GetLastActiveDateOk returns a tuple with the LastActiveDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastActiveDate + +`func (o *ApimInstanceDetails) SetLastActiveDate(v time.Time)` + +SetLastActiveDate sets LastActiveDate field to given value. + +### HasLastActiveDate + +`func (o *ApimInstanceDetails) HasLastActiveDate() bool` + +HasLastActiveDate returns a boolean if a field has been set. + +### SetLastActiveDateNil + +`func (o *ApimInstanceDetails) SetLastActiveDateNil(b bool)` + + SetLastActiveDateNil sets the value for LastActiveDate to be an explicit nil + +### UnsetLastActiveDate +`func (o *ApimInstanceDetails) UnsetLastActiveDate()` + +UnsetLastActiveDate ensures that no value is present for LastActiveDate, not even an explicit nil +### GetEndpointUri + +`func (o *ApimInstanceDetails) GetEndpointUri() string` + +GetEndpointUri returns the EndpointUri field if non-nil, zero value otherwise. + +### GetEndpointUriOk + +`func (o *ApimInstanceDetails) GetEndpointUriOk() (*string, bool)` + +GetEndpointUriOk returns a tuple with the EndpointUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpointUri + +`func (o *ApimInstanceDetails) SetEndpointUri(v string)` + +SetEndpointUri sets EndpointUri field to given value. + +### HasEndpointUri + +`func (o *ApimInstanceDetails) HasEndpointUri() bool` + +HasEndpointUri returns a boolean if a field has been set. + +### GetEnvironmentId + +`func (o *ApimInstanceDetails) GetEnvironmentId() string` + +GetEnvironmentId returns the EnvironmentId field if non-nil, zero value otherwise. + +### GetEnvironmentIdOk + +`func (o *ApimInstanceDetails) GetEnvironmentIdOk() (*string, bool)` + +GetEnvironmentIdOk returns a tuple with the EnvironmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentId + +`func (o *ApimInstanceDetails) SetEnvironmentId(v string)` + +SetEnvironmentId sets EnvironmentId field to given value. + +### HasEnvironmentId + +`func (o *ApimInstanceDetails) HasEnvironmentId() bool` + +HasEnvironmentId returns a boolean if a field has been set. + +### GetIsPublic + +`func (o *ApimInstanceDetails) GetIsPublic() bool` + +GetIsPublic returns the IsPublic field if non-nil, zero value otherwise. + +### GetIsPublicOk + +`func (o *ApimInstanceDetails) GetIsPublicOk() (*bool, bool)` + +GetIsPublicOk returns a tuple with the IsPublic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPublic + +`func (o *ApimInstanceDetails) SetIsPublic(v bool)` + +SetIsPublic sets IsPublic field to given value. + +### HasIsPublic + +`func (o *ApimInstanceDetails) HasIsPublic() bool` + +HasIsPublic returns a boolean if a field has been set. + +### GetStage + +`func (o *ApimInstanceDetails) GetStage() string` + +GetStage returns the Stage field if non-nil, zero value otherwise. + +### GetStageOk + +`func (o *ApimInstanceDetails) GetStageOk() (*string, bool)` + +GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStage + +`func (o *ApimInstanceDetails) SetStage(v string)` + +SetStage sets Stage field to given value. + +### HasStage + +`func (o *ApimInstanceDetails) HasStage() bool` + +HasStage returns a boolean if a field has been set. + +### GetTechnology + +`func (o *ApimInstanceDetails) GetTechnology() string` + +GetTechnology returns the Technology field if non-nil, zero value otherwise. + +### GetTechnologyOk + +`func (o *ApimInstanceDetails) GetTechnologyOk() (*string, bool)` + +GetTechnologyOk returns a tuple with the Technology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTechnology + +`func (o *ApimInstanceDetails) SetTechnology(v string)` + +SetTechnology sets Technology field to given value. + +### HasTechnology + +`func (o *ApimInstanceDetails) HasTechnology() bool` + +HasTechnology returns a boolean if a field has been set. + +### GetEndpoint + +`func (o *ApimInstanceDetails) GetEndpoint() Endpoint` + +GetEndpoint returns the Endpoint field if non-nil, zero value otherwise. + +### GetEndpointOk + +`func (o *ApimInstanceDetails) GetEndpointOk() (*Endpoint, bool)` + +GetEndpointOk returns a tuple with the Endpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpoint + +`func (o *ApimInstanceDetails) SetEndpoint(v Endpoint)` + +SetEndpoint sets Endpoint field to given value. + +### HasEndpoint + +`func (o *ApimInstanceDetails) HasEndpoint() bool` + +HasEndpoint returns a boolean if a field has been set. + +### GetDeployment + +`func (o *ApimInstanceDetails) GetDeployment() Deployment` + +GetDeployment returns the Deployment field if non-nil, zero value otherwise. + +### GetDeploymentOk + +`func (o *ApimInstanceDetails) GetDeploymentOk() (*Deployment, bool)` + +GetDeploymentOk returns a tuple with the Deployment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployment + +`func (o *ApimInstanceDetails) SetDeployment(v Deployment)` + +SetDeployment sets Deployment field to given value. + +### HasDeployment + +`func (o *ApimInstanceDetails) HasDeployment() bool` + +HasDeployment returns a boolean if a field has been set. + +### SetDeploymentNil + +`func (o *ApimInstanceDetails) SetDeploymentNil(b bool)` + + SetDeploymentNil sets the value for Deployment to be an explicit nil + +### UnsetDeployment +`func (o *ApimInstanceDetails) UnsetDeployment()` + +UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +### GetRouting + +`func (o *ApimInstanceDetails) GetRouting() []Routing` + +GetRouting returns the Routing field if non-nil, zero value otherwise. + +### GetRoutingOk + +`func (o *ApimInstanceDetails) GetRoutingOk() (*[]Routing, bool)` + +GetRoutingOk returns a tuple with the Routing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRouting + +`func (o *ApimInstanceDetails) SetRouting(v []Routing)` + +SetRouting sets Routing field to given value. + +### HasRouting + +`func (o *ApimInstanceDetails) HasRouting() bool` + +HasRouting returns a boolean if a field has been set. + +### GetStatus + +`func (o *ApimInstanceDetails) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ApimInstanceDetails) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ApimInstanceDetails) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ApimInstanceDetails) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetAutodiscoveryInstanceName + +`func (o *ApimInstanceDetails) GetAutodiscoveryInstanceName() string` + +GetAutodiscoveryInstanceName returns the AutodiscoveryInstanceName field if non-nil, zero value otherwise. + +### GetAutodiscoveryInstanceNameOk + +`func (o *ApimInstanceDetails) GetAutodiscoveryInstanceNameOk() (*string, bool)` + +GetAutodiscoveryInstanceNameOk returns a tuple with the AutodiscoveryInstanceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAutodiscoveryInstanceName + +`func (o *ApimInstanceDetails) SetAutodiscoveryInstanceName(v string)` + +SetAutodiscoveryInstanceName sets AutodiscoveryInstanceName field to given value. + +### HasAutodiscoveryInstanceName + +`func (o *ApimInstanceDetails) HasAutodiscoveryInstanceName() bool` + +HasAutodiscoveryInstanceName returns a boolean if a field has been set. + + +[[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/apim/docs/ApimInstancePatchResponse.md b/apim/docs/ApimInstancePatchResponse.md new file mode 100644 index 0000000..e7ab80c --- /dev/null +++ b/apim/docs/ApimInstancePatchResponse.md @@ -0,0 +1,362 @@ +# ApimInstancePatchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**MasterOrganizationId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] +**InstanceLabel** | Pointer to **string** | | [optional] +**ProviderId** | Pointer to **NullableString** | | [optional] +**EndpointUri** | Pointer to **string** | | [optional] +**EnvironmentId** | Pointer to **string** | | [optional] +**Technology** | Pointer to **string** | | [optional] +**Routing** | Pointer to [**[]Routing**](Routing.md) | | [optional] +**Endpoint** | Pointer to [**Endpoint**](Endpoint.md) | | [optional] +**Deployment** | Pointer to [**NullableDeployment**](Deployment.md) | | [optional] + +## Methods + +### NewApimInstancePatchResponse + +`func NewApimInstancePatchResponse() *ApimInstancePatchResponse` + +NewApimInstancePatchResponse instantiates a new ApimInstancePatchResponse 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 + +### NewApimInstancePatchResponseWithDefaults + +`func NewApimInstancePatchResponseWithDefaults() *ApimInstancePatchResponse` + +NewApimInstancePatchResponseWithDefaults instantiates a new ApimInstancePatchResponse 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 + +### GetAudit + +`func (o *ApimInstancePatchResponse) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *ApimInstancePatchResponse) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *ApimInstancePatchResponse) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *ApimInstancePatchResponse) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetMasterOrganizationId + +`func (o *ApimInstancePatchResponse) GetMasterOrganizationId() string` + +GetMasterOrganizationId returns the MasterOrganizationId field if non-nil, zero value otherwise. + +### GetMasterOrganizationIdOk + +`func (o *ApimInstancePatchResponse) GetMasterOrganizationIdOk() (*string, bool)` + +GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterOrganizationId + +`func (o *ApimInstancePatchResponse) SetMasterOrganizationId(v string)` + +SetMasterOrganizationId sets MasterOrganizationId field to given value. + +### HasMasterOrganizationId + +`func (o *ApimInstancePatchResponse) HasMasterOrganizationId() bool` + +HasMasterOrganizationId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ApimInstancePatchResponse) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ApimInstancePatchResponse) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ApimInstancePatchResponse) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *ApimInstancePatchResponse) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *ApimInstancePatchResponse) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApimInstancePatchResponse) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ApimInstancePatchResponse) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApimInstancePatchResponse) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetInstanceLabel + +`func (o *ApimInstancePatchResponse) GetInstanceLabel() string` + +GetInstanceLabel returns the InstanceLabel field if non-nil, zero value otherwise. + +### GetInstanceLabelOk + +`func (o *ApimInstancePatchResponse) GetInstanceLabelOk() (*string, bool)` + +GetInstanceLabelOk returns a tuple with the InstanceLabel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceLabel + +`func (o *ApimInstancePatchResponse) SetInstanceLabel(v string)` + +SetInstanceLabel sets InstanceLabel field to given value. + +### HasInstanceLabel + +`func (o *ApimInstancePatchResponse) HasInstanceLabel() bool` + +HasInstanceLabel returns a boolean if a field has been set. + +### GetProviderId + +`func (o *ApimInstancePatchResponse) GetProviderId() string` + +GetProviderId returns the ProviderId field if non-nil, zero value otherwise. + +### GetProviderIdOk + +`func (o *ApimInstancePatchResponse) GetProviderIdOk() (*string, bool)` + +GetProviderIdOk returns a tuple with the ProviderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProviderId + +`func (o *ApimInstancePatchResponse) SetProviderId(v string)` + +SetProviderId sets ProviderId field to given value. + +### HasProviderId + +`func (o *ApimInstancePatchResponse) HasProviderId() bool` + +HasProviderId returns a boolean if a field has been set. + +### SetProviderIdNil + +`func (o *ApimInstancePatchResponse) SetProviderIdNil(b bool)` + + SetProviderIdNil sets the value for ProviderId to be an explicit nil + +### UnsetProviderId +`func (o *ApimInstancePatchResponse) UnsetProviderId()` + +UnsetProviderId ensures that no value is present for ProviderId, not even an explicit nil +### GetEndpointUri + +`func (o *ApimInstancePatchResponse) GetEndpointUri() string` + +GetEndpointUri returns the EndpointUri field if non-nil, zero value otherwise. + +### GetEndpointUriOk + +`func (o *ApimInstancePatchResponse) GetEndpointUriOk() (*string, bool)` + +GetEndpointUriOk returns a tuple with the EndpointUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpointUri + +`func (o *ApimInstancePatchResponse) SetEndpointUri(v string)` + +SetEndpointUri sets EndpointUri field to given value. + +### HasEndpointUri + +`func (o *ApimInstancePatchResponse) HasEndpointUri() bool` + +HasEndpointUri returns a boolean if a field has been set. + +### GetEnvironmentId + +`func (o *ApimInstancePatchResponse) GetEnvironmentId() string` + +GetEnvironmentId returns the EnvironmentId field if non-nil, zero value otherwise. + +### GetEnvironmentIdOk + +`func (o *ApimInstancePatchResponse) GetEnvironmentIdOk() (*string, bool)` + +GetEnvironmentIdOk returns a tuple with the EnvironmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentId + +`func (o *ApimInstancePatchResponse) SetEnvironmentId(v string)` + +SetEnvironmentId sets EnvironmentId field to given value. + +### HasEnvironmentId + +`func (o *ApimInstancePatchResponse) HasEnvironmentId() bool` + +HasEnvironmentId returns a boolean if a field has been set. + +### GetTechnology + +`func (o *ApimInstancePatchResponse) GetTechnology() string` + +GetTechnology returns the Technology field if non-nil, zero value otherwise. + +### GetTechnologyOk + +`func (o *ApimInstancePatchResponse) GetTechnologyOk() (*string, bool)` + +GetTechnologyOk returns a tuple with the Technology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTechnology + +`func (o *ApimInstancePatchResponse) SetTechnology(v string)` + +SetTechnology sets Technology field to given value. + +### HasTechnology + +`func (o *ApimInstancePatchResponse) HasTechnology() bool` + +HasTechnology returns a boolean if a field has been set. + +### GetRouting + +`func (o *ApimInstancePatchResponse) GetRouting() []Routing` + +GetRouting returns the Routing field if non-nil, zero value otherwise. + +### GetRoutingOk + +`func (o *ApimInstancePatchResponse) GetRoutingOk() (*[]Routing, bool)` + +GetRoutingOk returns a tuple with the Routing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRouting + +`func (o *ApimInstancePatchResponse) SetRouting(v []Routing)` + +SetRouting sets Routing field to given value. + +### HasRouting + +`func (o *ApimInstancePatchResponse) HasRouting() bool` + +HasRouting returns a boolean if a field has been set. + +### GetEndpoint + +`func (o *ApimInstancePatchResponse) GetEndpoint() Endpoint` + +GetEndpoint returns the Endpoint field if non-nil, zero value otherwise. + +### GetEndpointOk + +`func (o *ApimInstancePatchResponse) GetEndpointOk() (*Endpoint, bool)` + +GetEndpointOk returns a tuple with the Endpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpoint + +`func (o *ApimInstancePatchResponse) SetEndpoint(v Endpoint)` + +SetEndpoint sets Endpoint field to given value. + +### HasEndpoint + +`func (o *ApimInstancePatchResponse) HasEndpoint() bool` + +HasEndpoint returns a boolean if a field has been set. + +### GetDeployment + +`func (o *ApimInstancePatchResponse) GetDeployment() Deployment` + +GetDeployment returns the Deployment field if non-nil, zero value otherwise. + +### GetDeploymentOk + +`func (o *ApimInstancePatchResponse) GetDeploymentOk() (*Deployment, bool)` + +GetDeploymentOk returns a tuple with the Deployment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployment + +`func (o *ApimInstancePatchResponse) SetDeployment(v Deployment)` + +SetDeployment sets Deployment field to given value. + +### HasDeployment + +`func (o *ApimInstancePatchResponse) HasDeployment() bool` + +HasDeployment returns a boolean if a field has been set. + +### SetDeploymentNil + +`func (o *ApimInstancePatchResponse) SetDeploymentNil(b bool)` + + SetDeploymentNil sets the value for Deployment to be an explicit nil + +### UnsetDeployment +`func (o *ApimInstancePatchResponse) UnsetDeployment()` + +UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil + +[[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/apim/docs/ApimInstancePostBody.md b/apim/docs/ApimInstancePostBody.md new file mode 100644 index 0000000..8df3358 --- /dev/null +++ b/apim/docs/ApimInstancePostBody.md @@ -0,0 +1,226 @@ +# ApimInstancePostBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Technology** | Pointer to **string** | | [optional] +**Endpoint** | Pointer to [**NullableEndpointPostBody**](EndpointPostBody.md) | | [optional] +**Spec** | Pointer to [**Spec**](Spec.md) | | [optional] +**Routing** | Pointer to **[]map[string]interface{}** | | [optional] +**Deployment** | Pointer to [**NullableDeploymentPostBody**](DeploymentPostBody.md) | | [optional] +**InstanceLabel** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewApimInstancePostBody + +`func NewApimInstancePostBody() *ApimInstancePostBody` + +NewApimInstancePostBody instantiates a new ApimInstancePostBody 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 + +### NewApimInstancePostBodyWithDefaults + +`func NewApimInstancePostBodyWithDefaults() *ApimInstancePostBody` + +NewApimInstancePostBodyWithDefaults instantiates a new ApimInstancePostBody 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 + +### GetTechnology + +`func (o *ApimInstancePostBody) GetTechnology() string` + +GetTechnology returns the Technology field if non-nil, zero value otherwise. + +### GetTechnologyOk + +`func (o *ApimInstancePostBody) GetTechnologyOk() (*string, bool)` + +GetTechnologyOk returns a tuple with the Technology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTechnology + +`func (o *ApimInstancePostBody) SetTechnology(v string)` + +SetTechnology sets Technology field to given value. + +### HasTechnology + +`func (o *ApimInstancePostBody) HasTechnology() bool` + +HasTechnology returns a boolean if a field has been set. + +### GetEndpoint + +`func (o *ApimInstancePostBody) GetEndpoint() EndpointPostBody` + +GetEndpoint returns the Endpoint field if non-nil, zero value otherwise. + +### GetEndpointOk + +`func (o *ApimInstancePostBody) GetEndpointOk() (*EndpointPostBody, bool)` + +GetEndpointOk returns a tuple with the Endpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpoint + +`func (o *ApimInstancePostBody) SetEndpoint(v EndpointPostBody)` + +SetEndpoint sets Endpoint field to given value. + +### HasEndpoint + +`func (o *ApimInstancePostBody) HasEndpoint() bool` + +HasEndpoint returns a boolean if a field has been set. + +### SetEndpointNil + +`func (o *ApimInstancePostBody) SetEndpointNil(b bool)` + + SetEndpointNil sets the value for Endpoint to be an explicit nil + +### UnsetEndpoint +`func (o *ApimInstancePostBody) UnsetEndpoint()` + +UnsetEndpoint ensures that no value is present for Endpoint, not even an explicit nil +### GetSpec + +`func (o *ApimInstancePostBody) GetSpec() Spec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *ApimInstancePostBody) GetSpecOk() (*Spec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *ApimInstancePostBody) SetSpec(v Spec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *ApimInstancePostBody) HasSpec() bool` + +HasSpec returns a boolean if a field has been set. + +### GetRouting + +`func (o *ApimInstancePostBody) GetRouting() []map[string]interface{}` + +GetRouting returns the Routing field if non-nil, zero value otherwise. + +### GetRoutingOk + +`func (o *ApimInstancePostBody) GetRoutingOk() (*[]map[string]interface{}, bool)` + +GetRoutingOk returns a tuple with the Routing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRouting + +`func (o *ApimInstancePostBody) SetRouting(v []map[string]interface{})` + +SetRouting sets Routing field to given value. + +### HasRouting + +`func (o *ApimInstancePostBody) HasRouting() bool` + +HasRouting returns a boolean if a field has been set. + +### SetRoutingNil + +`func (o *ApimInstancePostBody) SetRoutingNil(b bool)` + + SetRoutingNil sets the value for Routing to be an explicit nil + +### UnsetRouting +`func (o *ApimInstancePostBody) UnsetRouting()` + +UnsetRouting ensures that no value is present for Routing, not even an explicit nil +### GetDeployment + +`func (o *ApimInstancePostBody) GetDeployment() DeploymentPostBody` + +GetDeployment returns the Deployment field if non-nil, zero value otherwise. + +### GetDeploymentOk + +`func (o *ApimInstancePostBody) GetDeploymentOk() (*DeploymentPostBody, bool)` + +GetDeploymentOk returns a tuple with the Deployment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployment + +`func (o *ApimInstancePostBody) SetDeployment(v DeploymentPostBody)` + +SetDeployment sets Deployment field to given value. + +### HasDeployment + +`func (o *ApimInstancePostBody) HasDeployment() bool` + +HasDeployment returns a boolean if a field has been set. + +### SetDeploymentNil + +`func (o *ApimInstancePostBody) SetDeploymentNil(b bool)` + + SetDeploymentNil sets the value for Deployment to be an explicit nil + +### UnsetDeployment +`func (o *ApimInstancePostBody) UnsetDeployment()` + +UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +### GetInstanceLabel + +`func (o *ApimInstancePostBody) GetInstanceLabel() string` + +GetInstanceLabel returns the InstanceLabel field if non-nil, zero value otherwise. + +### GetInstanceLabelOk + +`func (o *ApimInstancePostBody) GetInstanceLabelOk() (*string, bool)` + +GetInstanceLabelOk returns a tuple with the InstanceLabel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceLabel + +`func (o *ApimInstancePostBody) SetInstanceLabel(v string)` + +SetInstanceLabel sets InstanceLabel field to given value. + +### HasInstanceLabel + +`func (o *ApimInstancePostBody) HasInstanceLabel() bool` + +HasInstanceLabel returns a boolean if a field has been set. + +### SetInstanceLabelNil + +`func (o *ApimInstancePostBody) SetInstanceLabelNil(b bool)` + + SetInstanceLabelNil sets the value for InstanceLabel to be an explicit nil + +### UnsetInstanceLabel +`func (o *ApimInstancePostBody) UnsetInstanceLabel()` + +UnsetInstanceLabel ensures that no value is present for InstanceLabel, not even an explicit nil + +[[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/apim/docs/ApimInstancePostResponse.md b/apim/docs/ApimInstancePostResponse.md new file mode 100644 index 0000000..47fd91d --- /dev/null +++ b/apim/docs/ApimInstancePostResponse.md @@ -0,0 +1,482 @@ +# ApimInstancePostResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnvironmentId** | Pointer to **string** | | [optional] +**InstanceLabel** | Pointer to **string** | | [optional] +**ProviderId** | Pointer to **NullableString** | | [optional] +**Technology** | Pointer to **string** | | [optional] +**AssetVersion** | Pointer to **string** | | [optional] +**ProductVersion** | Pointer to **string** | | [optional] +**Order** | Pointer to **int32** | | [optional] +**Stage** | Pointer to **string** | | [optional] +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**MasterOrganizationId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] +**GroupId** | Pointer to **string** | | [optional] +**AssetId** | Pointer to **string** | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Endpoint** | Pointer to [**Endpoint**](Endpoint.md) | | [optional] +**AutodiscoveryInstanceName** | Pointer to **string** | | [optional] + +## Methods + +### NewApimInstancePostResponse + +`func NewApimInstancePostResponse() *ApimInstancePostResponse` + +NewApimInstancePostResponse instantiates a new ApimInstancePostResponse 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 + +### NewApimInstancePostResponseWithDefaults + +`func NewApimInstancePostResponseWithDefaults() *ApimInstancePostResponse` + +NewApimInstancePostResponseWithDefaults instantiates a new ApimInstancePostResponse 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 + +### GetEnvironmentId + +`func (o *ApimInstancePostResponse) GetEnvironmentId() string` + +GetEnvironmentId returns the EnvironmentId field if non-nil, zero value otherwise. + +### GetEnvironmentIdOk + +`func (o *ApimInstancePostResponse) GetEnvironmentIdOk() (*string, bool)` + +GetEnvironmentIdOk returns a tuple with the EnvironmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentId + +`func (o *ApimInstancePostResponse) SetEnvironmentId(v string)` + +SetEnvironmentId sets EnvironmentId field to given value. + +### HasEnvironmentId + +`func (o *ApimInstancePostResponse) HasEnvironmentId() bool` + +HasEnvironmentId returns a boolean if a field has been set. + +### GetInstanceLabel + +`func (o *ApimInstancePostResponse) GetInstanceLabel() string` + +GetInstanceLabel returns the InstanceLabel field if non-nil, zero value otherwise. + +### GetInstanceLabelOk + +`func (o *ApimInstancePostResponse) GetInstanceLabelOk() (*string, bool)` + +GetInstanceLabelOk returns a tuple with the InstanceLabel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceLabel + +`func (o *ApimInstancePostResponse) SetInstanceLabel(v string)` + +SetInstanceLabel sets InstanceLabel field to given value. + +### HasInstanceLabel + +`func (o *ApimInstancePostResponse) HasInstanceLabel() bool` + +HasInstanceLabel returns a boolean if a field has been set. + +### GetProviderId + +`func (o *ApimInstancePostResponse) GetProviderId() string` + +GetProviderId returns the ProviderId field if non-nil, zero value otherwise. + +### GetProviderIdOk + +`func (o *ApimInstancePostResponse) GetProviderIdOk() (*string, bool)` + +GetProviderIdOk returns a tuple with the ProviderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProviderId + +`func (o *ApimInstancePostResponse) SetProviderId(v string)` + +SetProviderId sets ProviderId field to given value. + +### HasProviderId + +`func (o *ApimInstancePostResponse) HasProviderId() bool` + +HasProviderId returns a boolean if a field has been set. + +### SetProviderIdNil + +`func (o *ApimInstancePostResponse) SetProviderIdNil(b bool)` + + SetProviderIdNil sets the value for ProviderId to be an explicit nil + +### UnsetProviderId +`func (o *ApimInstancePostResponse) UnsetProviderId()` + +UnsetProviderId ensures that no value is present for ProviderId, not even an explicit nil +### GetTechnology + +`func (o *ApimInstancePostResponse) GetTechnology() string` + +GetTechnology returns the Technology field if non-nil, zero value otherwise. + +### GetTechnologyOk + +`func (o *ApimInstancePostResponse) GetTechnologyOk() (*string, bool)` + +GetTechnologyOk returns a tuple with the Technology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTechnology + +`func (o *ApimInstancePostResponse) SetTechnology(v string)` + +SetTechnology sets Technology field to given value. + +### HasTechnology + +`func (o *ApimInstancePostResponse) HasTechnology() bool` + +HasTechnology returns a boolean if a field has been set. + +### GetAssetVersion + +`func (o *ApimInstancePostResponse) GetAssetVersion() string` + +GetAssetVersion returns the AssetVersion field if non-nil, zero value otherwise. + +### GetAssetVersionOk + +`func (o *ApimInstancePostResponse) GetAssetVersionOk() (*string, bool)` + +GetAssetVersionOk returns a tuple with the AssetVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetVersion + +`func (o *ApimInstancePostResponse) SetAssetVersion(v string)` + +SetAssetVersion sets AssetVersion field to given value. + +### HasAssetVersion + +`func (o *ApimInstancePostResponse) HasAssetVersion() bool` + +HasAssetVersion returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *ApimInstancePostResponse) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *ApimInstancePostResponse) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *ApimInstancePostResponse) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *ApimInstancePostResponse) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### GetOrder + +`func (o *ApimInstancePostResponse) GetOrder() int32` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ApimInstancePostResponse) GetOrderOk() (*int32, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ApimInstancePostResponse) SetOrder(v int32)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *ApimInstancePostResponse) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetStage + +`func (o *ApimInstancePostResponse) GetStage() string` + +GetStage returns the Stage field if non-nil, zero value otherwise. + +### GetStageOk + +`func (o *ApimInstancePostResponse) GetStageOk() (*string, bool)` + +GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStage + +`func (o *ApimInstancePostResponse) SetStage(v string)` + +SetStage sets Stage field to given value. + +### HasStage + +`func (o *ApimInstancePostResponse) HasStage() bool` + +HasStage returns a boolean if a field has been set. + +### GetAudit + +`func (o *ApimInstancePostResponse) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *ApimInstancePostResponse) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *ApimInstancePostResponse) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *ApimInstancePostResponse) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetMasterOrganizationId + +`func (o *ApimInstancePostResponse) GetMasterOrganizationId() string` + +GetMasterOrganizationId returns the MasterOrganizationId field if non-nil, zero value otherwise. + +### GetMasterOrganizationIdOk + +`func (o *ApimInstancePostResponse) GetMasterOrganizationIdOk() (*string, bool)` + +GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterOrganizationId + +`func (o *ApimInstancePostResponse) SetMasterOrganizationId(v string)` + +SetMasterOrganizationId sets MasterOrganizationId field to given value. + +### HasMasterOrganizationId + +`func (o *ApimInstancePostResponse) HasMasterOrganizationId() bool` + +HasMasterOrganizationId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ApimInstancePostResponse) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ApimInstancePostResponse) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ApimInstancePostResponse) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *ApimInstancePostResponse) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *ApimInstancePostResponse) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApimInstancePostResponse) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ApimInstancePostResponse) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApimInstancePostResponse) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetGroupId + +`func (o *ApimInstancePostResponse) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *ApimInstancePostResponse) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *ApimInstancePostResponse) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *ApimInstancePostResponse) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetAssetId + +`func (o *ApimInstancePostResponse) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *ApimInstancePostResponse) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *ApimInstancePostResponse) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *ApimInstancePostResponse) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetTags + +`func (o *ApimInstancePostResponse) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ApimInstancePostResponse) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ApimInstancePostResponse) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ApimInstancePostResponse) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetEndpoint + +`func (o *ApimInstancePostResponse) GetEndpoint() Endpoint` + +GetEndpoint returns the Endpoint field if non-nil, zero value otherwise. + +### GetEndpointOk + +`func (o *ApimInstancePostResponse) GetEndpointOk() (*Endpoint, bool)` + +GetEndpointOk returns a tuple with the Endpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndpoint + +`func (o *ApimInstancePostResponse) SetEndpoint(v Endpoint)` + +SetEndpoint sets Endpoint field to given value. + +### HasEndpoint + +`func (o *ApimInstancePostResponse) HasEndpoint() bool` + +HasEndpoint returns a boolean if a field has been set. + +### GetAutodiscoveryInstanceName + +`func (o *ApimInstancePostResponse) GetAutodiscoveryInstanceName() string` + +GetAutodiscoveryInstanceName returns the AutodiscoveryInstanceName field if non-nil, zero value otherwise. + +### GetAutodiscoveryInstanceNameOk + +`func (o *ApimInstancePostResponse) GetAutodiscoveryInstanceNameOk() (*string, bool)` + +GetAutodiscoveryInstanceNameOk returns a tuple with the AutodiscoveryInstanceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAutodiscoveryInstanceName + +`func (o *ApimInstancePostResponse) SetAutodiscoveryInstanceName(v string)` + +SetAutodiscoveryInstanceName sets AutodiscoveryInstanceName field to given value. + +### HasAutodiscoveryInstanceName + +`func (o *ApimInstancePostResponse) HasAutodiscoveryInstanceName() bool` + +HasAutodiscoveryInstanceName returns a boolean if a field has been set. + + +[[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/apim/docs/Audit.md b/apim/docs/Audit.md new file mode 100644 index 0000000..835dca2 --- /dev/null +++ b/apim/docs/Audit.md @@ -0,0 +1,82 @@ +# Audit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | Pointer to [**AuditCreated**](AuditCreated.md) | | [optional] +**Updated** | Pointer to [**AuditCreated**](AuditCreated.md) | | [optional] + +## Methods + +### NewAudit + +`func NewAudit() *Audit` + +NewAudit instantiates a new Audit 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 + +### NewAuditWithDefaults + +`func NewAuditWithDefaults() *Audit` + +NewAuditWithDefaults instantiates a new Audit 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 + +### GetCreated + +`func (o *Audit) GetCreated() AuditCreated` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Audit) GetCreatedOk() (*AuditCreated, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Audit) SetCreated(v AuditCreated)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Audit) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetUpdated + +`func (o *Audit) GetUpdated() AuditCreated` + +GetUpdated returns the Updated field if non-nil, zero value otherwise. + +### GetUpdatedOk + +`func (o *Audit) GetUpdatedOk() (*AuditCreated, bool)` + +GetUpdatedOk returns a tuple with the Updated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdated + +`func (o *Audit) SetUpdated(v AuditCreated)` + +SetUpdated sets Updated field to given value. + +### HasUpdated + +`func (o *Audit) HasUpdated() bool` + +HasUpdated returns a boolean if a field has been set. + + +[[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/apim/docs/AuditCreated.md b/apim/docs/AuditCreated.md new file mode 100644 index 0000000..9af0dec --- /dev/null +++ b/apim/docs/AuditCreated.md @@ -0,0 +1,56 @@ +# AuditCreated + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewAuditCreated + +`func NewAuditCreated() *AuditCreated` + +NewAuditCreated instantiates a new AuditCreated 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 + +### NewAuditCreatedWithDefaults + +`func NewAuditCreatedWithDefaults() *AuditCreated` + +NewAuditCreatedWithDefaults instantiates a new AuditCreated 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 + +### GetDate + +`func (o *AuditCreated) GetDate() time.Time` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *AuditCreated) GetDateOk() (*time.Time, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDate + +`func (o *AuditCreated) SetDate(v time.Time)` + +SetDate sets Date field to given value. + +### HasDate + +`func (o *AuditCreated) HasDate() bool` + +HasDate returns a boolean if a field has been set. + + +[[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/apim/docs/DefaultApi.md b/apim/docs/DefaultApi.md new file mode 100644 index 0000000..5eecc91 --- /dev/null +++ b/apim/docs/DefaultApi.md @@ -0,0 +1,423 @@ +# \DefaultApi + +All URIs are relative to *https://anypoint.mulesoft.com/apimanager/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApimInstance**](DefaultApi.md#DeleteApimInstance) | **Delete** /organizations/{orgId}/environments/{envId}/apis/{envApiId} | Delete a specific API Manager Instance +[**GetApimInstanceDetails**](DefaultApi.md#GetApimInstanceDetails) | **Get** /organizations/{orgId}/environments/{envId}/apis/{envApiId} | Retrieves a specific API Manager Instance +[**GetEnvApimInstances**](DefaultApi.md#GetEnvApimInstances) | **Get** /organizations/{orgId}/environments/{envId}/apis | Retrieves a collection of API Manager Instances +[**PatchApimInstance**](DefaultApi.md#PatchApimInstance) | **Patch** /organizations/{orgId}/environments/{envId}/apis/{envApiId} | Patches a specific API Manager Instance +[**PostApimInstance**](DefaultApi.md#PostApimInstance) | **Post** /organizations/{orgId}/environments/{envId}/apis | Creates an API Manager Instance + + + +## DeleteApimInstance + +> DeleteApimInstance(ctx, orgId, envId, envApiId).Execute() + +Delete a specific API Manager Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api manager instance id for a given environment + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.DeleteApimInstance(context.Background(), orgId, envId, envApiId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteApimInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api manager instance id for a given environment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApimInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## GetApimInstanceDetails + +> ApimInstanceDetails GetApimInstanceDetails(ctx, orgId, envId, envApiId).IncludeProxyTemplate(includeProxyTemplate).IncludeValidation(includeValidation).IncludeTlsContexts(includeTlsContexts).Execute() + +Retrieves a specific API Manager Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api manager instance id for a given environment + includeProxyTemplate := true // bool | Include the configured proxyTemplate to its associated endpoint (optional) + includeValidation := true // bool | Include the configured validation to its associated endpoint (optional) + includeTlsContexts := true // bool | Include the configured TLS contexts (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetApimInstanceDetails(context.Background(), orgId, envId, envApiId).IncludeProxyTemplate(includeProxyTemplate).IncludeValidation(includeValidation).IncludeTlsContexts(includeTlsContexts).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApimInstanceDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetApimInstanceDetails`: ApimInstanceDetails + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApimInstanceDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api manager instance id for a given environment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetApimInstanceDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **includeProxyTemplate** | **bool** | Include the configured proxyTemplate to its associated endpoint | + **includeValidation** | **bool** | Include the configured validation to its associated endpoint | + **includeTlsContexts** | **bool** | Include the configured TLS contexts | + +### Return type + +[**ApimInstanceDetails**](ApimInstanceDetails.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## GetEnvApimInstances + +> ApimInstanceCollection GetEnvApimInstances(ctx, orgId, envId).Query(query).GroupId(groupId).AssetId(assetId).AssetVersion(assetVersion).InstanceLabel(instanceLabel).ProductVersion(productVersion).AutodiscoveryInstanceName(autodiscoveryInstanceName).Filters(filters).Limit(limit).Offset(offset).Sort(sort).Ascending(ascending).Execute() + +Retrieves a collection of API Manager Instances + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + query := "query_example" // string | A string that will be checked for a partial or similar matches of the name, description, label and tags (optional) + groupId := "groupId_example" // string | A string that will be checked for an exact match of the groupId (optional) + assetId := "assetId_example" // string | A string that will be checked for an exact match of the assetId (optional) + assetVersion := "assetVersion_example" // string | A string that will be checked for an exact match of the assetVersion (optional) + instanceLabel := "instanceLabel_example" // string | A string that will be checked for an exact match of the instanceLabel (optional) + productVersion := "productVersion_example" // string | A string that will be checked for an exact match of the productVersion (optional) + autodiscoveryInstanceName := "autodiscoveryInstanceName_example" // string | A string that will be checked for an exact match of the autodiscoveryInstanceName (optional) + filters := []string{"Inner_example"} // []string | Comma-separated list of filters, which can be \"active\" and/or \"pinned\" (optional) + limit := int32(56) // int32 | Maximum number of rolegroups to retrieve per request. (optional) + offset := int32(56) // int32 | The number of records to omit from the response. (optional) + sort := "sort_example" // string | Default value is name (optional) + ascending := true // bool | To activate ascending sorting (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetEnvApimInstances(context.Background(), orgId, envId).Query(query).GroupId(groupId).AssetId(assetId).AssetVersion(assetVersion).InstanceLabel(instanceLabel).ProductVersion(productVersion).AutodiscoveryInstanceName(autodiscoveryInstanceName).Filters(filters).Limit(limit).Offset(offset).Sort(sort).Ascending(ascending).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetEnvApimInstances``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEnvApimInstances`: ApimInstanceCollection + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetEnvApimInstances`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEnvApimInstancesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **query** | **string** | A string that will be checked for a partial or similar matches of the name, description, label and tags | + **groupId** | **string** | A string that will be checked for an exact match of the groupId | + **assetId** | **string** | A string that will be checked for an exact match of the assetId | + **assetVersion** | **string** | A string that will be checked for an exact match of the assetVersion | + **instanceLabel** | **string** | A string that will be checked for an exact match of the instanceLabel | + **productVersion** | **string** | A string that will be checked for an exact match of the productVersion | + **autodiscoveryInstanceName** | **string** | A string that will be checked for an exact match of the autodiscoveryInstanceName | + **filters** | **[]string** | Comma-separated list of filters, which can be \"active\" and/or \"pinned\" | + **limit** | **int32** | Maximum number of rolegroups to retrieve per request. | + **offset** | **int32** | The number of records to omit from the response. | + **sort** | **string** | Default value is name | + **ascending** | **bool** | To activate ascending sorting | + +### Return type + +[**ApimInstanceCollection**](ApimInstanceCollection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## PatchApimInstance + +> ApimInstancePatchResponse PatchApimInstance(ctx, orgId, envId, envApiId).Force(force).UpdateApisInSamePort(updateApisInSamePort).Body(body).Execute() + +Patches a specific API Manager Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api manager instance id for a given environment + force := true // bool | Allows patching the API autodiscoveryInstanceName. You may want to change the 'api.version' configuration on all Mule 2 & Mule 3 applications tracking this API. (optional) + updateApisInSamePort := true // bool | For APIs deployed to Flex, if endpoint proxyUri or inbound TLS Contexts are being updated, apis in the same port are also updated (optional) + body := map[string]interface{}(Object) // map[string]interface{} | Patch API Manager Instance Body (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.PatchApimInstance(context.Background(), orgId, envId, envApiId).Force(force).UpdateApisInSamePort(updateApisInSamePort).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PatchApimInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchApimInstance`: ApimInstancePatchResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.PatchApimInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api manager instance id for a given environment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchApimInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **force** | **bool** | Allows patching the API autodiscoveryInstanceName. You may want to change the 'api.version' configuration on all Mule 2 & Mule 3 applications tracking this API. | + **updateApisInSamePort** | **bool** | For APIs deployed to Flex, if endpoint proxyUri or inbound TLS Contexts are being updated, apis in the same port are also updated | + **body** | **map[string]interface{}** | Patch API Manager Instance Body | + +### Return type + +[**ApimInstancePatchResponse**](ApimInstancePatchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + +## PostApimInstance + +> ApimInstancePostResponse PostApimInstance(ctx, orgId, envId).ApimInstancePostBody(apimInstancePostBody).Execute() + +Creates an API Manager Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + apimInstancePostBody := *openapiclient.NewApimInstancePostBody() // ApimInstancePostBody | Post API Manager Instance Body (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.PostApimInstance(context.Background(), orgId, envId).ApimInstancePostBody(apimInstancePostBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PostApimInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostApimInstance`: ApimInstancePostResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.PostApimInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPostApimInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **apimInstancePostBody** | [**ApimInstancePostBody**](ApimInstancePostBody.md) | Post API Manager Instance Body | + +### Return type + +[**ApimInstancePostResponse**](ApimInstancePostResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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/apim/docs/Deployment.md b/apim/docs/Deployment.md new file mode 100644 index 0000000..a84c764 --- /dev/null +++ b/apim/docs/Deployment.md @@ -0,0 +1,444 @@ +# Deployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**Id** | Pointer to **int32** | | [optional] +**ApplicationId** | Pointer to **string** | | [optional] +**ApplicationName** | Pointer to **NullableString** | | [optional] +**GatewayVersion** | Pointer to **NullableString** | | [optional] +**EnvironmentName** | Pointer to **NullableString** | | [optional] +**EnvironmentId** | Pointer to **NullableString** | | [optional] +**TargetId** | Pointer to **string** | | [optional] +**TargetName** | Pointer to **string** | | [optional] +**DeploymentId** | Pointer to **NullableString** | | [optional] +**UpdatedDate** | Pointer to **time.Time** | | [optional] +**Type** | Pointer to **string** | | [optional] +**ExpectedStatus** | Pointer to **string** | | [optional] +**ApiId** | Pointer to **int32** | | [optional] + +## Methods + +### NewDeployment + +`func NewDeployment() *Deployment` + +NewDeployment instantiates a new Deployment 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 + +### NewDeploymentWithDefaults + +`func NewDeploymentWithDefaults() *Deployment` + +NewDeploymentWithDefaults instantiates a new Deployment 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 + +### GetAudit + +`func (o *Deployment) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *Deployment) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *Deployment) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *Deployment) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetId + +`func (o *Deployment) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Deployment) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Deployment) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Deployment) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetApplicationId + +`func (o *Deployment) GetApplicationId() string` + +GetApplicationId returns the ApplicationId field if non-nil, zero value otherwise. + +### GetApplicationIdOk + +`func (o *Deployment) GetApplicationIdOk() (*string, bool)` + +GetApplicationIdOk returns a tuple with the ApplicationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationId + +`func (o *Deployment) SetApplicationId(v string)` + +SetApplicationId sets ApplicationId field to given value. + +### HasApplicationId + +`func (o *Deployment) HasApplicationId() bool` + +HasApplicationId returns a boolean if a field has been set. + +### GetApplicationName + +`func (o *Deployment) GetApplicationName() string` + +GetApplicationName returns the ApplicationName field if non-nil, zero value otherwise. + +### GetApplicationNameOk + +`func (o *Deployment) GetApplicationNameOk() (*string, bool)` + +GetApplicationNameOk returns a tuple with the ApplicationName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationName + +`func (o *Deployment) SetApplicationName(v string)` + +SetApplicationName sets ApplicationName field to given value. + +### HasApplicationName + +`func (o *Deployment) HasApplicationName() bool` + +HasApplicationName returns a boolean if a field has been set. + +### SetApplicationNameNil + +`func (o *Deployment) SetApplicationNameNil(b bool)` + + SetApplicationNameNil sets the value for ApplicationName to be an explicit nil + +### UnsetApplicationName +`func (o *Deployment) UnsetApplicationName()` + +UnsetApplicationName ensures that no value is present for ApplicationName, not even an explicit nil +### GetGatewayVersion + +`func (o *Deployment) GetGatewayVersion() string` + +GetGatewayVersion returns the GatewayVersion field if non-nil, zero value otherwise. + +### GetGatewayVersionOk + +`func (o *Deployment) GetGatewayVersionOk() (*string, bool)` + +GetGatewayVersionOk returns a tuple with the GatewayVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGatewayVersion + +`func (o *Deployment) SetGatewayVersion(v string)` + +SetGatewayVersion sets GatewayVersion field to given value. + +### HasGatewayVersion + +`func (o *Deployment) HasGatewayVersion() bool` + +HasGatewayVersion returns a boolean if a field has been set. + +### SetGatewayVersionNil + +`func (o *Deployment) SetGatewayVersionNil(b bool)` + + SetGatewayVersionNil sets the value for GatewayVersion to be an explicit nil + +### UnsetGatewayVersion +`func (o *Deployment) UnsetGatewayVersion()` + +UnsetGatewayVersion ensures that no value is present for GatewayVersion, not even an explicit nil +### GetEnvironmentName + +`func (o *Deployment) GetEnvironmentName() string` + +GetEnvironmentName returns the EnvironmentName field if non-nil, zero value otherwise. + +### GetEnvironmentNameOk + +`func (o *Deployment) GetEnvironmentNameOk() (*string, bool)` + +GetEnvironmentNameOk returns a tuple with the EnvironmentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentName + +`func (o *Deployment) SetEnvironmentName(v string)` + +SetEnvironmentName sets EnvironmentName field to given value. + +### HasEnvironmentName + +`func (o *Deployment) HasEnvironmentName() bool` + +HasEnvironmentName returns a boolean if a field has been set. + +### SetEnvironmentNameNil + +`func (o *Deployment) SetEnvironmentNameNil(b bool)` + + SetEnvironmentNameNil sets the value for EnvironmentName to be an explicit nil + +### UnsetEnvironmentName +`func (o *Deployment) UnsetEnvironmentName()` + +UnsetEnvironmentName ensures that no value is present for EnvironmentName, not even an explicit nil +### GetEnvironmentId + +`func (o *Deployment) GetEnvironmentId() string` + +GetEnvironmentId returns the EnvironmentId field if non-nil, zero value otherwise. + +### GetEnvironmentIdOk + +`func (o *Deployment) GetEnvironmentIdOk() (*string, bool)` + +GetEnvironmentIdOk returns a tuple with the EnvironmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentId + +`func (o *Deployment) SetEnvironmentId(v string)` + +SetEnvironmentId sets EnvironmentId field to given value. + +### HasEnvironmentId + +`func (o *Deployment) HasEnvironmentId() bool` + +HasEnvironmentId returns a boolean if a field has been set. + +### SetEnvironmentIdNil + +`func (o *Deployment) SetEnvironmentIdNil(b bool)` + + SetEnvironmentIdNil sets the value for EnvironmentId to be an explicit nil + +### UnsetEnvironmentId +`func (o *Deployment) UnsetEnvironmentId()` + +UnsetEnvironmentId ensures that no value is present for EnvironmentId, not even an explicit nil +### GetTargetId + +`func (o *Deployment) GetTargetId() string` + +GetTargetId returns the TargetId field if non-nil, zero value otherwise. + +### GetTargetIdOk + +`func (o *Deployment) GetTargetIdOk() (*string, bool)` + +GetTargetIdOk returns a tuple with the TargetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetId + +`func (o *Deployment) SetTargetId(v string)` + +SetTargetId sets TargetId field to given value. + +### HasTargetId + +`func (o *Deployment) HasTargetId() bool` + +HasTargetId returns a boolean if a field has been set. + +### GetTargetName + +`func (o *Deployment) GetTargetName() string` + +GetTargetName returns the TargetName field if non-nil, zero value otherwise. + +### GetTargetNameOk + +`func (o *Deployment) GetTargetNameOk() (*string, bool)` + +GetTargetNameOk returns a tuple with the TargetName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetName + +`func (o *Deployment) SetTargetName(v string)` + +SetTargetName sets TargetName field to given value. + +### HasTargetName + +`func (o *Deployment) HasTargetName() bool` + +HasTargetName returns a boolean if a field has been set. + +### GetDeploymentId + +`func (o *Deployment) GetDeploymentId() string` + +GetDeploymentId returns the DeploymentId field if non-nil, zero value otherwise. + +### GetDeploymentIdOk + +`func (o *Deployment) GetDeploymentIdOk() (*string, bool)` + +GetDeploymentIdOk returns a tuple with the DeploymentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeploymentId + +`func (o *Deployment) SetDeploymentId(v string)` + +SetDeploymentId sets DeploymentId field to given value. + +### HasDeploymentId + +`func (o *Deployment) HasDeploymentId() bool` + +HasDeploymentId returns a boolean if a field has been set. + +### SetDeploymentIdNil + +`func (o *Deployment) SetDeploymentIdNil(b bool)` + + SetDeploymentIdNil sets the value for DeploymentId to be an explicit nil + +### UnsetDeploymentId +`func (o *Deployment) UnsetDeploymentId()` + +UnsetDeploymentId ensures that no value is present for DeploymentId, not even an explicit nil +### GetUpdatedDate + +`func (o *Deployment) GetUpdatedDate() time.Time` + +GetUpdatedDate returns the UpdatedDate field if non-nil, zero value otherwise. + +### GetUpdatedDateOk + +`func (o *Deployment) GetUpdatedDateOk() (*time.Time, bool)` + +GetUpdatedDateOk returns a tuple with the UpdatedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedDate + +`func (o *Deployment) SetUpdatedDate(v time.Time)` + +SetUpdatedDate sets UpdatedDate field to given value. + +### HasUpdatedDate + +`func (o *Deployment) HasUpdatedDate() bool` + +HasUpdatedDate returns a boolean if a field has been set. + +### GetType + +`func (o *Deployment) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Deployment) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Deployment) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Deployment) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetExpectedStatus + +`func (o *Deployment) GetExpectedStatus() string` + +GetExpectedStatus returns the ExpectedStatus field if non-nil, zero value otherwise. + +### GetExpectedStatusOk + +`func (o *Deployment) GetExpectedStatusOk() (*string, bool)` + +GetExpectedStatusOk returns a tuple with the ExpectedStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpectedStatus + +`func (o *Deployment) SetExpectedStatus(v string)` + +SetExpectedStatus sets ExpectedStatus field to given value. + +### HasExpectedStatus + +`func (o *Deployment) HasExpectedStatus() bool` + +HasExpectedStatus returns a boolean if a field has been set. + +### GetApiId + +`func (o *Deployment) GetApiId() int32` + +GetApiId returns the ApiId field if non-nil, zero value otherwise. + +### GetApiIdOk + +`func (o *Deployment) GetApiIdOk() (*int32, bool)` + +GetApiIdOk returns a tuple with the ApiId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiId + +`func (o *Deployment) SetApiId(v int32)` + +SetApiId sets ApiId field to given value. + +### HasApiId + +`func (o *Deployment) HasApiId() bool` + +HasApiId returns a boolean if a field has been set. + + +[[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/apim/docs/DeploymentPostBody.md b/apim/docs/DeploymentPostBody.md new file mode 100644 index 0000000..a0504a2 --- /dev/null +++ b/apim/docs/DeploymentPostBody.md @@ -0,0 +1,212 @@ +# DeploymentPostBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnvironmentId** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**ExpectedStatus** | Pointer to **string** | | [optional] +**Overwrite** | Pointer to **bool** | | [optional] +**TargetId** | Pointer to **string** | | [optional] +**TargetName** | Pointer to **string** | | [optional] +**GatewayVersion** | Pointer to **string** | | [optional] + +## Methods + +### NewDeploymentPostBody + +`func NewDeploymentPostBody() *DeploymentPostBody` + +NewDeploymentPostBody instantiates a new DeploymentPostBody 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 + +### NewDeploymentPostBodyWithDefaults + +`func NewDeploymentPostBodyWithDefaults() *DeploymentPostBody` + +NewDeploymentPostBodyWithDefaults instantiates a new DeploymentPostBody 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 + +### GetEnvironmentId + +`func (o *DeploymentPostBody) GetEnvironmentId() string` + +GetEnvironmentId returns the EnvironmentId field if non-nil, zero value otherwise. + +### GetEnvironmentIdOk + +`func (o *DeploymentPostBody) GetEnvironmentIdOk() (*string, bool)` + +GetEnvironmentIdOk returns a tuple with the EnvironmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironmentId + +`func (o *DeploymentPostBody) SetEnvironmentId(v string)` + +SetEnvironmentId sets EnvironmentId field to given value. + +### HasEnvironmentId + +`func (o *DeploymentPostBody) HasEnvironmentId() bool` + +HasEnvironmentId returns a boolean if a field has been set. + +### GetType + +`func (o *DeploymentPostBody) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DeploymentPostBody) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DeploymentPostBody) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DeploymentPostBody) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetExpectedStatus + +`func (o *DeploymentPostBody) GetExpectedStatus() string` + +GetExpectedStatus returns the ExpectedStatus field if non-nil, zero value otherwise. + +### GetExpectedStatusOk + +`func (o *DeploymentPostBody) GetExpectedStatusOk() (*string, bool)` + +GetExpectedStatusOk returns a tuple with the ExpectedStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpectedStatus + +`func (o *DeploymentPostBody) SetExpectedStatus(v string)` + +SetExpectedStatus sets ExpectedStatus field to given value. + +### HasExpectedStatus + +`func (o *DeploymentPostBody) HasExpectedStatus() bool` + +HasExpectedStatus returns a boolean if a field has been set. + +### GetOverwrite + +`func (o *DeploymentPostBody) GetOverwrite() bool` + +GetOverwrite returns the Overwrite field if non-nil, zero value otherwise. + +### GetOverwriteOk + +`func (o *DeploymentPostBody) GetOverwriteOk() (*bool, bool)` + +GetOverwriteOk returns a tuple with the Overwrite field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOverwrite + +`func (o *DeploymentPostBody) SetOverwrite(v bool)` + +SetOverwrite sets Overwrite field to given value. + +### HasOverwrite + +`func (o *DeploymentPostBody) HasOverwrite() bool` + +HasOverwrite returns a boolean if a field has been set. + +### GetTargetId + +`func (o *DeploymentPostBody) GetTargetId() string` + +GetTargetId returns the TargetId field if non-nil, zero value otherwise. + +### GetTargetIdOk + +`func (o *DeploymentPostBody) GetTargetIdOk() (*string, bool)` + +GetTargetIdOk returns a tuple with the TargetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetId + +`func (o *DeploymentPostBody) SetTargetId(v string)` + +SetTargetId sets TargetId field to given value. + +### HasTargetId + +`func (o *DeploymentPostBody) HasTargetId() bool` + +HasTargetId returns a boolean if a field has been set. + +### GetTargetName + +`func (o *DeploymentPostBody) GetTargetName() string` + +GetTargetName returns the TargetName field if non-nil, zero value otherwise. + +### GetTargetNameOk + +`func (o *DeploymentPostBody) GetTargetNameOk() (*string, bool)` + +GetTargetNameOk returns a tuple with the TargetName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetName + +`func (o *DeploymentPostBody) SetTargetName(v string)` + +SetTargetName sets TargetName field to given value. + +### HasTargetName + +`func (o *DeploymentPostBody) HasTargetName() bool` + +HasTargetName returns a boolean if a field has been set. + +### GetGatewayVersion + +`func (o *DeploymentPostBody) GetGatewayVersion() string` + +GetGatewayVersion returns the GatewayVersion field if non-nil, zero value otherwise. + +### GetGatewayVersionOk + +`func (o *DeploymentPostBody) GetGatewayVersionOk() (*string, bool)` + +GetGatewayVersionOk returns a tuple with the GatewayVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGatewayVersion + +`func (o *DeploymentPostBody) SetGatewayVersion(v string)` + +SetGatewayVersion sets GatewayVersion field to given value. + +### HasGatewayVersion + +`func (o *DeploymentPostBody) HasGatewayVersion() bool` + +HasGatewayVersion returns a boolean if a field has been set. + + +[[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/apim/docs/Endpoint.md b/apim/docs/Endpoint.md new file mode 100644 index 0000000..559ff18 --- /dev/null +++ b/apim/docs/Endpoint.md @@ -0,0 +1,664 @@ +# Endpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**Id** | Pointer to **int32** | | [optional] +**Type** | Pointer to **NullableString** | | [optional] +**Uri** | Pointer to **NullableString** | | [optional] +**ApiGatewayVersion** | Pointer to **NullableString** | | [optional] +**ProxyUri** | Pointer to **NullableString** | | [optional] +**ProxyRegistrationUri** | Pointer to **NullableString** | | [optional] +**LastActiveDate** | Pointer to **NullableTime** | | [optional] +**IsCloudHub** | Pointer to **NullableString** | | [optional] +**DeploymentType** | Pointer to **string** | | [optional] +**PoliciesVersion** | Pointer to **NullableString** | | [optional] +**ReferencesUserDomain** | Pointer to **NullableString** | | [optional] +**ResponseTimeout** | Pointer to **NullableString** | | [optional] +**WsdlConfig** | Pointer to **NullableString** | | [optional] +**MuleVersion4OrAbove** | Pointer to **NullableBool** | | [optional] +**ApiVersionId** | Pointer to **int32** | | [optional] +**Validation** | Pointer to **NullableString** | | [optional] +**Console** | Pointer to **NullableString** | | [optional] +**TlsContexts** | Pointer to [**EndpointTlsContexts**](EndpointTlsContexts.md) | | [optional] + +## Methods + +### NewEndpoint + +`func NewEndpoint() *Endpoint` + +NewEndpoint instantiates a new Endpoint 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 + +### NewEndpointWithDefaults + +`func NewEndpointWithDefaults() *Endpoint` + +NewEndpointWithDefaults instantiates a new Endpoint 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 + +### GetAudit + +`func (o *Endpoint) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *Endpoint) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *Endpoint) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *Endpoint) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetId + +`func (o *Endpoint) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Endpoint) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Endpoint) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Endpoint) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *Endpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Endpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Endpoint) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Endpoint) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetTypeNil + +`func (o *Endpoint) SetTypeNil(b bool)` + + SetTypeNil sets the value for Type to be an explicit nil + +### UnsetType +`func (o *Endpoint) UnsetType()` + +UnsetType ensures that no value is present for Type, not even an explicit nil +### GetUri + +`func (o *Endpoint) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *Endpoint) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *Endpoint) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *Endpoint) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### SetUriNil + +`func (o *Endpoint) SetUriNil(b bool)` + + SetUriNil sets the value for Uri to be an explicit nil + +### UnsetUri +`func (o *Endpoint) UnsetUri()` + +UnsetUri ensures that no value is present for Uri, not even an explicit nil +### GetApiGatewayVersion + +`func (o *Endpoint) GetApiGatewayVersion() string` + +GetApiGatewayVersion returns the ApiGatewayVersion field if non-nil, zero value otherwise. + +### GetApiGatewayVersionOk + +`func (o *Endpoint) GetApiGatewayVersionOk() (*string, bool)` + +GetApiGatewayVersionOk returns a tuple with the ApiGatewayVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiGatewayVersion + +`func (o *Endpoint) SetApiGatewayVersion(v string)` + +SetApiGatewayVersion sets ApiGatewayVersion field to given value. + +### HasApiGatewayVersion + +`func (o *Endpoint) HasApiGatewayVersion() bool` + +HasApiGatewayVersion returns a boolean if a field has been set. + +### SetApiGatewayVersionNil + +`func (o *Endpoint) SetApiGatewayVersionNil(b bool)` + + SetApiGatewayVersionNil sets the value for ApiGatewayVersion to be an explicit nil + +### UnsetApiGatewayVersion +`func (o *Endpoint) UnsetApiGatewayVersion()` + +UnsetApiGatewayVersion ensures that no value is present for ApiGatewayVersion, not even an explicit nil +### GetProxyUri + +`func (o *Endpoint) GetProxyUri() string` + +GetProxyUri returns the ProxyUri field if non-nil, zero value otherwise. + +### GetProxyUriOk + +`func (o *Endpoint) GetProxyUriOk() (*string, bool)` + +GetProxyUriOk returns a tuple with the ProxyUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyUri + +`func (o *Endpoint) SetProxyUri(v string)` + +SetProxyUri sets ProxyUri field to given value. + +### HasProxyUri + +`func (o *Endpoint) HasProxyUri() bool` + +HasProxyUri returns a boolean if a field has been set. + +### SetProxyUriNil + +`func (o *Endpoint) SetProxyUriNil(b bool)` + + SetProxyUriNil sets the value for ProxyUri to be an explicit nil + +### UnsetProxyUri +`func (o *Endpoint) UnsetProxyUri()` + +UnsetProxyUri ensures that no value is present for ProxyUri, not even an explicit nil +### GetProxyRegistrationUri + +`func (o *Endpoint) GetProxyRegistrationUri() string` + +GetProxyRegistrationUri returns the ProxyRegistrationUri field if non-nil, zero value otherwise. + +### GetProxyRegistrationUriOk + +`func (o *Endpoint) GetProxyRegistrationUriOk() (*string, bool)` + +GetProxyRegistrationUriOk returns a tuple with the ProxyRegistrationUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyRegistrationUri + +`func (o *Endpoint) SetProxyRegistrationUri(v string)` + +SetProxyRegistrationUri sets ProxyRegistrationUri field to given value. + +### HasProxyRegistrationUri + +`func (o *Endpoint) HasProxyRegistrationUri() bool` + +HasProxyRegistrationUri returns a boolean if a field has been set. + +### SetProxyRegistrationUriNil + +`func (o *Endpoint) SetProxyRegistrationUriNil(b bool)` + + SetProxyRegistrationUriNil sets the value for ProxyRegistrationUri to be an explicit nil + +### UnsetProxyRegistrationUri +`func (o *Endpoint) UnsetProxyRegistrationUri()` + +UnsetProxyRegistrationUri ensures that no value is present for ProxyRegistrationUri, not even an explicit nil +### GetLastActiveDate + +`func (o *Endpoint) GetLastActiveDate() time.Time` + +GetLastActiveDate returns the LastActiveDate field if non-nil, zero value otherwise. + +### GetLastActiveDateOk + +`func (o *Endpoint) GetLastActiveDateOk() (*time.Time, bool)` + +GetLastActiveDateOk returns a tuple with the LastActiveDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastActiveDate + +`func (o *Endpoint) SetLastActiveDate(v time.Time)` + +SetLastActiveDate sets LastActiveDate field to given value. + +### HasLastActiveDate + +`func (o *Endpoint) HasLastActiveDate() bool` + +HasLastActiveDate returns a boolean if a field has been set. + +### SetLastActiveDateNil + +`func (o *Endpoint) SetLastActiveDateNil(b bool)` + + SetLastActiveDateNil sets the value for LastActiveDate to be an explicit nil + +### UnsetLastActiveDate +`func (o *Endpoint) UnsetLastActiveDate()` + +UnsetLastActiveDate ensures that no value is present for LastActiveDate, not even an explicit nil +### GetIsCloudHub + +`func (o *Endpoint) GetIsCloudHub() string` + +GetIsCloudHub returns the IsCloudHub field if non-nil, zero value otherwise. + +### GetIsCloudHubOk + +`func (o *Endpoint) GetIsCloudHubOk() (*string, bool)` + +GetIsCloudHubOk returns a tuple with the IsCloudHub field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsCloudHub + +`func (o *Endpoint) SetIsCloudHub(v string)` + +SetIsCloudHub sets IsCloudHub field to given value. + +### HasIsCloudHub + +`func (o *Endpoint) HasIsCloudHub() bool` + +HasIsCloudHub returns a boolean if a field has been set. + +### SetIsCloudHubNil + +`func (o *Endpoint) SetIsCloudHubNil(b bool)` + + SetIsCloudHubNil sets the value for IsCloudHub to be an explicit nil + +### UnsetIsCloudHub +`func (o *Endpoint) UnsetIsCloudHub()` + +UnsetIsCloudHub ensures that no value is present for IsCloudHub, not even an explicit nil +### GetDeploymentType + +`func (o *Endpoint) GetDeploymentType() string` + +GetDeploymentType returns the DeploymentType field if non-nil, zero value otherwise. + +### GetDeploymentTypeOk + +`func (o *Endpoint) GetDeploymentTypeOk() (*string, bool)` + +GetDeploymentTypeOk returns a tuple with the DeploymentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeploymentType + +`func (o *Endpoint) SetDeploymentType(v string)` + +SetDeploymentType sets DeploymentType field to given value. + +### HasDeploymentType + +`func (o *Endpoint) HasDeploymentType() bool` + +HasDeploymentType returns a boolean if a field has been set. + +### GetPoliciesVersion + +`func (o *Endpoint) GetPoliciesVersion() string` + +GetPoliciesVersion returns the PoliciesVersion field if non-nil, zero value otherwise. + +### GetPoliciesVersionOk + +`func (o *Endpoint) GetPoliciesVersionOk() (*string, bool)` + +GetPoliciesVersionOk returns a tuple with the PoliciesVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPoliciesVersion + +`func (o *Endpoint) SetPoliciesVersion(v string)` + +SetPoliciesVersion sets PoliciesVersion field to given value. + +### HasPoliciesVersion + +`func (o *Endpoint) HasPoliciesVersion() bool` + +HasPoliciesVersion returns a boolean if a field has been set. + +### SetPoliciesVersionNil + +`func (o *Endpoint) SetPoliciesVersionNil(b bool)` + + SetPoliciesVersionNil sets the value for PoliciesVersion to be an explicit nil + +### UnsetPoliciesVersion +`func (o *Endpoint) UnsetPoliciesVersion()` + +UnsetPoliciesVersion ensures that no value is present for PoliciesVersion, not even an explicit nil +### GetReferencesUserDomain + +`func (o *Endpoint) GetReferencesUserDomain() string` + +GetReferencesUserDomain returns the ReferencesUserDomain field if non-nil, zero value otherwise. + +### GetReferencesUserDomainOk + +`func (o *Endpoint) GetReferencesUserDomainOk() (*string, bool)` + +GetReferencesUserDomainOk returns a tuple with the ReferencesUserDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferencesUserDomain + +`func (o *Endpoint) SetReferencesUserDomain(v string)` + +SetReferencesUserDomain sets ReferencesUserDomain field to given value. + +### HasReferencesUserDomain + +`func (o *Endpoint) HasReferencesUserDomain() bool` + +HasReferencesUserDomain returns a boolean if a field has been set. + +### SetReferencesUserDomainNil + +`func (o *Endpoint) SetReferencesUserDomainNil(b bool)` + + SetReferencesUserDomainNil sets the value for ReferencesUserDomain to be an explicit nil + +### UnsetReferencesUserDomain +`func (o *Endpoint) UnsetReferencesUserDomain()` + +UnsetReferencesUserDomain ensures that no value is present for ReferencesUserDomain, not even an explicit nil +### GetResponseTimeout + +`func (o *Endpoint) GetResponseTimeout() string` + +GetResponseTimeout returns the ResponseTimeout field if non-nil, zero value otherwise. + +### GetResponseTimeoutOk + +`func (o *Endpoint) GetResponseTimeoutOk() (*string, bool)` + +GetResponseTimeoutOk returns a tuple with the ResponseTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseTimeout + +`func (o *Endpoint) SetResponseTimeout(v string)` + +SetResponseTimeout sets ResponseTimeout field to given value. + +### HasResponseTimeout + +`func (o *Endpoint) HasResponseTimeout() bool` + +HasResponseTimeout returns a boolean if a field has been set. + +### SetResponseTimeoutNil + +`func (o *Endpoint) SetResponseTimeoutNil(b bool)` + + SetResponseTimeoutNil sets the value for ResponseTimeout to be an explicit nil + +### UnsetResponseTimeout +`func (o *Endpoint) UnsetResponseTimeout()` + +UnsetResponseTimeout ensures that no value is present for ResponseTimeout, not even an explicit nil +### GetWsdlConfig + +`func (o *Endpoint) GetWsdlConfig() string` + +GetWsdlConfig returns the WsdlConfig field if non-nil, zero value otherwise. + +### GetWsdlConfigOk + +`func (o *Endpoint) GetWsdlConfigOk() (*string, bool)` + +GetWsdlConfigOk returns a tuple with the WsdlConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWsdlConfig + +`func (o *Endpoint) SetWsdlConfig(v string)` + +SetWsdlConfig sets WsdlConfig field to given value. + +### HasWsdlConfig + +`func (o *Endpoint) HasWsdlConfig() bool` + +HasWsdlConfig returns a boolean if a field has been set. + +### SetWsdlConfigNil + +`func (o *Endpoint) SetWsdlConfigNil(b bool)` + + SetWsdlConfigNil sets the value for WsdlConfig to be an explicit nil + +### UnsetWsdlConfig +`func (o *Endpoint) UnsetWsdlConfig()` + +UnsetWsdlConfig ensures that no value is present for WsdlConfig, not even an explicit nil +### GetMuleVersion4OrAbove + +`func (o *Endpoint) GetMuleVersion4OrAbove() bool` + +GetMuleVersion4OrAbove returns the MuleVersion4OrAbove field if non-nil, zero value otherwise. + +### GetMuleVersion4OrAboveOk + +`func (o *Endpoint) GetMuleVersion4OrAboveOk() (*bool, bool)` + +GetMuleVersion4OrAboveOk returns a tuple with the MuleVersion4OrAbove field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMuleVersion4OrAbove + +`func (o *Endpoint) SetMuleVersion4OrAbove(v bool)` + +SetMuleVersion4OrAbove sets MuleVersion4OrAbove field to given value. + +### HasMuleVersion4OrAbove + +`func (o *Endpoint) HasMuleVersion4OrAbove() bool` + +HasMuleVersion4OrAbove returns a boolean if a field has been set. + +### SetMuleVersion4OrAboveNil + +`func (o *Endpoint) SetMuleVersion4OrAboveNil(b bool)` + + SetMuleVersion4OrAboveNil sets the value for MuleVersion4OrAbove to be an explicit nil + +### UnsetMuleVersion4OrAbove +`func (o *Endpoint) UnsetMuleVersion4OrAbove()` + +UnsetMuleVersion4OrAbove ensures that no value is present for MuleVersion4OrAbove, not even an explicit nil +### GetApiVersionId + +`func (o *Endpoint) GetApiVersionId() int32` + +GetApiVersionId returns the ApiVersionId field if non-nil, zero value otherwise. + +### GetApiVersionIdOk + +`func (o *Endpoint) GetApiVersionIdOk() (*int32, bool)` + +GetApiVersionIdOk returns a tuple with the ApiVersionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiVersionId + +`func (o *Endpoint) SetApiVersionId(v int32)` + +SetApiVersionId sets ApiVersionId field to given value. + +### HasApiVersionId + +`func (o *Endpoint) HasApiVersionId() bool` + +HasApiVersionId returns a boolean if a field has been set. + +### GetValidation + +`func (o *Endpoint) GetValidation() string` + +GetValidation returns the Validation field if non-nil, zero value otherwise. + +### GetValidationOk + +`func (o *Endpoint) GetValidationOk() (*string, bool)` + +GetValidationOk returns a tuple with the Validation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidation + +`func (o *Endpoint) SetValidation(v string)` + +SetValidation sets Validation field to given value. + +### HasValidation + +`func (o *Endpoint) HasValidation() bool` + +HasValidation returns a boolean if a field has been set. + +### SetValidationNil + +`func (o *Endpoint) SetValidationNil(b bool)` + + SetValidationNil sets the value for Validation to be an explicit nil + +### UnsetValidation +`func (o *Endpoint) UnsetValidation()` + +UnsetValidation ensures that no value is present for Validation, not even an explicit nil +### GetConsole + +`func (o *Endpoint) GetConsole() string` + +GetConsole returns the Console field if non-nil, zero value otherwise. + +### GetConsoleOk + +`func (o *Endpoint) GetConsoleOk() (*string, bool)` + +GetConsoleOk returns a tuple with the Console field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConsole + +`func (o *Endpoint) SetConsole(v string)` + +SetConsole sets Console field to given value. + +### HasConsole + +`func (o *Endpoint) HasConsole() bool` + +HasConsole returns a boolean if a field has been set. + +### SetConsoleNil + +`func (o *Endpoint) SetConsoleNil(b bool)` + + SetConsoleNil sets the value for Console to be an explicit nil + +### UnsetConsole +`func (o *Endpoint) UnsetConsole()` + +UnsetConsole ensures that no value is present for Console, not even an explicit nil +### GetTlsContexts + +`func (o *Endpoint) GetTlsContexts() EndpointTlsContexts` + +GetTlsContexts returns the TlsContexts field if non-nil, zero value otherwise. + +### GetTlsContextsOk + +`func (o *Endpoint) GetTlsContextsOk() (*EndpointTlsContexts, bool)` + +GetTlsContextsOk returns a tuple with the TlsContexts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContexts + +`func (o *Endpoint) SetTlsContexts(v EndpointTlsContexts)` + +SetTlsContexts sets TlsContexts field to given value. + +### HasTlsContexts + +`func (o *Endpoint) HasTlsContexts() bool` + +HasTlsContexts returns a boolean if a field has been set. + + +[[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/apim/docs/EndpointPostBody.md b/apim/docs/EndpointPostBody.md new file mode 100644 index 0000000..c452e40 --- /dev/null +++ b/apim/docs/EndpointPostBody.md @@ -0,0 +1,350 @@ +# EndpointPostBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeploymentType** | Pointer to **string** | | [optional] +**MuleVersion4OrAbove** | Pointer to **bool** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**IsCloudHub** | Pointer to **NullableString** | | [optional] +**ProxyUri** | Pointer to **NullableString** | | [optional] +**ProxyRegistrationUri** | Pointer to **NullableString** | | [optional] +**ReferencesUserDomain** | Pointer to **NullableString** | | [optional] +**ResponseTimeout** | Pointer to **NullableString** | | [optional] +**TlsContexts** | Pointer to [**NullableEndpointPostBodyTlsContexts**](EndpointPostBodyTlsContexts.md) | | [optional] + +## Methods + +### NewEndpointPostBody + +`func NewEndpointPostBody() *EndpointPostBody` + +NewEndpointPostBody instantiates a new EndpointPostBody 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 + +### NewEndpointPostBodyWithDefaults + +`func NewEndpointPostBodyWithDefaults() *EndpointPostBody` + +NewEndpointPostBodyWithDefaults instantiates a new EndpointPostBody 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 + +### GetDeploymentType + +`func (o *EndpointPostBody) GetDeploymentType() string` + +GetDeploymentType returns the DeploymentType field if non-nil, zero value otherwise. + +### GetDeploymentTypeOk + +`func (o *EndpointPostBody) GetDeploymentTypeOk() (*string, bool)` + +GetDeploymentTypeOk returns a tuple with the DeploymentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeploymentType + +`func (o *EndpointPostBody) SetDeploymentType(v string)` + +SetDeploymentType sets DeploymentType field to given value. + +### HasDeploymentType + +`func (o *EndpointPostBody) HasDeploymentType() bool` + +HasDeploymentType returns a boolean if a field has been set. + +### GetMuleVersion4OrAbove + +`func (o *EndpointPostBody) GetMuleVersion4OrAbove() bool` + +GetMuleVersion4OrAbove returns the MuleVersion4OrAbove field if non-nil, zero value otherwise. + +### GetMuleVersion4OrAboveOk + +`func (o *EndpointPostBody) GetMuleVersion4OrAboveOk() (*bool, bool)` + +GetMuleVersion4OrAboveOk returns a tuple with the MuleVersion4OrAbove field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMuleVersion4OrAbove + +`func (o *EndpointPostBody) SetMuleVersion4OrAbove(v bool)` + +SetMuleVersion4OrAbove sets MuleVersion4OrAbove field to given value. + +### HasMuleVersion4OrAbove + +`func (o *EndpointPostBody) HasMuleVersion4OrAbove() bool` + +HasMuleVersion4OrAbove returns a boolean if a field has been set. + +### GetUri + +`func (o *EndpointPostBody) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *EndpointPostBody) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *EndpointPostBody) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *EndpointPostBody) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetType + +`func (o *EndpointPostBody) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *EndpointPostBody) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *EndpointPostBody) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *EndpointPostBody) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetIsCloudHub + +`func (o *EndpointPostBody) GetIsCloudHub() string` + +GetIsCloudHub returns the IsCloudHub field if non-nil, zero value otherwise. + +### GetIsCloudHubOk + +`func (o *EndpointPostBody) GetIsCloudHubOk() (*string, bool)` + +GetIsCloudHubOk returns a tuple with the IsCloudHub field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsCloudHub + +`func (o *EndpointPostBody) SetIsCloudHub(v string)` + +SetIsCloudHub sets IsCloudHub field to given value. + +### HasIsCloudHub + +`func (o *EndpointPostBody) HasIsCloudHub() bool` + +HasIsCloudHub returns a boolean if a field has been set. + +### SetIsCloudHubNil + +`func (o *EndpointPostBody) SetIsCloudHubNil(b bool)` + + SetIsCloudHubNil sets the value for IsCloudHub to be an explicit nil + +### UnsetIsCloudHub +`func (o *EndpointPostBody) UnsetIsCloudHub()` + +UnsetIsCloudHub ensures that no value is present for IsCloudHub, not even an explicit nil +### GetProxyUri + +`func (o *EndpointPostBody) GetProxyUri() string` + +GetProxyUri returns the ProxyUri field if non-nil, zero value otherwise. + +### GetProxyUriOk + +`func (o *EndpointPostBody) GetProxyUriOk() (*string, bool)` + +GetProxyUriOk returns a tuple with the ProxyUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyUri + +`func (o *EndpointPostBody) SetProxyUri(v string)` + +SetProxyUri sets ProxyUri field to given value. + +### HasProxyUri + +`func (o *EndpointPostBody) HasProxyUri() bool` + +HasProxyUri returns a boolean if a field has been set. + +### SetProxyUriNil + +`func (o *EndpointPostBody) SetProxyUriNil(b bool)` + + SetProxyUriNil sets the value for ProxyUri to be an explicit nil + +### UnsetProxyUri +`func (o *EndpointPostBody) UnsetProxyUri()` + +UnsetProxyUri ensures that no value is present for ProxyUri, not even an explicit nil +### GetProxyRegistrationUri + +`func (o *EndpointPostBody) GetProxyRegistrationUri() string` + +GetProxyRegistrationUri returns the ProxyRegistrationUri field if non-nil, zero value otherwise. + +### GetProxyRegistrationUriOk + +`func (o *EndpointPostBody) GetProxyRegistrationUriOk() (*string, bool)` + +GetProxyRegistrationUriOk returns a tuple with the ProxyRegistrationUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyRegistrationUri + +`func (o *EndpointPostBody) SetProxyRegistrationUri(v string)` + +SetProxyRegistrationUri sets ProxyRegistrationUri field to given value. + +### HasProxyRegistrationUri + +`func (o *EndpointPostBody) HasProxyRegistrationUri() bool` + +HasProxyRegistrationUri returns a boolean if a field has been set. + +### SetProxyRegistrationUriNil + +`func (o *EndpointPostBody) SetProxyRegistrationUriNil(b bool)` + + SetProxyRegistrationUriNil sets the value for ProxyRegistrationUri to be an explicit nil + +### UnsetProxyRegistrationUri +`func (o *EndpointPostBody) UnsetProxyRegistrationUri()` + +UnsetProxyRegistrationUri ensures that no value is present for ProxyRegistrationUri, not even an explicit nil +### GetReferencesUserDomain + +`func (o *EndpointPostBody) GetReferencesUserDomain() string` + +GetReferencesUserDomain returns the ReferencesUserDomain field if non-nil, zero value otherwise. + +### GetReferencesUserDomainOk + +`func (o *EndpointPostBody) GetReferencesUserDomainOk() (*string, bool)` + +GetReferencesUserDomainOk returns a tuple with the ReferencesUserDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferencesUserDomain + +`func (o *EndpointPostBody) SetReferencesUserDomain(v string)` + +SetReferencesUserDomain sets ReferencesUserDomain field to given value. + +### HasReferencesUserDomain + +`func (o *EndpointPostBody) HasReferencesUserDomain() bool` + +HasReferencesUserDomain returns a boolean if a field has been set. + +### SetReferencesUserDomainNil + +`func (o *EndpointPostBody) SetReferencesUserDomainNil(b bool)` + + SetReferencesUserDomainNil sets the value for ReferencesUserDomain to be an explicit nil + +### UnsetReferencesUserDomain +`func (o *EndpointPostBody) UnsetReferencesUserDomain()` + +UnsetReferencesUserDomain ensures that no value is present for ReferencesUserDomain, not even an explicit nil +### GetResponseTimeout + +`func (o *EndpointPostBody) GetResponseTimeout() string` + +GetResponseTimeout returns the ResponseTimeout field if non-nil, zero value otherwise. + +### GetResponseTimeoutOk + +`func (o *EndpointPostBody) GetResponseTimeoutOk() (*string, bool)` + +GetResponseTimeoutOk returns a tuple with the ResponseTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseTimeout + +`func (o *EndpointPostBody) SetResponseTimeout(v string)` + +SetResponseTimeout sets ResponseTimeout field to given value. + +### HasResponseTimeout + +`func (o *EndpointPostBody) HasResponseTimeout() bool` + +HasResponseTimeout returns a boolean if a field has been set. + +### SetResponseTimeoutNil + +`func (o *EndpointPostBody) SetResponseTimeoutNil(b bool)` + + SetResponseTimeoutNil sets the value for ResponseTimeout to be an explicit nil + +### UnsetResponseTimeout +`func (o *EndpointPostBody) UnsetResponseTimeout()` + +UnsetResponseTimeout ensures that no value is present for ResponseTimeout, not even an explicit nil +### GetTlsContexts + +`func (o *EndpointPostBody) GetTlsContexts() EndpointPostBodyTlsContexts` + +GetTlsContexts returns the TlsContexts field if non-nil, zero value otherwise. + +### GetTlsContextsOk + +`func (o *EndpointPostBody) GetTlsContextsOk() (*EndpointPostBodyTlsContexts, bool)` + +GetTlsContextsOk returns a tuple with the TlsContexts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContexts + +`func (o *EndpointPostBody) SetTlsContexts(v EndpointPostBodyTlsContexts)` + +SetTlsContexts sets TlsContexts field to given value. + +### HasTlsContexts + +`func (o *EndpointPostBody) HasTlsContexts() bool` + +HasTlsContexts returns a boolean if a field has been set. + +### SetTlsContextsNil + +`func (o *EndpointPostBody) SetTlsContextsNil(b bool)` + + SetTlsContextsNil sets the value for TlsContexts to be an explicit nil + +### UnsetTlsContexts +`func (o *EndpointPostBody) UnsetTlsContexts()` + +UnsetTlsContexts ensures that no value is present for TlsContexts, not even an explicit nil + +[[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/apim/docs/EndpointPostBodyTlsContexts.md b/apim/docs/EndpointPostBodyTlsContexts.md new file mode 100644 index 0000000..87c73ee --- /dev/null +++ b/apim/docs/EndpointPostBodyTlsContexts.md @@ -0,0 +1,66 @@ +# EndpointPostBodyTlsContexts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Inbound** | Pointer to [**NullableEndpointPostBodyTlsContextsInbound**](EndpointPostBodyTlsContextsInbound.md) | | [optional] + +## Methods + +### NewEndpointPostBodyTlsContexts + +`func NewEndpointPostBodyTlsContexts() *EndpointPostBodyTlsContexts` + +NewEndpointPostBodyTlsContexts instantiates a new EndpointPostBodyTlsContexts 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 + +### NewEndpointPostBodyTlsContextsWithDefaults + +`func NewEndpointPostBodyTlsContextsWithDefaults() *EndpointPostBodyTlsContexts` + +NewEndpointPostBodyTlsContextsWithDefaults instantiates a new EndpointPostBodyTlsContexts 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 + +### GetInbound + +`func (o *EndpointPostBodyTlsContexts) GetInbound() EndpointPostBodyTlsContextsInbound` + +GetInbound returns the Inbound field if non-nil, zero value otherwise. + +### GetInboundOk + +`func (o *EndpointPostBodyTlsContexts) GetInboundOk() (*EndpointPostBodyTlsContextsInbound, bool)` + +GetInboundOk returns a tuple with the Inbound field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInbound + +`func (o *EndpointPostBodyTlsContexts) SetInbound(v EndpointPostBodyTlsContextsInbound)` + +SetInbound sets Inbound field to given value. + +### HasInbound + +`func (o *EndpointPostBodyTlsContexts) HasInbound() bool` + +HasInbound returns a boolean if a field has been set. + +### SetInboundNil + +`func (o *EndpointPostBodyTlsContexts) SetInboundNil(b bool)` + + SetInboundNil sets the value for Inbound to be an explicit nil + +### UnsetInbound +`func (o *EndpointPostBodyTlsContexts) UnsetInbound()` + +UnsetInbound ensures that no value is present for Inbound, not even an explicit nil + +[[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/apim/docs/EndpointPostBodyTlsContextsInbound.md b/apim/docs/EndpointPostBodyTlsContextsInbound.md new file mode 100644 index 0000000..0929118 --- /dev/null +++ b/apim/docs/EndpointPostBodyTlsContextsInbound.md @@ -0,0 +1,108 @@ +# EndpointPostBodyTlsContextsInbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TlsContextId** | Pointer to **string** | | [optional] +**SecretGroupId** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewEndpointPostBodyTlsContextsInbound + +`func NewEndpointPostBodyTlsContextsInbound() *EndpointPostBodyTlsContextsInbound` + +NewEndpointPostBodyTlsContextsInbound instantiates a new EndpointPostBodyTlsContextsInbound 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 + +### NewEndpointPostBodyTlsContextsInboundWithDefaults + +`func NewEndpointPostBodyTlsContextsInboundWithDefaults() *EndpointPostBodyTlsContextsInbound` + +NewEndpointPostBodyTlsContextsInboundWithDefaults instantiates a new EndpointPostBodyTlsContextsInbound 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 + +### GetTlsContextId + +`func (o *EndpointPostBodyTlsContextsInbound) GetTlsContextId() string` + +GetTlsContextId returns the TlsContextId field if non-nil, zero value otherwise. + +### GetTlsContextIdOk + +`func (o *EndpointPostBodyTlsContextsInbound) GetTlsContextIdOk() (*string, bool)` + +GetTlsContextIdOk returns a tuple with the TlsContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContextId + +`func (o *EndpointPostBodyTlsContextsInbound) SetTlsContextId(v string)` + +SetTlsContextId sets TlsContextId field to given value. + +### HasTlsContextId + +`func (o *EndpointPostBodyTlsContextsInbound) HasTlsContextId() bool` + +HasTlsContextId returns a boolean if a field has been set. + +### GetSecretGroupId + +`func (o *EndpointPostBodyTlsContextsInbound) GetSecretGroupId() string` + +GetSecretGroupId returns the SecretGroupId field if non-nil, zero value otherwise. + +### GetSecretGroupIdOk + +`func (o *EndpointPostBodyTlsContextsInbound) GetSecretGroupIdOk() (*string, bool)` + +GetSecretGroupIdOk returns a tuple with the SecretGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretGroupId + +`func (o *EndpointPostBodyTlsContextsInbound) SetSecretGroupId(v string)` + +SetSecretGroupId sets SecretGroupId field to given value. + +### HasSecretGroupId + +`func (o *EndpointPostBodyTlsContextsInbound) HasSecretGroupId() bool` + +HasSecretGroupId returns a boolean if a field has been set. + +### GetName + +`func (o *EndpointPostBodyTlsContextsInbound) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *EndpointPostBodyTlsContextsInbound) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *EndpointPostBodyTlsContextsInbound) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *EndpointPostBodyTlsContextsInbound) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[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/apim/docs/EndpointTlsContexts.md b/apim/docs/EndpointTlsContexts.md new file mode 100644 index 0000000..de1b524 --- /dev/null +++ b/apim/docs/EndpointTlsContexts.md @@ -0,0 +1,128 @@ +# EndpointTlsContexts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**Inbound** | Pointer to [**NullableEndpointTlsContextsInbound**](EndpointTlsContextsInbound.md) | | [optional] +**Outbound** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewEndpointTlsContexts + +`func NewEndpointTlsContexts() *EndpointTlsContexts` + +NewEndpointTlsContexts instantiates a new EndpointTlsContexts 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 + +### NewEndpointTlsContextsWithDefaults + +`func NewEndpointTlsContextsWithDefaults() *EndpointTlsContexts` + +NewEndpointTlsContextsWithDefaults instantiates a new EndpointTlsContexts 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 + +### GetAudit + +`func (o *EndpointTlsContexts) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *EndpointTlsContexts) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *EndpointTlsContexts) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *EndpointTlsContexts) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetInbound + +`func (o *EndpointTlsContexts) GetInbound() EndpointTlsContextsInbound` + +GetInbound returns the Inbound field if non-nil, zero value otherwise. + +### GetInboundOk + +`func (o *EndpointTlsContexts) GetInboundOk() (*EndpointTlsContextsInbound, bool)` + +GetInboundOk returns a tuple with the Inbound field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInbound + +`func (o *EndpointTlsContexts) SetInbound(v EndpointTlsContextsInbound)` + +SetInbound sets Inbound field to given value. + +### HasInbound + +`func (o *EndpointTlsContexts) HasInbound() bool` + +HasInbound returns a boolean if a field has been set. + +### SetInboundNil + +`func (o *EndpointTlsContexts) SetInboundNil(b bool)` + + SetInboundNil sets the value for Inbound to be an explicit nil + +### UnsetInbound +`func (o *EndpointTlsContexts) UnsetInbound()` + +UnsetInbound ensures that no value is present for Inbound, not even an explicit nil +### GetOutbound + +`func (o *EndpointTlsContexts) GetOutbound() map[string]interface{}` + +GetOutbound returns the Outbound field if non-nil, zero value otherwise. + +### GetOutboundOk + +`func (o *EndpointTlsContexts) GetOutboundOk() (*map[string]interface{}, bool)` + +GetOutboundOk returns a tuple with the Outbound field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOutbound + +`func (o *EndpointTlsContexts) SetOutbound(v map[string]interface{})` + +SetOutbound sets Outbound field to given value. + +### HasOutbound + +`func (o *EndpointTlsContexts) HasOutbound() bool` + +HasOutbound returns a boolean if a field has been set. + +### SetOutboundNil + +`func (o *EndpointTlsContexts) SetOutboundNil(b bool)` + + SetOutboundNil sets the value for Outbound to be an explicit nil + +### UnsetOutbound +`func (o *EndpointTlsContexts) UnsetOutbound()` + +UnsetOutbound ensures that no value is present for Outbound, not even an explicit nil + +[[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/apim/docs/EndpointTlsContextsInbound.md b/apim/docs/EndpointTlsContextsInbound.md new file mode 100644 index 0000000..3a14e9e --- /dev/null +++ b/apim/docs/EndpointTlsContextsInbound.md @@ -0,0 +1,134 @@ +# EndpointTlsContextsInbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SecretGroupId** | Pointer to **string** | | [optional] +**TlsContextId** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Authorized** | Pointer to **bool** | | [optional] + +## Methods + +### NewEndpointTlsContextsInbound + +`func NewEndpointTlsContextsInbound() *EndpointTlsContextsInbound` + +NewEndpointTlsContextsInbound instantiates a new EndpointTlsContextsInbound 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 + +### NewEndpointTlsContextsInboundWithDefaults + +`func NewEndpointTlsContextsInboundWithDefaults() *EndpointTlsContextsInbound` + +NewEndpointTlsContextsInboundWithDefaults instantiates a new EndpointTlsContextsInbound 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 + +### GetSecretGroupId + +`func (o *EndpointTlsContextsInbound) GetSecretGroupId() string` + +GetSecretGroupId returns the SecretGroupId field if non-nil, zero value otherwise. + +### GetSecretGroupIdOk + +`func (o *EndpointTlsContextsInbound) GetSecretGroupIdOk() (*string, bool)` + +GetSecretGroupIdOk returns a tuple with the SecretGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretGroupId + +`func (o *EndpointTlsContextsInbound) SetSecretGroupId(v string)` + +SetSecretGroupId sets SecretGroupId field to given value. + +### HasSecretGroupId + +`func (o *EndpointTlsContextsInbound) HasSecretGroupId() bool` + +HasSecretGroupId returns a boolean if a field has been set. + +### GetTlsContextId + +`func (o *EndpointTlsContextsInbound) GetTlsContextId() string` + +GetTlsContextId returns the TlsContextId field if non-nil, zero value otherwise. + +### GetTlsContextIdOk + +`func (o *EndpointTlsContextsInbound) GetTlsContextIdOk() (*string, bool)` + +GetTlsContextIdOk returns a tuple with the TlsContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContextId + +`func (o *EndpointTlsContextsInbound) SetTlsContextId(v string)` + +SetTlsContextId sets TlsContextId field to given value. + +### HasTlsContextId + +`func (o *EndpointTlsContextsInbound) HasTlsContextId() bool` + +HasTlsContextId returns a boolean if a field has been set. + +### GetName + +`func (o *EndpointTlsContextsInbound) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *EndpointTlsContextsInbound) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *EndpointTlsContextsInbound) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *EndpointTlsContextsInbound) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAuthorized + +`func (o *EndpointTlsContextsInbound) GetAuthorized() bool` + +GetAuthorized returns the Authorized field if non-nil, zero value otherwise. + +### GetAuthorizedOk + +`func (o *EndpointTlsContextsInbound) GetAuthorizedOk() (*bool, bool)` + +GetAuthorizedOk returns a tuple with the Authorized field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorized + +`func (o *EndpointTlsContextsInbound) SetAuthorized(v bool)` + +SetAuthorized sets Authorized field to given value. + +### HasAuthorized + +`func (o *EndpointTlsContextsInbound) HasAuthorized() bool` + +HasAuthorized returns a boolean if a field has been set. + + +[[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/apim/docs/ErrorsResponse.md b/apim/docs/ErrorsResponse.md new file mode 100644 index 0000000..ef8a2f5 --- /dev/null +++ b/apim/docs/ErrorsResponse.md @@ -0,0 +1,56 @@ +# ErrorsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | Pointer to [**[]ErrorsResponseErrors**](ErrorsResponseErrors.md) | | [optional] + +## Methods + +### NewErrorsResponse + +`func NewErrorsResponse() *ErrorsResponse` + +NewErrorsResponse instantiates a new ErrorsResponse 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 + +### NewErrorsResponseWithDefaults + +`func NewErrorsResponseWithDefaults() *ErrorsResponse` + +NewErrorsResponseWithDefaults instantiates a new ErrorsResponse 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 + +### GetErrors + +`func (o *ErrorsResponse) GetErrors() []ErrorsResponseErrors` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *ErrorsResponse) GetErrorsOk() (*[]ErrorsResponseErrors, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *ErrorsResponse) SetErrors(v []ErrorsResponseErrors)` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *ErrorsResponse) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[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/apim/docs/ErrorsResponseErrors.md b/apim/docs/ErrorsResponseErrors.md new file mode 100644 index 0000000..d5baab7 --- /dev/null +++ b/apim/docs/ErrorsResponseErrors.md @@ -0,0 +1,186 @@ +# ErrorsResponseErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] +**DataPath** | Pointer to **string** | | [optional] +**Keyword** | Pointer to **string** | | [optional] +**Schema** | Pointer to **string** | | [optional] +**Data** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewErrorsResponseErrors + +`func NewErrorsResponseErrors() *ErrorsResponseErrors` + +NewErrorsResponseErrors instantiates a new ErrorsResponseErrors 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 + +### NewErrorsResponseErrorsWithDefaults + +`func NewErrorsResponseErrorsWithDefaults() *ErrorsResponseErrors` + +NewErrorsResponseErrorsWithDefaults instantiates a new ErrorsResponseErrors 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 + +### GetType + +`func (o *ErrorsResponseErrors) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ErrorsResponseErrors) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ErrorsResponseErrors) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ErrorsResponseErrors) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDataPath + +`func (o *ErrorsResponseErrors) GetDataPath() string` + +GetDataPath returns the DataPath field if non-nil, zero value otherwise. + +### GetDataPathOk + +`func (o *ErrorsResponseErrors) GetDataPathOk() (*string, bool)` + +GetDataPathOk returns a tuple with the DataPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataPath + +`func (o *ErrorsResponseErrors) SetDataPath(v string)` + +SetDataPath sets DataPath field to given value. + +### HasDataPath + +`func (o *ErrorsResponseErrors) HasDataPath() bool` + +HasDataPath returns a boolean if a field has been set. + +### GetKeyword + +`func (o *ErrorsResponseErrors) GetKeyword() string` + +GetKeyword returns the Keyword field if non-nil, zero value otherwise. + +### GetKeywordOk + +`func (o *ErrorsResponseErrors) GetKeywordOk() (*string, bool)` + +GetKeywordOk returns a tuple with the Keyword field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyword + +`func (o *ErrorsResponseErrors) SetKeyword(v string)` + +SetKeyword sets Keyword field to given value. + +### HasKeyword + +`func (o *ErrorsResponseErrors) HasKeyword() bool` + +HasKeyword returns a boolean if a field has been set. + +### GetSchema + +`func (o *ErrorsResponseErrors) GetSchema() string` + +GetSchema returns the Schema field if non-nil, zero value otherwise. + +### GetSchemaOk + +`func (o *ErrorsResponseErrors) GetSchemaOk() (*string, bool)` + +GetSchemaOk returns a tuple with the Schema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchema + +`func (o *ErrorsResponseErrors) SetSchema(v string)` + +SetSchema sets Schema field to given value. + +### HasSchema + +`func (o *ErrorsResponseErrors) HasSchema() bool` + +HasSchema returns a boolean if a field has been set. + +### GetData + +`func (o *ErrorsResponseErrors) GetData() string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ErrorsResponseErrors) GetDataOk() (*string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ErrorsResponseErrors) SetData(v string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ErrorsResponseErrors) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorsResponseErrors) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorsResponseErrors) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorsResponseErrors) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ErrorsResponseErrors) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[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/apim/docs/InlineResponse404.md b/apim/docs/InlineResponse404.md new file mode 100644 index 0000000..1a3ff91 --- /dev/null +++ b/apim/docs/InlineResponse404.md @@ -0,0 +1,82 @@ +# InlineResponse404 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewInlineResponse404 + +`func NewInlineResponse404() *InlineResponse404` + +NewInlineResponse404 instantiates a new InlineResponse404 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 + +### NewInlineResponse404WithDefaults + +`func NewInlineResponse404WithDefaults() *InlineResponse404` + +NewInlineResponse404WithDefaults instantiates a new InlineResponse404 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 + +### GetName + +`func (o *InlineResponse404) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *InlineResponse404) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *InlineResponse404) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *InlineResponse404) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMessage + +`func (o *InlineResponse404) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *InlineResponse404) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *InlineResponse404) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *InlineResponse404) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[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/apim/docs/Routing.md b/apim/docs/Routing.md new file mode 100644 index 0000000..d85f230 --- /dev/null +++ b/apim/docs/Routing.md @@ -0,0 +1,108 @@ +# Routing + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Label** | Pointer to **string** | | [optional] +**Rules** | Pointer to [**RoutingRules**](RoutingRules.md) | | [optional] +**Upstreams** | Pointer to [**[]RoutingUpstreams**](RoutingUpstreams.md) | | [optional] + +## Methods + +### NewRouting + +`func NewRouting() *Routing` + +NewRouting instantiates a new Routing 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 + +### NewRoutingWithDefaults + +`func NewRoutingWithDefaults() *Routing` + +NewRoutingWithDefaults instantiates a new Routing 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 + +### GetLabel + +`func (o *Routing) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *Routing) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *Routing) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *Routing) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetRules + +`func (o *Routing) GetRules() RoutingRules` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *Routing) GetRulesOk() (*RoutingRules, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *Routing) SetRules(v RoutingRules)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *Routing) HasRules() bool` + +HasRules returns a boolean if a field has been set. + +### GetUpstreams + +`func (o *Routing) GetUpstreams() []RoutingUpstreams` + +GetUpstreams returns the Upstreams field if non-nil, zero value otherwise. + +### GetUpstreamsOk + +`func (o *Routing) GetUpstreamsOk() (*[]RoutingUpstreams, bool)` + +GetUpstreamsOk returns a tuple with the Upstreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreams + +`func (o *Routing) SetUpstreams(v []RoutingUpstreams)` + +SetUpstreams sets Upstreams field to given value. + +### HasUpstreams + +`func (o *Routing) HasUpstreams() bool` + +HasUpstreams returns a boolean if a field has been set. + + +[[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/apim/docs/RoutingRules.md b/apim/docs/RoutingRules.md new file mode 100644 index 0000000..014483b --- /dev/null +++ b/apim/docs/RoutingRules.md @@ -0,0 +1,134 @@ +# RoutingRules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Methods** | Pointer to **string** | | [optional] +**Host** | Pointer to **string** | | [optional] +**Path** | Pointer to **string** | | [optional] +**Headers** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewRoutingRules + +`func NewRoutingRules() *RoutingRules` + +NewRoutingRules instantiates a new RoutingRules 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 + +### NewRoutingRulesWithDefaults + +`func NewRoutingRulesWithDefaults() *RoutingRules` + +NewRoutingRulesWithDefaults instantiates a new RoutingRules 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 + +### GetMethods + +`func (o *RoutingRules) GetMethods() string` + +GetMethods returns the Methods field if non-nil, zero value otherwise. + +### GetMethodsOk + +`func (o *RoutingRules) GetMethodsOk() (*string, bool)` + +GetMethodsOk returns a tuple with the Methods field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethods + +`func (o *RoutingRules) SetMethods(v string)` + +SetMethods sets Methods field to given value. + +### HasMethods + +`func (o *RoutingRules) HasMethods() bool` + +HasMethods returns a boolean if a field has been set. + +### GetHost + +`func (o *RoutingRules) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *RoutingRules) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *RoutingRules) SetHost(v string)` + +SetHost sets Host field to given value. + +### HasHost + +`func (o *RoutingRules) HasHost() bool` + +HasHost returns a boolean if a field has been set. + +### GetPath + +`func (o *RoutingRules) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *RoutingRules) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *RoutingRules) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *RoutingRules) HasPath() bool` + +HasPath returns a boolean if a field has been set. + +### GetHeaders + +`func (o *RoutingRules) GetHeaders() map[string]interface{}` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *RoutingRules) GetHeadersOk() (*map[string]interface{}, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *RoutingRules) SetHeaders(v map[string]interface{})` + +SetHeaders sets Headers field to given value. + +### HasHeaders + +`func (o *RoutingRules) HasHeaders() bool` + +HasHeaders returns a boolean if a field has been set. + + +[[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/apim/docs/RoutingUpstreams.md b/apim/docs/RoutingUpstreams.md new file mode 100644 index 0000000..a628636 --- /dev/null +++ b/apim/docs/RoutingUpstreams.md @@ -0,0 +1,134 @@ +# RoutingUpstreams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Weight** | Pointer to **int32** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**Label** | Pointer to **string** | | [optional] + +## Methods + +### NewRoutingUpstreams + +`func NewRoutingUpstreams() *RoutingUpstreams` + +NewRoutingUpstreams instantiates a new RoutingUpstreams 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 + +### NewRoutingUpstreamsWithDefaults + +`func NewRoutingUpstreamsWithDefaults() *RoutingUpstreams` + +NewRoutingUpstreamsWithDefaults instantiates a new RoutingUpstreams 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 + +### GetId + +`func (o *RoutingUpstreams) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RoutingUpstreams) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RoutingUpstreams) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RoutingUpstreams) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetWeight + +`func (o *RoutingUpstreams) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *RoutingUpstreams) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *RoutingUpstreams) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *RoutingUpstreams) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + +### GetUri + +`func (o *RoutingUpstreams) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *RoutingUpstreams) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *RoutingUpstreams) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *RoutingUpstreams) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetLabel + +`func (o *RoutingUpstreams) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *RoutingUpstreams) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *RoutingUpstreams) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *RoutingUpstreams) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + + +[[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/apim/docs/Spec.md b/apim/docs/Spec.md new file mode 100644 index 0000000..85daafc --- /dev/null +++ b/apim/docs/Spec.md @@ -0,0 +1,108 @@ +# Spec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetId** | Pointer to **string** | | [optional] +**GroupId** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] + +## Methods + +### NewSpec + +`func NewSpec() *Spec` + +NewSpec instantiates a new Spec 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 + +### NewSpecWithDefaults + +`func NewSpecWithDefaults() *Spec` + +NewSpecWithDefaults instantiates a new Spec 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 + +### GetAssetId + +`func (o *Spec) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *Spec) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *Spec) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *Spec) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetGroupId + +`func (o *Spec) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *Spec) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *Spec) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *Spec) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetVersion + +`func (o *Spec) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *Spec) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *Spec) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *Spec) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + + +[[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/apim/git_push.sh b/apim/git_push.sh new file mode 100644 index 0000000..7b7f8fb --- /dev/null +++ b/apim/git_push.sh @@ -0,0 +1,58 @@ +#!/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 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="mulesoft-anypoint" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="anypoint-client-go" + 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://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${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://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/apim/go.mod b/apim/go.mod new file mode 100644 index 0000000..9dd09da --- /dev/null +++ b/apim/go.mod @@ -0,0 +1,7 @@ +module github.com/mulesoft-anypoint/anypoint-client-go/apim + +go 1.13 + +require ( + golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 +) diff --git a/apim/go.sum b/apim/go.sum new file mode 100644 index 0000000..734252e --- /dev/null +++ b/apim/go.sum @@ -0,0 +1,13 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/apim/model_apim_instance_collection.go b/apim/model_apim_instance_collection.go new file mode 100644 index 0000000..f576f52 --- /dev/null +++ b/apim/model_apim_instance_collection.go @@ -0,0 +1,151 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ApimInstanceCollection struct for ApimInstanceCollection +type ApimInstanceCollection struct { + Total *int32 `json:"total,omitempty"` + Assets *[]ApimInstanceCollectionAssets `json:"assets,omitempty"` +} + +// NewApimInstanceCollection instantiates a new ApimInstanceCollection 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 NewApimInstanceCollection() *ApimInstanceCollection { + this := ApimInstanceCollection{} + return &this +} + +// NewApimInstanceCollectionWithDefaults instantiates a new ApimInstanceCollection 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 NewApimInstanceCollectionWithDefaults() *ApimInstanceCollection { + this := ApimInstanceCollection{} + return &this +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ApimInstanceCollection) GetTotal() int32 { + if o == nil || o.Total == nil { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollection) GetTotalOk() (*int32, bool) { + if o == nil || o.Total == nil { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ApimInstanceCollection) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *ApimInstanceCollection) SetTotal(v int32) { + o.Total = &v +} + +// GetAssets returns the Assets field value if set, zero value otherwise. +func (o *ApimInstanceCollection) GetAssets() []ApimInstanceCollectionAssets { + if o == nil || o.Assets == nil { + var ret []ApimInstanceCollectionAssets + return ret + } + return *o.Assets +} + +// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollection) GetAssetsOk() (*[]ApimInstanceCollectionAssets, bool) { + if o == nil || o.Assets == nil { + return nil, false + } + return o.Assets, true +} + +// HasAssets returns a boolean if a field has been set. +func (o *ApimInstanceCollection) HasAssets() bool { + if o != nil && o.Assets != nil { + return true + } + + return false +} + +// SetAssets gets a reference to the given []ApimInstanceCollectionAssets and assigns it to the Assets field. +func (o *ApimInstanceCollection) SetAssets(v []ApimInstanceCollectionAssets) { + o.Assets = &v +} + +func (o ApimInstanceCollection) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Total != nil { + toSerialize["total"] = o.Total + } + if o.Assets != nil { + toSerialize["assets"] = o.Assets + } + return json.Marshal(toSerialize) +} + +type NullableApimInstanceCollection struct { + value *ApimInstanceCollection + isSet bool +} + +func (v NullableApimInstanceCollection) Get() *ApimInstanceCollection { + return v.value +} + +func (v *NullableApimInstanceCollection) Set(val *ApimInstanceCollection) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstanceCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstanceCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstanceCollection(val *ApimInstanceCollection) *NullableApimInstanceCollection { + return &NullableApimInstanceCollection{value: val, isSet: true} +} + +func (v NullableApimInstanceCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstanceCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_apim_instance_collection_apis.go b/apim/model_apim_instance_collection_apis.go new file mode 100644 index 0000000..a8e4334 --- /dev/null +++ b/apim/model_apim_instance_collection_apis.go @@ -0,0 +1,1025 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ApimInstanceCollectionApis struct for ApimInstanceCollectionApis +type ApimInstanceCollectionApis struct { + Audit *Audit `json:"audit,omitempty"` + MasterOrganizationId *string `json:"masterOrganizationId,omitempty"` + OrganizationId *string `json:"organizationId,omitempty"` + Id *int32 `json:"id,omitempty"` + InstanceLabel *string `json:"instanceLabel,omitempty"` + GroupId *string `json:"groupId,omitempty"` + AssetId *string `json:"assetId,omitempty"` + AssetVersion *string `json:"assetVersion,omitempty"` + ProductVersion *string `json:"productVersion,omitempty"` + Description *string `json:"description,omitempty"` + Tags *[]string `json:"tags,omitempty"` + Order *int32 `json:"order,omitempty"` + ProviderId *string `json:"providerId,omitempty"` + Deprecated *bool `json:"deprecated,omitempty"` + LastActiveDate *string `json:"lastActiveDate,omitempty"` + EndpointUri *string `json:"endpointUri,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + IsPublic *bool `json:"isPublic,omitempty"` + Stage *string `json:"stage,omitempty"` + Technology *string `json:"technology,omitempty"` + Status *string `json:"status,omitempty"` + Deployment NullableDeployment `json:"deployment,omitempty"` + Routing *[]Routing `json:"routing,omitempty"` + Pinned *bool `json:"pinned,omitempty"` + ActiveContractsCount *int32 `json:"activeContractsCount,omitempty"` + AutodiscoveryInstanceName *string `json:"autodiscoveryInstanceName,omitempty"` +} + +// NewApimInstanceCollectionApis instantiates a new ApimInstanceCollectionApis 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 NewApimInstanceCollectionApis() *ApimInstanceCollectionApis { + this := ApimInstanceCollectionApis{} + return &this +} + +// NewApimInstanceCollectionApisWithDefaults instantiates a new ApimInstanceCollectionApis 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 NewApimInstanceCollectionApisWithDefaults() *ApimInstanceCollectionApis { + this := ApimInstanceCollectionApis{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *ApimInstanceCollectionApis) SetAudit(v Audit) { + o.Audit = &v +} + +// GetMasterOrganizationId returns the MasterOrganizationId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetMasterOrganizationId() string { + if o == nil || o.MasterOrganizationId == nil { + var ret string + return ret + } + return *o.MasterOrganizationId +} + +// GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetMasterOrganizationIdOk() (*string, bool) { + if o == nil || o.MasterOrganizationId == nil { + return nil, false + } + return o.MasterOrganizationId, true +} + +// HasMasterOrganizationId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasMasterOrganizationId() bool { + if o != nil && o.MasterOrganizationId != nil { + return true + } + + return false +} + +// SetMasterOrganizationId gets a reference to the given string and assigns it to the MasterOrganizationId field. +func (o *ApimInstanceCollectionApis) SetMasterOrganizationId(v string) { + o.MasterOrganizationId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *ApimInstanceCollectionApis) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ApimInstanceCollectionApis) SetId(v int32) { + o.Id = &v +} + +// GetInstanceLabel returns the InstanceLabel field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetInstanceLabel() string { + if o == nil || o.InstanceLabel == nil { + var ret string + return ret + } + return *o.InstanceLabel +} + +// GetInstanceLabelOk returns a tuple with the InstanceLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetInstanceLabelOk() (*string, bool) { + if o == nil || o.InstanceLabel == nil { + return nil, false + } + return o.InstanceLabel, true +} + +// HasInstanceLabel returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasInstanceLabel() bool { + if o != nil && o.InstanceLabel != nil { + return true + } + + return false +} + +// SetInstanceLabel gets a reference to the given string and assigns it to the InstanceLabel field. +func (o *ApimInstanceCollectionApis) SetInstanceLabel(v string) { + o.InstanceLabel = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetGroupId() string { + if o == nil || o.GroupId == nil { + var ret string + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetGroupIdOk() (*string, bool) { + if o == nil || o.GroupId == nil { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasGroupId() bool { + if o != nil && o.GroupId != nil { + return true + } + + return false +} + +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. +func (o *ApimInstanceCollectionApis) SetGroupId(v string) { + o.GroupId = &v +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *ApimInstanceCollectionApis) SetAssetId(v string) { + o.AssetId = &v +} + +// GetAssetVersion returns the AssetVersion field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetAssetVersion() string { + if o == nil || o.AssetVersion == nil { + var ret string + return ret + } + return *o.AssetVersion +} + +// GetAssetVersionOk returns a tuple with the AssetVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetAssetVersionOk() (*string, bool) { + if o == nil || o.AssetVersion == nil { + return nil, false + } + return o.AssetVersion, true +} + +// HasAssetVersion returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasAssetVersion() bool { + if o != nil && o.AssetVersion != nil { + return true + } + + return false +} + +// SetAssetVersion gets a reference to the given string and assigns it to the AssetVersion field. +func (o *ApimInstanceCollectionApis) SetAssetVersion(v string) { + o.AssetVersion = &v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetProductVersion() string { + if o == nil || o.ProductVersion == nil { + var ret string + return ret + } + return *o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetProductVersionOk() (*string, bool) { + if o == nil || o.ProductVersion == nil { + return nil, false + } + return o.ProductVersion, true +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasProductVersion() bool { + if o != nil && o.ProductVersion != nil { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given string and assigns it to the ProductVersion field. +func (o *ApimInstanceCollectionApis) SetProductVersion(v string) { + o.ProductVersion = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ApimInstanceCollectionApis) SetDescription(v string) { + o.Description = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ApimInstanceCollectionApis) SetTags(v []string) { + o.Tags = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetOrder() int32 { + if o == nil || o.Order == nil { + var ret int32 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetOrderOk() (*int32, bool) { + if o == nil || o.Order == nil { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasOrder() bool { + if o != nil && o.Order != nil { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *ApimInstanceCollectionApis) SetOrder(v int32) { + o.Order = &v +} + +// GetProviderId returns the ProviderId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetProviderId() string { + if o == nil || o.ProviderId == nil { + var ret string + return ret + } + return *o.ProviderId +} + +// GetProviderIdOk returns a tuple with the ProviderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetProviderIdOk() (*string, bool) { + if o == nil || o.ProviderId == nil { + return nil, false + } + return o.ProviderId, true +} + +// HasProviderId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasProviderId() bool { + if o != nil && o.ProviderId != nil { + return true + } + + return false +} + +// SetProviderId gets a reference to the given string and assigns it to the ProviderId field. +func (o *ApimInstanceCollectionApis) SetProviderId(v string) { + o.ProviderId = &v +} + +// GetDeprecated returns the Deprecated field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetDeprecated() bool { + if o == nil || o.Deprecated == nil { + var ret bool + return ret + } + return *o.Deprecated +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetDeprecatedOk() (*bool, bool) { + if o == nil || o.Deprecated == nil { + return nil, false + } + return o.Deprecated, true +} + +// HasDeprecated returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasDeprecated() bool { + if o != nil && o.Deprecated != nil { + return true + } + + return false +} + +// SetDeprecated gets a reference to the given bool and assigns it to the Deprecated field. +func (o *ApimInstanceCollectionApis) SetDeprecated(v bool) { + o.Deprecated = &v +} + +// GetLastActiveDate returns the LastActiveDate field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetLastActiveDate() string { + if o == nil || o.LastActiveDate == nil { + var ret string + return ret + } + return *o.LastActiveDate +} + +// GetLastActiveDateOk returns a tuple with the LastActiveDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetLastActiveDateOk() (*string, bool) { + if o == nil || o.LastActiveDate == nil { + return nil, false + } + return o.LastActiveDate, true +} + +// HasLastActiveDate returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasLastActiveDate() bool { + if o != nil && o.LastActiveDate != nil { + return true + } + + return false +} + +// SetLastActiveDate gets a reference to the given string and assigns it to the LastActiveDate field. +func (o *ApimInstanceCollectionApis) SetLastActiveDate(v string) { + o.LastActiveDate = &v +} + +// GetEndpointUri returns the EndpointUri field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetEndpointUri() string { + if o == nil || o.EndpointUri == nil { + var ret string + return ret + } + return *o.EndpointUri +} + +// GetEndpointUriOk returns a tuple with the EndpointUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetEndpointUriOk() (*string, bool) { + if o == nil || o.EndpointUri == nil { + return nil, false + } + return o.EndpointUri, true +} + +// HasEndpointUri returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasEndpointUri() bool { + if o != nil && o.EndpointUri != nil { + return true + } + + return false +} + +// SetEndpointUri gets a reference to the given string and assigns it to the EndpointUri field. +func (o *ApimInstanceCollectionApis) SetEndpointUri(v string) { + o.EndpointUri = &v +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetEnvironmentId() string { + if o == nil || o.EnvironmentId == nil { + var ret string + return ret + } + return *o.EnvironmentId +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetEnvironmentIdOk() (*string, bool) { + if o == nil || o.EnvironmentId == nil { + return nil, false + } + return o.EnvironmentId, true +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasEnvironmentId() bool { + if o != nil && o.EnvironmentId != nil { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given string and assigns it to the EnvironmentId field. +func (o *ApimInstanceCollectionApis) SetEnvironmentId(v string) { + o.EnvironmentId = &v +} + +// GetIsPublic returns the IsPublic field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetIsPublic() bool { + if o == nil || o.IsPublic == nil { + var ret bool + return ret + } + return *o.IsPublic +} + +// GetIsPublicOk returns a tuple with the IsPublic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetIsPublicOk() (*bool, bool) { + if o == nil || o.IsPublic == nil { + return nil, false + } + return o.IsPublic, true +} + +// HasIsPublic returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasIsPublic() bool { + if o != nil && o.IsPublic != nil { + return true + } + + return false +} + +// SetIsPublic gets a reference to the given bool and assigns it to the IsPublic field. +func (o *ApimInstanceCollectionApis) SetIsPublic(v bool) { + o.IsPublic = &v +} + +// GetStage returns the Stage field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetStage() string { + if o == nil || o.Stage == nil { + var ret string + return ret + } + return *o.Stage +} + +// GetStageOk returns a tuple with the Stage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetStageOk() (*string, bool) { + if o == nil || o.Stage == nil { + return nil, false + } + return o.Stage, true +} + +// HasStage returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasStage() bool { + if o != nil && o.Stage != nil { + return true + } + + return false +} + +// SetStage gets a reference to the given string and assigns it to the Stage field. +func (o *ApimInstanceCollectionApis) SetStage(v string) { + o.Stage = &v +} + +// GetTechnology returns the Technology field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetTechnology() string { + if o == nil || o.Technology == nil { + var ret string + return ret + } + return *o.Technology +} + +// GetTechnologyOk returns a tuple with the Technology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetTechnologyOk() (*string, bool) { + if o == nil || o.Technology == nil { + return nil, false + } + return o.Technology, true +} + +// HasTechnology returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasTechnology() bool { + if o != nil && o.Technology != nil { + return true + } + + return false +} + +// SetTechnology gets a reference to the given string and assigns it to the Technology field. +func (o *ApimInstanceCollectionApis) SetTechnology(v string) { + o.Technology = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ApimInstanceCollectionApis) SetStatus(v string) { + o.Status = &v +} + +// GetDeployment returns the Deployment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstanceCollectionApis) GetDeployment() Deployment { + if o == nil || o.Deployment.Get() == nil { + var ret Deployment + return ret + } + return *o.Deployment.Get() +} + +// GetDeploymentOk returns a tuple with the Deployment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstanceCollectionApis) GetDeploymentOk() (*Deployment, bool) { + if o == nil { + return nil, false + } + return o.Deployment.Get(), o.Deployment.IsSet() +} + +// HasDeployment returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasDeployment() bool { + if o != nil && o.Deployment.IsSet() { + return true + } + + return false +} + +// SetDeployment gets a reference to the given NullableDeployment and assigns it to the Deployment field. +func (o *ApimInstanceCollectionApis) SetDeployment(v Deployment) { + o.Deployment.Set(&v) +} +// SetDeploymentNil sets the value for Deployment to be an explicit nil +func (o *ApimInstanceCollectionApis) SetDeploymentNil() { + o.Deployment.Set(nil) +} + +// UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +func (o *ApimInstanceCollectionApis) UnsetDeployment() { + o.Deployment.Unset() +} + +// GetRouting returns the Routing field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetRouting() []Routing { + if o == nil || o.Routing == nil { + var ret []Routing + return ret + } + return *o.Routing +} + +// GetRoutingOk returns a tuple with the Routing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetRoutingOk() (*[]Routing, bool) { + if o == nil || o.Routing == nil { + return nil, false + } + return o.Routing, true +} + +// HasRouting returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasRouting() bool { + if o != nil && o.Routing != nil { + return true + } + + return false +} + +// SetRouting gets a reference to the given []Routing and assigns it to the Routing field. +func (o *ApimInstanceCollectionApis) SetRouting(v []Routing) { + o.Routing = &v +} + +// GetPinned returns the Pinned field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetPinned() bool { + if o == nil || o.Pinned == nil { + var ret bool + return ret + } + return *o.Pinned +} + +// GetPinnedOk returns a tuple with the Pinned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetPinnedOk() (*bool, bool) { + if o == nil || o.Pinned == nil { + return nil, false + } + return o.Pinned, true +} + +// HasPinned returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasPinned() bool { + if o != nil && o.Pinned != nil { + return true + } + + return false +} + +// SetPinned gets a reference to the given bool and assigns it to the Pinned field. +func (o *ApimInstanceCollectionApis) SetPinned(v bool) { + o.Pinned = &v +} + +// GetActiveContractsCount returns the ActiveContractsCount field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetActiveContractsCount() int32 { + if o == nil || o.ActiveContractsCount == nil { + var ret int32 + return ret + } + return *o.ActiveContractsCount +} + +// GetActiveContractsCountOk returns a tuple with the ActiveContractsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetActiveContractsCountOk() (*int32, bool) { + if o == nil || o.ActiveContractsCount == nil { + return nil, false + } + return o.ActiveContractsCount, true +} + +// HasActiveContractsCount returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasActiveContractsCount() bool { + if o != nil && o.ActiveContractsCount != nil { + return true + } + + return false +} + +// SetActiveContractsCount gets a reference to the given int32 and assigns it to the ActiveContractsCount field. +func (o *ApimInstanceCollectionApis) SetActiveContractsCount(v int32) { + o.ActiveContractsCount = &v +} + +// GetAutodiscoveryInstanceName returns the AutodiscoveryInstanceName field value if set, zero value otherwise. +func (o *ApimInstanceCollectionApis) GetAutodiscoveryInstanceName() string { + if o == nil || o.AutodiscoveryInstanceName == nil { + var ret string + return ret + } + return *o.AutodiscoveryInstanceName +} + +// GetAutodiscoveryInstanceNameOk returns a tuple with the AutodiscoveryInstanceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionApis) GetAutodiscoveryInstanceNameOk() (*string, bool) { + if o == nil || o.AutodiscoveryInstanceName == nil { + return nil, false + } + return o.AutodiscoveryInstanceName, true +} + +// HasAutodiscoveryInstanceName returns a boolean if a field has been set. +func (o *ApimInstanceCollectionApis) HasAutodiscoveryInstanceName() bool { + if o != nil && o.AutodiscoveryInstanceName != nil { + return true + } + + return false +} + +// SetAutodiscoveryInstanceName gets a reference to the given string and assigns it to the AutodiscoveryInstanceName field. +func (o *ApimInstanceCollectionApis) SetAutodiscoveryInstanceName(v string) { + o.AutodiscoveryInstanceName = &v +} + +func (o ApimInstanceCollectionApis) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.MasterOrganizationId != nil { + toSerialize["masterOrganizationId"] = o.MasterOrganizationId + } + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.InstanceLabel != nil { + toSerialize["instanceLabel"] = o.InstanceLabel + } + if o.GroupId != nil { + toSerialize["groupId"] = o.GroupId + } + if o.AssetId != nil { + toSerialize["assetId"] = o.AssetId + } + if o.AssetVersion != nil { + toSerialize["assetVersion"] = o.AssetVersion + } + if o.ProductVersion != nil { + toSerialize["productVersion"] = o.ProductVersion + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Order != nil { + toSerialize["order"] = o.Order + } + if o.ProviderId != nil { + toSerialize["providerId"] = o.ProviderId + } + if o.Deprecated != nil { + toSerialize["deprecated"] = o.Deprecated + } + if o.LastActiveDate != nil { + toSerialize["lastActiveDate"] = o.LastActiveDate + } + if o.EndpointUri != nil { + toSerialize["endpointUri"] = o.EndpointUri + } + if o.EnvironmentId != nil { + toSerialize["environmentId"] = o.EnvironmentId + } + if o.IsPublic != nil { + toSerialize["isPublic"] = o.IsPublic + } + if o.Stage != nil { + toSerialize["stage"] = o.Stage + } + if o.Technology != nil { + toSerialize["technology"] = o.Technology + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Deployment.IsSet() { + toSerialize["deployment"] = o.Deployment.Get() + } + if o.Routing != nil { + toSerialize["routing"] = o.Routing + } + if o.Pinned != nil { + toSerialize["pinned"] = o.Pinned + } + if o.ActiveContractsCount != nil { + toSerialize["activeContractsCount"] = o.ActiveContractsCount + } + if o.AutodiscoveryInstanceName != nil { + toSerialize["autodiscoveryInstanceName"] = o.AutodiscoveryInstanceName + } + return json.Marshal(toSerialize) +} + +type NullableApimInstanceCollectionApis struct { + value *ApimInstanceCollectionApis + isSet bool +} + +func (v NullableApimInstanceCollectionApis) Get() *ApimInstanceCollectionApis { + return v.value +} + +func (v *NullableApimInstanceCollectionApis) Set(val *ApimInstanceCollectionApis) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstanceCollectionApis) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstanceCollectionApis) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstanceCollectionApis(val *ApimInstanceCollectionApis) *NullableApimInstanceCollectionApis { + return &NullableApimInstanceCollectionApis{value: val, isSet: true} +} + +func (v NullableApimInstanceCollectionApis) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstanceCollectionApis) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_apim_instance_collection_assets.go b/apim/model_apim_instance_collection_assets.go new file mode 100644 index 0000000..2df5cc6 --- /dev/null +++ b/apim/model_apim_instance_collection_assets.go @@ -0,0 +1,475 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ApimInstanceCollectionAssets struct for ApimInstanceCollectionAssets +type ApimInstanceCollectionAssets struct { + Audit *Audit `json:"audit,omitempty"` + MasterOrganizationId *string `json:"masterOrganizationId,omitempty"` + OrganizationId *string `json:"organizationId,omitempty"` + Id *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ExchangeAssetName *string `json:"exchangeAssetName,omitempty"` + GroupId *string `json:"groupId,omitempty"` + AssetId *string `json:"assetId,omitempty"` + Apis *[]ApimInstanceCollectionApis `json:"apis,omitempty"` + TotalApis *int32 `json:"totalApis,omitempty"` + AutodiscoveryApiName *string `json:"autodiscoveryApiName,omitempty"` +} + +// NewApimInstanceCollectionAssets instantiates a new ApimInstanceCollectionAssets 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 NewApimInstanceCollectionAssets() *ApimInstanceCollectionAssets { + this := ApimInstanceCollectionAssets{} + return &this +} + +// NewApimInstanceCollectionAssetsWithDefaults instantiates a new ApimInstanceCollectionAssets 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 NewApimInstanceCollectionAssetsWithDefaults() *ApimInstanceCollectionAssets { + this := ApimInstanceCollectionAssets{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *ApimInstanceCollectionAssets) SetAudit(v Audit) { + o.Audit = &v +} + +// GetMasterOrganizationId returns the MasterOrganizationId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetMasterOrganizationId() string { + if o == nil || o.MasterOrganizationId == nil { + var ret string + return ret + } + return *o.MasterOrganizationId +} + +// GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetMasterOrganizationIdOk() (*string, bool) { + if o == nil || o.MasterOrganizationId == nil { + return nil, false + } + return o.MasterOrganizationId, true +} + +// HasMasterOrganizationId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasMasterOrganizationId() bool { + if o != nil && o.MasterOrganizationId != nil { + return true + } + + return false +} + +// SetMasterOrganizationId gets a reference to the given string and assigns it to the MasterOrganizationId field. +func (o *ApimInstanceCollectionAssets) SetMasterOrganizationId(v string) { + o.MasterOrganizationId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *ApimInstanceCollectionAssets) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ApimInstanceCollectionAssets) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ApimInstanceCollectionAssets) SetName(v string) { + o.Name = &v +} + +// GetExchangeAssetName returns the ExchangeAssetName field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetExchangeAssetName() string { + if o == nil || o.ExchangeAssetName == nil { + var ret string + return ret + } + return *o.ExchangeAssetName +} + +// GetExchangeAssetNameOk returns a tuple with the ExchangeAssetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetExchangeAssetNameOk() (*string, bool) { + if o == nil || o.ExchangeAssetName == nil { + return nil, false + } + return o.ExchangeAssetName, true +} + +// HasExchangeAssetName returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasExchangeAssetName() bool { + if o != nil && o.ExchangeAssetName != nil { + return true + } + + return false +} + +// SetExchangeAssetName gets a reference to the given string and assigns it to the ExchangeAssetName field. +func (o *ApimInstanceCollectionAssets) SetExchangeAssetName(v string) { + o.ExchangeAssetName = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetGroupId() string { + if o == nil || o.GroupId == nil { + var ret string + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetGroupIdOk() (*string, bool) { + if o == nil || o.GroupId == nil { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasGroupId() bool { + if o != nil && o.GroupId != nil { + return true + } + + return false +} + +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. +func (o *ApimInstanceCollectionAssets) SetGroupId(v string) { + o.GroupId = &v +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *ApimInstanceCollectionAssets) SetAssetId(v string) { + o.AssetId = &v +} + +// GetApis returns the Apis field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetApis() []ApimInstanceCollectionApis { + if o == nil || o.Apis == nil { + var ret []ApimInstanceCollectionApis + return ret + } + return *o.Apis +} + +// GetApisOk returns a tuple with the Apis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetApisOk() (*[]ApimInstanceCollectionApis, bool) { + if o == nil || o.Apis == nil { + return nil, false + } + return o.Apis, true +} + +// HasApis returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasApis() bool { + if o != nil && o.Apis != nil { + return true + } + + return false +} + +// SetApis gets a reference to the given []ApimInstanceCollectionApis and assigns it to the Apis field. +func (o *ApimInstanceCollectionAssets) SetApis(v []ApimInstanceCollectionApis) { + o.Apis = &v +} + +// GetTotalApis returns the TotalApis field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetTotalApis() int32 { + if o == nil || o.TotalApis == nil { + var ret int32 + return ret + } + return *o.TotalApis +} + +// GetTotalApisOk returns a tuple with the TotalApis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetTotalApisOk() (*int32, bool) { + if o == nil || o.TotalApis == nil { + return nil, false + } + return o.TotalApis, true +} + +// HasTotalApis returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasTotalApis() bool { + if o != nil && o.TotalApis != nil { + return true + } + + return false +} + +// SetTotalApis gets a reference to the given int32 and assigns it to the TotalApis field. +func (o *ApimInstanceCollectionAssets) SetTotalApis(v int32) { + o.TotalApis = &v +} + +// GetAutodiscoveryApiName returns the AutodiscoveryApiName field value if set, zero value otherwise. +func (o *ApimInstanceCollectionAssets) GetAutodiscoveryApiName() string { + if o == nil || o.AutodiscoveryApiName == nil { + var ret string + return ret + } + return *o.AutodiscoveryApiName +} + +// GetAutodiscoveryApiNameOk returns a tuple with the AutodiscoveryApiName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceCollectionAssets) GetAutodiscoveryApiNameOk() (*string, bool) { + if o == nil || o.AutodiscoveryApiName == nil { + return nil, false + } + return o.AutodiscoveryApiName, true +} + +// HasAutodiscoveryApiName returns a boolean if a field has been set. +func (o *ApimInstanceCollectionAssets) HasAutodiscoveryApiName() bool { + if o != nil && o.AutodiscoveryApiName != nil { + return true + } + + return false +} + +// SetAutodiscoveryApiName gets a reference to the given string and assigns it to the AutodiscoveryApiName field. +func (o *ApimInstanceCollectionAssets) SetAutodiscoveryApiName(v string) { + o.AutodiscoveryApiName = &v +} + +func (o ApimInstanceCollectionAssets) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.MasterOrganizationId != nil { + toSerialize["masterOrganizationId"] = o.MasterOrganizationId + } + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.ExchangeAssetName != nil { + toSerialize["exchangeAssetName"] = o.ExchangeAssetName + } + if o.GroupId != nil { + toSerialize["groupId"] = o.GroupId + } + if o.AssetId != nil { + toSerialize["assetId"] = o.AssetId + } + if o.Apis != nil { + toSerialize["apis"] = o.Apis + } + if o.TotalApis != nil { + toSerialize["totalApis"] = o.TotalApis + } + if o.AutodiscoveryApiName != nil { + toSerialize["autodiscoveryApiName"] = o.AutodiscoveryApiName + } + return json.Marshal(toSerialize) +} + +type NullableApimInstanceCollectionAssets struct { + value *ApimInstanceCollectionAssets + isSet bool +} + +func (v NullableApimInstanceCollectionAssets) Get() *ApimInstanceCollectionAssets { + return v.value +} + +func (v *NullableApimInstanceCollectionAssets) Set(val *ApimInstanceCollectionAssets) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstanceCollectionAssets) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstanceCollectionAssets) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstanceCollectionAssets(val *ApimInstanceCollectionAssets) *NullableApimInstanceCollectionAssets { + return &NullableApimInstanceCollectionAssets{value: val, isSet: true} +} + +func (v NullableApimInstanceCollectionAssets) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstanceCollectionAssets) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_apim_instance_details.go b/apim/model_apim_instance_details.go new file mode 100644 index 0000000..bdfb7b4 --- /dev/null +++ b/apim/model_apim_instance_details.go @@ -0,0 +1,1020 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" + "time" +) + +// ApimInstanceDetails struct for ApimInstanceDetails +type ApimInstanceDetails struct { + Audit *Audit `json:"audit,omitempty"` + MasterOrganizationId *string `json:"masterOrganizationId,omitempty"` + OrganizationId *string `json:"organizationId,omitempty"` + Id *int32 `json:"id,omitempty"` + InstanceLabel *string `json:"instanceLabel,omitempty"` + GroupId *string `json:"groupId,omitempty"` + AssetId *string `json:"assetId,omitempty"` + AssetVersion *string `json:"assetVersion,omitempty"` + ProductVersion *string `json:"productVersion,omitempty"` + Description NullableString `json:"description,omitempty"` + Tags *[]string `json:"tags,omitempty"` + Order *int32 `json:"order,omitempty"` + ProviderId NullableString `json:"providerId,omitempty"` + Deprecated *bool `json:"deprecated,omitempty"` + LastActiveDate NullableTime `json:"lastActiveDate,omitempty"` + EndpointUri *string `json:"endpointUri,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + IsPublic *bool `json:"isPublic,omitempty"` + Stage *string `json:"stage,omitempty"` + Technology *string `json:"technology,omitempty"` + Endpoint *Endpoint `json:"endpoint,omitempty"` + Deployment NullableDeployment `json:"deployment,omitempty"` + Routing *[]Routing `json:"routing,omitempty"` + Status *string `json:"status,omitempty"` + AutodiscoveryInstanceName *string `json:"autodiscoveryInstanceName,omitempty"` +} + +// NewApimInstanceDetails instantiates a new ApimInstanceDetails 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 NewApimInstanceDetails() *ApimInstanceDetails { + this := ApimInstanceDetails{} + return &this +} + +// NewApimInstanceDetailsWithDefaults instantiates a new ApimInstanceDetails 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 NewApimInstanceDetailsWithDefaults() *ApimInstanceDetails { + this := ApimInstanceDetails{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *ApimInstanceDetails) SetAudit(v Audit) { + o.Audit = &v +} + +// GetMasterOrganizationId returns the MasterOrganizationId field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetMasterOrganizationId() string { + if o == nil || o.MasterOrganizationId == nil { + var ret string + return ret + } + return *o.MasterOrganizationId +} + +// GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetMasterOrganizationIdOk() (*string, bool) { + if o == nil || o.MasterOrganizationId == nil { + return nil, false + } + return o.MasterOrganizationId, true +} + +// HasMasterOrganizationId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasMasterOrganizationId() bool { + if o != nil && o.MasterOrganizationId != nil { + return true + } + + return false +} + +// SetMasterOrganizationId gets a reference to the given string and assigns it to the MasterOrganizationId field. +func (o *ApimInstanceDetails) SetMasterOrganizationId(v string) { + o.MasterOrganizationId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *ApimInstanceDetails) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ApimInstanceDetails) SetId(v int32) { + o.Id = &v +} + +// GetInstanceLabel returns the InstanceLabel field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetInstanceLabel() string { + if o == nil || o.InstanceLabel == nil { + var ret string + return ret + } + return *o.InstanceLabel +} + +// GetInstanceLabelOk returns a tuple with the InstanceLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetInstanceLabelOk() (*string, bool) { + if o == nil || o.InstanceLabel == nil { + return nil, false + } + return o.InstanceLabel, true +} + +// HasInstanceLabel returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasInstanceLabel() bool { + if o != nil && o.InstanceLabel != nil { + return true + } + + return false +} + +// SetInstanceLabel gets a reference to the given string and assigns it to the InstanceLabel field. +func (o *ApimInstanceDetails) SetInstanceLabel(v string) { + o.InstanceLabel = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetGroupId() string { + if o == nil || o.GroupId == nil { + var ret string + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetGroupIdOk() (*string, bool) { + if o == nil || o.GroupId == nil { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasGroupId() bool { + if o != nil && o.GroupId != nil { + return true + } + + return false +} + +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. +func (o *ApimInstanceDetails) SetGroupId(v string) { + o.GroupId = &v +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *ApimInstanceDetails) SetAssetId(v string) { + o.AssetId = &v +} + +// GetAssetVersion returns the AssetVersion field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetAssetVersion() string { + if o == nil || o.AssetVersion == nil { + var ret string + return ret + } + return *o.AssetVersion +} + +// GetAssetVersionOk returns a tuple with the AssetVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetAssetVersionOk() (*string, bool) { + if o == nil || o.AssetVersion == nil { + return nil, false + } + return o.AssetVersion, true +} + +// HasAssetVersion returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasAssetVersion() bool { + if o != nil && o.AssetVersion != nil { + return true + } + + return false +} + +// SetAssetVersion gets a reference to the given string and assigns it to the AssetVersion field. +func (o *ApimInstanceDetails) SetAssetVersion(v string) { + o.AssetVersion = &v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetProductVersion() string { + if o == nil || o.ProductVersion == nil { + var ret string + return ret + } + return *o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetProductVersionOk() (*string, bool) { + if o == nil || o.ProductVersion == nil { + return nil, false + } + return o.ProductVersion, true +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasProductVersion() bool { + if o != nil && o.ProductVersion != nil { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given string and assigns it to the ProductVersion field. +func (o *ApimInstanceDetails) SetProductVersion(v string) { + o.ProductVersion = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstanceDetails) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstanceDetails) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ApimInstanceDetails) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ApimInstanceDetails) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ApimInstanceDetails) UnsetDescription() { + o.Description.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ApimInstanceDetails) SetTags(v []string) { + o.Tags = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetOrder() int32 { + if o == nil || o.Order == nil { + var ret int32 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetOrderOk() (*int32, bool) { + if o == nil || o.Order == nil { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasOrder() bool { + if o != nil && o.Order != nil { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *ApimInstanceDetails) SetOrder(v int32) { + o.Order = &v +} + +// GetProviderId returns the ProviderId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstanceDetails) GetProviderId() string { + if o == nil || o.ProviderId.Get() == nil { + var ret string + return ret + } + return *o.ProviderId.Get() +} + +// GetProviderIdOk returns a tuple with the ProviderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstanceDetails) GetProviderIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProviderId.Get(), o.ProviderId.IsSet() +} + +// HasProviderId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasProviderId() bool { + if o != nil && o.ProviderId.IsSet() { + return true + } + + return false +} + +// SetProviderId gets a reference to the given NullableString and assigns it to the ProviderId field. +func (o *ApimInstanceDetails) SetProviderId(v string) { + o.ProviderId.Set(&v) +} +// SetProviderIdNil sets the value for ProviderId to be an explicit nil +func (o *ApimInstanceDetails) SetProviderIdNil() { + o.ProviderId.Set(nil) +} + +// UnsetProviderId ensures that no value is present for ProviderId, not even an explicit nil +func (o *ApimInstanceDetails) UnsetProviderId() { + o.ProviderId.Unset() +} + +// GetDeprecated returns the Deprecated field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetDeprecated() bool { + if o == nil || o.Deprecated == nil { + var ret bool + return ret + } + return *o.Deprecated +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetDeprecatedOk() (*bool, bool) { + if o == nil || o.Deprecated == nil { + return nil, false + } + return o.Deprecated, true +} + +// HasDeprecated returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasDeprecated() bool { + if o != nil && o.Deprecated != nil { + return true + } + + return false +} + +// SetDeprecated gets a reference to the given bool and assigns it to the Deprecated field. +func (o *ApimInstanceDetails) SetDeprecated(v bool) { + o.Deprecated = &v +} + +// GetLastActiveDate returns the LastActiveDate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstanceDetails) GetLastActiveDate() time.Time { + if o == nil || o.LastActiveDate.Get() == nil { + var ret time.Time + return ret + } + return *o.LastActiveDate.Get() +} + +// GetLastActiveDateOk returns a tuple with the LastActiveDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstanceDetails) GetLastActiveDateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastActiveDate.Get(), o.LastActiveDate.IsSet() +} + +// HasLastActiveDate returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasLastActiveDate() bool { + if o != nil && o.LastActiveDate.IsSet() { + return true + } + + return false +} + +// SetLastActiveDate gets a reference to the given NullableTime and assigns it to the LastActiveDate field. +func (o *ApimInstanceDetails) SetLastActiveDate(v time.Time) { + o.LastActiveDate.Set(&v) +} +// SetLastActiveDateNil sets the value for LastActiveDate to be an explicit nil +func (o *ApimInstanceDetails) SetLastActiveDateNil() { + o.LastActiveDate.Set(nil) +} + +// UnsetLastActiveDate ensures that no value is present for LastActiveDate, not even an explicit nil +func (o *ApimInstanceDetails) UnsetLastActiveDate() { + o.LastActiveDate.Unset() +} + +// GetEndpointUri returns the EndpointUri field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetEndpointUri() string { + if o == nil || o.EndpointUri == nil { + var ret string + return ret + } + return *o.EndpointUri +} + +// GetEndpointUriOk returns a tuple with the EndpointUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetEndpointUriOk() (*string, bool) { + if o == nil || o.EndpointUri == nil { + return nil, false + } + return o.EndpointUri, true +} + +// HasEndpointUri returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasEndpointUri() bool { + if o != nil && o.EndpointUri != nil { + return true + } + + return false +} + +// SetEndpointUri gets a reference to the given string and assigns it to the EndpointUri field. +func (o *ApimInstanceDetails) SetEndpointUri(v string) { + o.EndpointUri = &v +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetEnvironmentId() string { + if o == nil || o.EnvironmentId == nil { + var ret string + return ret + } + return *o.EnvironmentId +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetEnvironmentIdOk() (*string, bool) { + if o == nil || o.EnvironmentId == nil { + return nil, false + } + return o.EnvironmentId, true +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasEnvironmentId() bool { + if o != nil && o.EnvironmentId != nil { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given string and assigns it to the EnvironmentId field. +func (o *ApimInstanceDetails) SetEnvironmentId(v string) { + o.EnvironmentId = &v +} + +// GetIsPublic returns the IsPublic field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetIsPublic() bool { + if o == nil || o.IsPublic == nil { + var ret bool + return ret + } + return *o.IsPublic +} + +// GetIsPublicOk returns a tuple with the IsPublic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetIsPublicOk() (*bool, bool) { + if o == nil || o.IsPublic == nil { + return nil, false + } + return o.IsPublic, true +} + +// HasIsPublic returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasIsPublic() bool { + if o != nil && o.IsPublic != nil { + return true + } + + return false +} + +// SetIsPublic gets a reference to the given bool and assigns it to the IsPublic field. +func (o *ApimInstanceDetails) SetIsPublic(v bool) { + o.IsPublic = &v +} + +// GetStage returns the Stage field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetStage() string { + if o == nil || o.Stage == nil { + var ret string + return ret + } + return *o.Stage +} + +// GetStageOk returns a tuple with the Stage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetStageOk() (*string, bool) { + if o == nil || o.Stage == nil { + return nil, false + } + return o.Stage, true +} + +// HasStage returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasStage() bool { + if o != nil && o.Stage != nil { + return true + } + + return false +} + +// SetStage gets a reference to the given string and assigns it to the Stage field. +func (o *ApimInstanceDetails) SetStage(v string) { + o.Stage = &v +} + +// GetTechnology returns the Technology field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetTechnology() string { + if o == nil || o.Technology == nil { + var ret string + return ret + } + return *o.Technology +} + +// GetTechnologyOk returns a tuple with the Technology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetTechnologyOk() (*string, bool) { + if o == nil || o.Technology == nil { + return nil, false + } + return o.Technology, true +} + +// HasTechnology returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasTechnology() bool { + if o != nil && o.Technology != nil { + return true + } + + return false +} + +// SetTechnology gets a reference to the given string and assigns it to the Technology field. +func (o *ApimInstanceDetails) SetTechnology(v string) { + o.Technology = &v +} + +// GetEndpoint returns the Endpoint field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetEndpoint() Endpoint { + if o == nil || o.Endpoint == nil { + var ret Endpoint + return ret + } + return *o.Endpoint +} + +// GetEndpointOk returns a tuple with the Endpoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetEndpointOk() (*Endpoint, bool) { + if o == nil || o.Endpoint == nil { + return nil, false + } + return o.Endpoint, true +} + +// HasEndpoint returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasEndpoint() bool { + if o != nil && o.Endpoint != nil { + return true + } + + return false +} + +// SetEndpoint gets a reference to the given Endpoint and assigns it to the Endpoint field. +func (o *ApimInstanceDetails) SetEndpoint(v Endpoint) { + o.Endpoint = &v +} + +// GetDeployment returns the Deployment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstanceDetails) GetDeployment() Deployment { + if o == nil || o.Deployment.Get() == nil { + var ret Deployment + return ret + } + return *o.Deployment.Get() +} + +// GetDeploymentOk returns a tuple with the Deployment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstanceDetails) GetDeploymentOk() (*Deployment, bool) { + if o == nil { + return nil, false + } + return o.Deployment.Get(), o.Deployment.IsSet() +} + +// HasDeployment returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasDeployment() bool { + if o != nil && o.Deployment.IsSet() { + return true + } + + return false +} + +// SetDeployment gets a reference to the given NullableDeployment and assigns it to the Deployment field. +func (o *ApimInstanceDetails) SetDeployment(v Deployment) { + o.Deployment.Set(&v) +} +// SetDeploymentNil sets the value for Deployment to be an explicit nil +func (o *ApimInstanceDetails) SetDeploymentNil() { + o.Deployment.Set(nil) +} + +// UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +func (o *ApimInstanceDetails) UnsetDeployment() { + o.Deployment.Unset() +} + +// GetRouting returns the Routing field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetRouting() []Routing { + if o == nil || o.Routing == nil { + var ret []Routing + return ret + } + return *o.Routing +} + +// GetRoutingOk returns a tuple with the Routing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetRoutingOk() (*[]Routing, bool) { + if o == nil || o.Routing == nil { + return nil, false + } + return o.Routing, true +} + +// HasRouting returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasRouting() bool { + if o != nil && o.Routing != nil { + return true + } + + return false +} + +// SetRouting gets a reference to the given []Routing and assigns it to the Routing field. +func (o *ApimInstanceDetails) SetRouting(v []Routing) { + o.Routing = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ApimInstanceDetails) SetStatus(v string) { + o.Status = &v +} + +// GetAutodiscoveryInstanceName returns the AutodiscoveryInstanceName field value if set, zero value otherwise. +func (o *ApimInstanceDetails) GetAutodiscoveryInstanceName() string { + if o == nil || o.AutodiscoveryInstanceName == nil { + var ret string + return ret + } + return *o.AutodiscoveryInstanceName +} + +// GetAutodiscoveryInstanceNameOk returns a tuple with the AutodiscoveryInstanceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstanceDetails) GetAutodiscoveryInstanceNameOk() (*string, bool) { + if o == nil || o.AutodiscoveryInstanceName == nil { + return nil, false + } + return o.AutodiscoveryInstanceName, true +} + +// HasAutodiscoveryInstanceName returns a boolean if a field has been set. +func (o *ApimInstanceDetails) HasAutodiscoveryInstanceName() bool { + if o != nil && o.AutodiscoveryInstanceName != nil { + return true + } + + return false +} + +// SetAutodiscoveryInstanceName gets a reference to the given string and assigns it to the AutodiscoveryInstanceName field. +func (o *ApimInstanceDetails) SetAutodiscoveryInstanceName(v string) { + o.AutodiscoveryInstanceName = &v +} + +func (o ApimInstanceDetails) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.MasterOrganizationId != nil { + toSerialize["masterOrganizationId"] = o.MasterOrganizationId + } + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.InstanceLabel != nil { + toSerialize["instanceLabel"] = o.InstanceLabel + } + if o.GroupId != nil { + toSerialize["groupId"] = o.GroupId + } + if o.AssetId != nil { + toSerialize["assetId"] = o.AssetId + } + if o.AssetVersion != nil { + toSerialize["assetVersion"] = o.AssetVersion + } + if o.ProductVersion != nil { + toSerialize["productVersion"] = o.ProductVersion + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Order != nil { + toSerialize["order"] = o.Order + } + if o.ProviderId.IsSet() { + toSerialize["providerId"] = o.ProviderId.Get() + } + if o.Deprecated != nil { + toSerialize["deprecated"] = o.Deprecated + } + if o.LastActiveDate.IsSet() { + toSerialize["lastActiveDate"] = o.LastActiveDate.Get() + } + if o.EndpointUri != nil { + toSerialize["endpointUri"] = o.EndpointUri + } + if o.EnvironmentId != nil { + toSerialize["environmentId"] = o.EnvironmentId + } + if o.IsPublic != nil { + toSerialize["isPublic"] = o.IsPublic + } + if o.Stage != nil { + toSerialize["stage"] = o.Stage + } + if o.Technology != nil { + toSerialize["technology"] = o.Technology + } + if o.Endpoint != nil { + toSerialize["endpoint"] = o.Endpoint + } + if o.Deployment.IsSet() { + toSerialize["deployment"] = o.Deployment.Get() + } + if o.Routing != nil { + toSerialize["routing"] = o.Routing + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.AutodiscoveryInstanceName != nil { + toSerialize["autodiscoveryInstanceName"] = o.AutodiscoveryInstanceName + } + return json.Marshal(toSerialize) +} + +type NullableApimInstanceDetails struct { + value *ApimInstanceDetails + isSet bool +} + +func (v NullableApimInstanceDetails) Get() *ApimInstanceDetails { + return v.value +} + +func (v *NullableApimInstanceDetails) Set(val *ApimInstanceDetails) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstanceDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstanceDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstanceDetails(val *ApimInstanceDetails) *NullableApimInstanceDetails { + return &NullableApimInstanceDetails{value: val, isSet: true} +} + +func (v NullableApimInstanceDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstanceDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_apim_instance_patch_response.go b/apim/model_apim_instance_patch_response.go new file mode 100644 index 0000000..3fc1939 --- /dev/null +++ b/apim/model_apim_instance_patch_response.go @@ -0,0 +1,531 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ApimInstancePatchResponse struct for ApimInstancePatchResponse +type ApimInstancePatchResponse struct { + Audit *Audit `json:"audit,omitempty"` + MasterOrganizationId *string `json:"masterOrganizationId,omitempty"` + OrganizationId *string `json:"organizationId,omitempty"` + Id *int32 `json:"id,omitempty"` + InstanceLabel *string `json:"instanceLabel,omitempty"` + ProviderId NullableString `json:"providerId,omitempty"` + EndpointUri *string `json:"endpointUri,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + Technology *string `json:"technology,omitempty"` + Routing *[]Routing `json:"routing,omitempty"` + Endpoint *Endpoint `json:"endpoint,omitempty"` + Deployment NullableDeployment `json:"deployment,omitempty"` +} + +// NewApimInstancePatchResponse instantiates a new ApimInstancePatchResponse 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 NewApimInstancePatchResponse() *ApimInstancePatchResponse { + this := ApimInstancePatchResponse{} + return &this +} + +// NewApimInstancePatchResponseWithDefaults instantiates a new ApimInstancePatchResponse 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 NewApimInstancePatchResponseWithDefaults() *ApimInstancePatchResponse { + this := ApimInstancePatchResponse{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *ApimInstancePatchResponse) SetAudit(v Audit) { + o.Audit = &v +} + +// GetMasterOrganizationId returns the MasterOrganizationId field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetMasterOrganizationId() string { + if o == nil || o.MasterOrganizationId == nil { + var ret string + return ret + } + return *o.MasterOrganizationId +} + +// GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetMasterOrganizationIdOk() (*string, bool) { + if o == nil || o.MasterOrganizationId == nil { + return nil, false + } + return o.MasterOrganizationId, true +} + +// HasMasterOrganizationId returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasMasterOrganizationId() bool { + if o != nil && o.MasterOrganizationId != nil { + return true + } + + return false +} + +// SetMasterOrganizationId gets a reference to the given string and assigns it to the MasterOrganizationId field. +func (o *ApimInstancePatchResponse) SetMasterOrganizationId(v string) { + o.MasterOrganizationId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *ApimInstancePatchResponse) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ApimInstancePatchResponse) SetId(v int32) { + o.Id = &v +} + +// GetInstanceLabel returns the InstanceLabel field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetInstanceLabel() string { + if o == nil || o.InstanceLabel == nil { + var ret string + return ret + } + return *o.InstanceLabel +} + +// GetInstanceLabelOk returns a tuple with the InstanceLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetInstanceLabelOk() (*string, bool) { + if o == nil || o.InstanceLabel == nil { + return nil, false + } + return o.InstanceLabel, true +} + +// HasInstanceLabel returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasInstanceLabel() bool { + if o != nil && o.InstanceLabel != nil { + return true + } + + return false +} + +// SetInstanceLabel gets a reference to the given string and assigns it to the InstanceLabel field. +func (o *ApimInstancePatchResponse) SetInstanceLabel(v string) { + o.InstanceLabel = &v +} + +// GetProviderId returns the ProviderId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePatchResponse) GetProviderId() string { + if o == nil || o.ProviderId.Get() == nil { + var ret string + return ret + } + return *o.ProviderId.Get() +} + +// GetProviderIdOk returns a tuple with the ProviderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePatchResponse) GetProviderIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProviderId.Get(), o.ProviderId.IsSet() +} + +// HasProviderId returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasProviderId() bool { + if o != nil && o.ProviderId.IsSet() { + return true + } + + return false +} + +// SetProviderId gets a reference to the given NullableString and assigns it to the ProviderId field. +func (o *ApimInstancePatchResponse) SetProviderId(v string) { + o.ProviderId.Set(&v) +} +// SetProviderIdNil sets the value for ProviderId to be an explicit nil +func (o *ApimInstancePatchResponse) SetProviderIdNil() { + o.ProviderId.Set(nil) +} + +// UnsetProviderId ensures that no value is present for ProviderId, not even an explicit nil +func (o *ApimInstancePatchResponse) UnsetProviderId() { + o.ProviderId.Unset() +} + +// GetEndpointUri returns the EndpointUri field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetEndpointUri() string { + if o == nil || o.EndpointUri == nil { + var ret string + return ret + } + return *o.EndpointUri +} + +// GetEndpointUriOk returns a tuple with the EndpointUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetEndpointUriOk() (*string, bool) { + if o == nil || o.EndpointUri == nil { + return nil, false + } + return o.EndpointUri, true +} + +// HasEndpointUri returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasEndpointUri() bool { + if o != nil && o.EndpointUri != nil { + return true + } + + return false +} + +// SetEndpointUri gets a reference to the given string and assigns it to the EndpointUri field. +func (o *ApimInstancePatchResponse) SetEndpointUri(v string) { + o.EndpointUri = &v +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetEnvironmentId() string { + if o == nil || o.EnvironmentId == nil { + var ret string + return ret + } + return *o.EnvironmentId +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetEnvironmentIdOk() (*string, bool) { + if o == nil || o.EnvironmentId == nil { + return nil, false + } + return o.EnvironmentId, true +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasEnvironmentId() bool { + if o != nil && o.EnvironmentId != nil { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given string and assigns it to the EnvironmentId field. +func (o *ApimInstancePatchResponse) SetEnvironmentId(v string) { + o.EnvironmentId = &v +} + +// GetTechnology returns the Technology field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetTechnology() string { + if o == nil || o.Technology == nil { + var ret string + return ret + } + return *o.Technology +} + +// GetTechnologyOk returns a tuple with the Technology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetTechnologyOk() (*string, bool) { + if o == nil || o.Technology == nil { + return nil, false + } + return o.Technology, true +} + +// HasTechnology returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasTechnology() bool { + if o != nil && o.Technology != nil { + return true + } + + return false +} + +// SetTechnology gets a reference to the given string and assigns it to the Technology field. +func (o *ApimInstancePatchResponse) SetTechnology(v string) { + o.Technology = &v +} + +// GetRouting returns the Routing field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetRouting() []Routing { + if o == nil || o.Routing == nil { + var ret []Routing + return ret + } + return *o.Routing +} + +// GetRoutingOk returns a tuple with the Routing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetRoutingOk() (*[]Routing, bool) { + if o == nil || o.Routing == nil { + return nil, false + } + return o.Routing, true +} + +// HasRouting returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasRouting() bool { + if o != nil && o.Routing != nil { + return true + } + + return false +} + +// SetRouting gets a reference to the given []Routing and assigns it to the Routing field. +func (o *ApimInstancePatchResponse) SetRouting(v []Routing) { + o.Routing = &v +} + +// GetEndpoint returns the Endpoint field value if set, zero value otherwise. +func (o *ApimInstancePatchResponse) GetEndpoint() Endpoint { + if o == nil || o.Endpoint == nil { + var ret Endpoint + return ret + } + return *o.Endpoint +} + +// GetEndpointOk returns a tuple with the Endpoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePatchResponse) GetEndpointOk() (*Endpoint, bool) { + if o == nil || o.Endpoint == nil { + return nil, false + } + return o.Endpoint, true +} + +// HasEndpoint returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasEndpoint() bool { + if o != nil && o.Endpoint != nil { + return true + } + + return false +} + +// SetEndpoint gets a reference to the given Endpoint and assigns it to the Endpoint field. +func (o *ApimInstancePatchResponse) SetEndpoint(v Endpoint) { + o.Endpoint = &v +} + +// GetDeployment returns the Deployment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePatchResponse) GetDeployment() Deployment { + if o == nil || o.Deployment.Get() == nil { + var ret Deployment + return ret + } + return *o.Deployment.Get() +} + +// GetDeploymentOk returns a tuple with the Deployment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePatchResponse) GetDeploymentOk() (*Deployment, bool) { + if o == nil { + return nil, false + } + return o.Deployment.Get(), o.Deployment.IsSet() +} + +// HasDeployment returns a boolean if a field has been set. +func (o *ApimInstancePatchResponse) HasDeployment() bool { + if o != nil && o.Deployment.IsSet() { + return true + } + + return false +} + +// SetDeployment gets a reference to the given NullableDeployment and assigns it to the Deployment field. +func (o *ApimInstancePatchResponse) SetDeployment(v Deployment) { + o.Deployment.Set(&v) +} +// SetDeploymentNil sets the value for Deployment to be an explicit nil +func (o *ApimInstancePatchResponse) SetDeploymentNil() { + o.Deployment.Set(nil) +} + +// UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +func (o *ApimInstancePatchResponse) UnsetDeployment() { + o.Deployment.Unset() +} + +func (o ApimInstancePatchResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.MasterOrganizationId != nil { + toSerialize["masterOrganizationId"] = o.MasterOrganizationId + } + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.InstanceLabel != nil { + toSerialize["instanceLabel"] = o.InstanceLabel + } + if o.ProviderId.IsSet() { + toSerialize["providerId"] = o.ProviderId.Get() + } + if o.EndpointUri != nil { + toSerialize["endpointUri"] = o.EndpointUri + } + if o.EnvironmentId != nil { + toSerialize["environmentId"] = o.EnvironmentId + } + if o.Technology != nil { + toSerialize["technology"] = o.Technology + } + if o.Routing != nil { + toSerialize["routing"] = o.Routing + } + if o.Endpoint != nil { + toSerialize["endpoint"] = o.Endpoint + } + if o.Deployment.IsSet() { + toSerialize["deployment"] = o.Deployment.Get() + } + return json.Marshal(toSerialize) +} + +type NullableApimInstancePatchResponse struct { + value *ApimInstancePatchResponse + isSet bool +} + +func (v NullableApimInstancePatchResponse) Get() *ApimInstancePatchResponse { + return v.value +} + +func (v *NullableApimInstancePatchResponse) Set(val *ApimInstancePatchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstancePatchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstancePatchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstancePatchResponse(val *ApimInstancePatchResponse) *NullableApimInstancePatchResponse { + return &NullableApimInstancePatchResponse{value: val, isSet: true} +} + +func (v NullableApimInstancePatchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstancePatchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_apim_instance_post_body.go b/apim/model_apim_instance_post_body.go new file mode 100644 index 0000000..e5e6113 --- /dev/null +++ b/apim/model_apim_instance_post_body.go @@ -0,0 +1,326 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ApimInstancePostBody struct for ApimInstancePostBody +type ApimInstancePostBody struct { + Technology *string `json:"technology,omitempty"` + Endpoint NullableEndpointPostBody `json:"endpoint,omitempty"` + Spec *Spec `json:"spec,omitempty"` + Routing []map[string]interface{} `json:"routing,omitempty"` + Deployment NullableDeploymentPostBody `json:"deployment,omitempty"` + InstanceLabel NullableString `json:"instanceLabel,omitempty"` +} + +// NewApimInstancePostBody instantiates a new ApimInstancePostBody 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 NewApimInstancePostBody() *ApimInstancePostBody { + this := ApimInstancePostBody{} + return &this +} + +// NewApimInstancePostBodyWithDefaults instantiates a new ApimInstancePostBody 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 NewApimInstancePostBodyWithDefaults() *ApimInstancePostBody { + this := ApimInstancePostBody{} + return &this +} + +// GetTechnology returns the Technology field value if set, zero value otherwise. +func (o *ApimInstancePostBody) GetTechnology() string { + if o == nil || o.Technology == nil { + var ret string + return ret + } + return *o.Technology +} + +// GetTechnologyOk returns a tuple with the Technology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostBody) GetTechnologyOk() (*string, bool) { + if o == nil || o.Technology == nil { + return nil, false + } + return o.Technology, true +} + +// HasTechnology returns a boolean if a field has been set. +func (o *ApimInstancePostBody) HasTechnology() bool { + if o != nil && o.Technology != nil { + return true + } + + return false +} + +// SetTechnology gets a reference to the given string and assigns it to the Technology field. +func (o *ApimInstancePostBody) SetTechnology(v string) { + o.Technology = &v +} + +// GetEndpoint returns the Endpoint field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePostBody) GetEndpoint() EndpointPostBody { + if o == nil || o.Endpoint.Get() == nil { + var ret EndpointPostBody + return ret + } + return *o.Endpoint.Get() +} + +// GetEndpointOk returns a tuple with the Endpoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePostBody) GetEndpointOk() (*EndpointPostBody, bool) { + if o == nil { + return nil, false + } + return o.Endpoint.Get(), o.Endpoint.IsSet() +} + +// HasEndpoint returns a boolean if a field has been set. +func (o *ApimInstancePostBody) HasEndpoint() bool { + if o != nil && o.Endpoint.IsSet() { + return true + } + + return false +} + +// SetEndpoint gets a reference to the given NullableEndpointPostBody and assigns it to the Endpoint field. +func (o *ApimInstancePostBody) SetEndpoint(v EndpointPostBody) { + o.Endpoint.Set(&v) +} +// SetEndpointNil sets the value for Endpoint to be an explicit nil +func (o *ApimInstancePostBody) SetEndpointNil() { + o.Endpoint.Set(nil) +} + +// UnsetEndpoint ensures that no value is present for Endpoint, not even an explicit nil +func (o *ApimInstancePostBody) UnsetEndpoint() { + o.Endpoint.Unset() +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *ApimInstancePostBody) GetSpec() Spec { + if o == nil || o.Spec == nil { + var ret Spec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostBody) GetSpecOk() (*Spec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *ApimInstancePostBody) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given Spec and assigns it to the Spec field. +func (o *ApimInstancePostBody) SetSpec(v Spec) { + o.Spec = &v +} + +// GetRouting returns the Routing field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePostBody) GetRouting() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.Routing +} + +// GetRoutingOk returns a tuple with the Routing field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePostBody) GetRoutingOk() (*[]map[string]interface{}, bool) { + if o == nil || o.Routing == nil { + return nil, false + } + return &o.Routing, true +} + +// HasRouting returns a boolean if a field has been set. +func (o *ApimInstancePostBody) HasRouting() bool { + if o != nil && o.Routing != nil { + return true + } + + return false +} + +// SetRouting gets a reference to the given []map[string]interface{} and assigns it to the Routing field. +func (o *ApimInstancePostBody) SetRouting(v []map[string]interface{}) { + o.Routing = v +} + +// GetDeployment returns the Deployment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePostBody) GetDeployment() DeploymentPostBody { + if o == nil || o.Deployment.Get() == nil { + var ret DeploymentPostBody + return ret + } + return *o.Deployment.Get() +} + +// GetDeploymentOk returns a tuple with the Deployment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePostBody) GetDeploymentOk() (*DeploymentPostBody, bool) { + if o == nil { + return nil, false + } + return o.Deployment.Get(), o.Deployment.IsSet() +} + +// HasDeployment returns a boolean if a field has been set. +func (o *ApimInstancePostBody) HasDeployment() bool { + if o != nil && o.Deployment.IsSet() { + return true + } + + return false +} + +// SetDeployment gets a reference to the given NullableDeploymentPostBody and assigns it to the Deployment field. +func (o *ApimInstancePostBody) SetDeployment(v DeploymentPostBody) { + o.Deployment.Set(&v) +} +// SetDeploymentNil sets the value for Deployment to be an explicit nil +func (o *ApimInstancePostBody) SetDeploymentNil() { + o.Deployment.Set(nil) +} + +// UnsetDeployment ensures that no value is present for Deployment, not even an explicit nil +func (o *ApimInstancePostBody) UnsetDeployment() { + o.Deployment.Unset() +} + +// GetInstanceLabel returns the InstanceLabel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePostBody) GetInstanceLabel() string { + if o == nil || o.InstanceLabel.Get() == nil { + var ret string + return ret + } + return *o.InstanceLabel.Get() +} + +// GetInstanceLabelOk returns a tuple with the InstanceLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePostBody) GetInstanceLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InstanceLabel.Get(), o.InstanceLabel.IsSet() +} + +// HasInstanceLabel returns a boolean if a field has been set. +func (o *ApimInstancePostBody) HasInstanceLabel() bool { + if o != nil && o.InstanceLabel.IsSet() { + return true + } + + return false +} + +// SetInstanceLabel gets a reference to the given NullableString and assigns it to the InstanceLabel field. +func (o *ApimInstancePostBody) SetInstanceLabel(v string) { + o.InstanceLabel.Set(&v) +} +// SetInstanceLabelNil sets the value for InstanceLabel to be an explicit nil +func (o *ApimInstancePostBody) SetInstanceLabelNil() { + o.InstanceLabel.Set(nil) +} + +// UnsetInstanceLabel ensures that no value is present for InstanceLabel, not even an explicit nil +func (o *ApimInstancePostBody) UnsetInstanceLabel() { + o.InstanceLabel.Unset() +} + +func (o ApimInstancePostBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Technology != nil { + toSerialize["technology"] = o.Technology + } + if o.Endpoint.IsSet() { + toSerialize["endpoint"] = o.Endpoint.Get() + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + if o.Routing != nil { + toSerialize["routing"] = o.Routing + } + if o.Deployment.IsSet() { + toSerialize["deployment"] = o.Deployment.Get() + } + if o.InstanceLabel.IsSet() { + toSerialize["instanceLabel"] = o.InstanceLabel.Get() + } + return json.Marshal(toSerialize) +} + +type NullableApimInstancePostBody struct { + value *ApimInstancePostBody + isSet bool +} + +func (v NullableApimInstancePostBody) Get() *ApimInstancePostBody { + return v.value +} + +func (v *NullableApimInstancePostBody) Set(val *ApimInstancePostBody) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstancePostBody) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstancePostBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstancePostBody(val *ApimInstancePostBody) *NullableApimInstancePostBody { + return &NullableApimInstancePostBody{value: val, isSet: true} +} + +func (v NullableApimInstancePostBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstancePostBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_apim_instance_post_response.go b/apim/model_apim_instance_post_response.go new file mode 100644 index 0000000..50adc87 --- /dev/null +++ b/apim/model_apim_instance_post_response.go @@ -0,0 +1,701 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ApimInstancePostResponse struct for ApimInstancePostResponse +type ApimInstancePostResponse struct { + EnvironmentId *string `json:"environmentId,omitempty"` + InstanceLabel *string `json:"instanceLabel,omitempty"` + ProviderId NullableString `json:"providerId,omitempty"` + Technology *string `json:"technology,omitempty"` + AssetVersion *string `json:"assetVersion,omitempty"` + ProductVersion *string `json:"productVersion,omitempty"` + Order *int32 `json:"order,omitempty"` + Stage *string `json:"stage,omitempty"` + Audit *Audit `json:"audit,omitempty"` + MasterOrganizationId *string `json:"masterOrganizationId,omitempty"` + OrganizationId *string `json:"organizationId,omitempty"` + Id *int32 `json:"id,omitempty"` + GroupId *string `json:"groupId,omitempty"` + AssetId *string `json:"assetId,omitempty"` + Tags *[]string `json:"tags,omitempty"` + Endpoint *Endpoint `json:"endpoint,omitempty"` + AutodiscoveryInstanceName *string `json:"autodiscoveryInstanceName,omitempty"` +} + +// NewApimInstancePostResponse instantiates a new ApimInstancePostResponse 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 NewApimInstancePostResponse() *ApimInstancePostResponse { + this := ApimInstancePostResponse{} + return &this +} + +// NewApimInstancePostResponseWithDefaults instantiates a new ApimInstancePostResponse 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 NewApimInstancePostResponseWithDefaults() *ApimInstancePostResponse { + this := ApimInstancePostResponse{} + return &this +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetEnvironmentId() string { + if o == nil || o.EnvironmentId == nil { + var ret string + return ret + } + return *o.EnvironmentId +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetEnvironmentIdOk() (*string, bool) { + if o == nil || o.EnvironmentId == nil { + return nil, false + } + return o.EnvironmentId, true +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasEnvironmentId() bool { + if o != nil && o.EnvironmentId != nil { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given string and assigns it to the EnvironmentId field. +func (o *ApimInstancePostResponse) SetEnvironmentId(v string) { + o.EnvironmentId = &v +} + +// GetInstanceLabel returns the InstanceLabel field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetInstanceLabel() string { + if o == nil || o.InstanceLabel == nil { + var ret string + return ret + } + return *o.InstanceLabel +} + +// GetInstanceLabelOk returns a tuple with the InstanceLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetInstanceLabelOk() (*string, bool) { + if o == nil || o.InstanceLabel == nil { + return nil, false + } + return o.InstanceLabel, true +} + +// HasInstanceLabel returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasInstanceLabel() bool { + if o != nil && o.InstanceLabel != nil { + return true + } + + return false +} + +// SetInstanceLabel gets a reference to the given string and assigns it to the InstanceLabel field. +func (o *ApimInstancePostResponse) SetInstanceLabel(v string) { + o.InstanceLabel = &v +} + +// GetProviderId returns the ProviderId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApimInstancePostResponse) GetProviderId() string { + if o == nil || o.ProviderId.Get() == nil { + var ret string + return ret + } + return *o.ProviderId.Get() +} + +// GetProviderIdOk returns a tuple with the ProviderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApimInstancePostResponse) GetProviderIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProviderId.Get(), o.ProviderId.IsSet() +} + +// HasProviderId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasProviderId() bool { + if o != nil && o.ProviderId.IsSet() { + return true + } + + return false +} + +// SetProviderId gets a reference to the given NullableString and assigns it to the ProviderId field. +func (o *ApimInstancePostResponse) SetProviderId(v string) { + o.ProviderId.Set(&v) +} +// SetProviderIdNil sets the value for ProviderId to be an explicit nil +func (o *ApimInstancePostResponse) SetProviderIdNil() { + o.ProviderId.Set(nil) +} + +// UnsetProviderId ensures that no value is present for ProviderId, not even an explicit nil +func (o *ApimInstancePostResponse) UnsetProviderId() { + o.ProviderId.Unset() +} + +// GetTechnology returns the Technology field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetTechnology() string { + if o == nil || o.Technology == nil { + var ret string + return ret + } + return *o.Technology +} + +// GetTechnologyOk returns a tuple with the Technology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetTechnologyOk() (*string, bool) { + if o == nil || o.Technology == nil { + return nil, false + } + return o.Technology, true +} + +// HasTechnology returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasTechnology() bool { + if o != nil && o.Technology != nil { + return true + } + + return false +} + +// SetTechnology gets a reference to the given string and assigns it to the Technology field. +func (o *ApimInstancePostResponse) SetTechnology(v string) { + o.Technology = &v +} + +// GetAssetVersion returns the AssetVersion field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetAssetVersion() string { + if o == nil || o.AssetVersion == nil { + var ret string + return ret + } + return *o.AssetVersion +} + +// GetAssetVersionOk returns a tuple with the AssetVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetAssetVersionOk() (*string, bool) { + if o == nil || o.AssetVersion == nil { + return nil, false + } + return o.AssetVersion, true +} + +// HasAssetVersion returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasAssetVersion() bool { + if o != nil && o.AssetVersion != nil { + return true + } + + return false +} + +// SetAssetVersion gets a reference to the given string and assigns it to the AssetVersion field. +func (o *ApimInstancePostResponse) SetAssetVersion(v string) { + o.AssetVersion = &v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetProductVersion() string { + if o == nil || o.ProductVersion == nil { + var ret string + return ret + } + return *o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetProductVersionOk() (*string, bool) { + if o == nil || o.ProductVersion == nil { + return nil, false + } + return o.ProductVersion, true +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasProductVersion() bool { + if o != nil && o.ProductVersion != nil { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given string and assigns it to the ProductVersion field. +func (o *ApimInstancePostResponse) SetProductVersion(v string) { + o.ProductVersion = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetOrder() int32 { + if o == nil || o.Order == nil { + var ret int32 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetOrderOk() (*int32, bool) { + if o == nil || o.Order == nil { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasOrder() bool { + if o != nil && o.Order != nil { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *ApimInstancePostResponse) SetOrder(v int32) { + o.Order = &v +} + +// GetStage returns the Stage field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetStage() string { + if o == nil || o.Stage == nil { + var ret string + return ret + } + return *o.Stage +} + +// GetStageOk returns a tuple with the Stage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetStageOk() (*string, bool) { + if o == nil || o.Stage == nil { + return nil, false + } + return o.Stage, true +} + +// HasStage returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasStage() bool { + if o != nil && o.Stage != nil { + return true + } + + return false +} + +// SetStage gets a reference to the given string and assigns it to the Stage field. +func (o *ApimInstancePostResponse) SetStage(v string) { + o.Stage = &v +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *ApimInstancePostResponse) SetAudit(v Audit) { + o.Audit = &v +} + +// GetMasterOrganizationId returns the MasterOrganizationId field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetMasterOrganizationId() string { + if o == nil || o.MasterOrganizationId == nil { + var ret string + return ret + } + return *o.MasterOrganizationId +} + +// GetMasterOrganizationIdOk returns a tuple with the MasterOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetMasterOrganizationIdOk() (*string, bool) { + if o == nil || o.MasterOrganizationId == nil { + return nil, false + } + return o.MasterOrganizationId, true +} + +// HasMasterOrganizationId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasMasterOrganizationId() bool { + if o != nil && o.MasterOrganizationId != nil { + return true + } + + return false +} + +// SetMasterOrganizationId gets a reference to the given string and assigns it to the MasterOrganizationId field. +func (o *ApimInstancePostResponse) SetMasterOrganizationId(v string) { + o.MasterOrganizationId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *ApimInstancePostResponse) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ApimInstancePostResponse) SetId(v int32) { + o.Id = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetGroupId() string { + if o == nil || o.GroupId == nil { + var ret string + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetGroupIdOk() (*string, bool) { + if o == nil || o.GroupId == nil { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasGroupId() bool { + if o != nil && o.GroupId != nil { + return true + } + + return false +} + +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. +func (o *ApimInstancePostResponse) SetGroupId(v string) { + o.GroupId = &v +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *ApimInstancePostResponse) SetAssetId(v string) { + o.AssetId = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ApimInstancePostResponse) SetTags(v []string) { + o.Tags = &v +} + +// GetEndpoint returns the Endpoint field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetEndpoint() Endpoint { + if o == nil || o.Endpoint == nil { + var ret Endpoint + return ret + } + return *o.Endpoint +} + +// GetEndpointOk returns a tuple with the Endpoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetEndpointOk() (*Endpoint, bool) { + if o == nil || o.Endpoint == nil { + return nil, false + } + return o.Endpoint, true +} + +// HasEndpoint returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasEndpoint() bool { + if o != nil && o.Endpoint != nil { + return true + } + + return false +} + +// SetEndpoint gets a reference to the given Endpoint and assigns it to the Endpoint field. +func (o *ApimInstancePostResponse) SetEndpoint(v Endpoint) { + o.Endpoint = &v +} + +// GetAutodiscoveryInstanceName returns the AutodiscoveryInstanceName field value if set, zero value otherwise. +func (o *ApimInstancePostResponse) GetAutodiscoveryInstanceName() string { + if o == nil || o.AutodiscoveryInstanceName == nil { + var ret string + return ret + } + return *o.AutodiscoveryInstanceName +} + +// GetAutodiscoveryInstanceNameOk returns a tuple with the AutodiscoveryInstanceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApimInstancePostResponse) GetAutodiscoveryInstanceNameOk() (*string, bool) { + if o == nil || o.AutodiscoveryInstanceName == nil { + return nil, false + } + return o.AutodiscoveryInstanceName, true +} + +// HasAutodiscoveryInstanceName returns a boolean if a field has been set. +func (o *ApimInstancePostResponse) HasAutodiscoveryInstanceName() bool { + if o != nil && o.AutodiscoveryInstanceName != nil { + return true + } + + return false +} + +// SetAutodiscoveryInstanceName gets a reference to the given string and assigns it to the AutodiscoveryInstanceName field. +func (o *ApimInstancePostResponse) SetAutodiscoveryInstanceName(v string) { + o.AutodiscoveryInstanceName = &v +} + +func (o ApimInstancePostResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnvironmentId != nil { + toSerialize["environmentId"] = o.EnvironmentId + } + if o.InstanceLabel != nil { + toSerialize["instanceLabel"] = o.InstanceLabel + } + if o.ProviderId.IsSet() { + toSerialize["providerId"] = o.ProviderId.Get() + } + if o.Technology != nil { + toSerialize["technology"] = o.Technology + } + if o.AssetVersion != nil { + toSerialize["assetVersion"] = o.AssetVersion + } + if o.ProductVersion != nil { + toSerialize["productVersion"] = o.ProductVersion + } + if o.Order != nil { + toSerialize["order"] = o.Order + } + if o.Stage != nil { + toSerialize["stage"] = o.Stage + } + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.MasterOrganizationId != nil { + toSerialize["masterOrganizationId"] = o.MasterOrganizationId + } + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.GroupId != nil { + toSerialize["groupId"] = o.GroupId + } + if o.AssetId != nil { + toSerialize["assetId"] = o.AssetId + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Endpoint != nil { + toSerialize["endpoint"] = o.Endpoint + } + if o.AutodiscoveryInstanceName != nil { + toSerialize["autodiscoveryInstanceName"] = o.AutodiscoveryInstanceName + } + return json.Marshal(toSerialize) +} + +type NullableApimInstancePostResponse struct { + value *ApimInstancePostResponse + isSet bool +} + +func (v NullableApimInstancePostResponse) Get() *ApimInstancePostResponse { + return v.value +} + +func (v *NullableApimInstancePostResponse) Set(val *ApimInstancePostResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApimInstancePostResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApimInstancePostResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApimInstancePostResponse(val *ApimInstancePostResponse) *NullableApimInstancePostResponse { + return &NullableApimInstancePostResponse{value: val, isSet: true} +} + +func (v NullableApimInstancePostResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApimInstancePostResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_audit.go b/apim/model_audit.go new file mode 100644 index 0000000..823ac60 --- /dev/null +++ b/apim/model_audit.go @@ -0,0 +1,151 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// Audit struct for Audit +type Audit struct { + Created *AuditCreated `json:"created,omitempty"` + Updated *AuditCreated `json:"updated,omitempty"` +} + +// NewAudit instantiates a new Audit 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 NewAudit() *Audit { + this := Audit{} + return &this +} + +// NewAuditWithDefaults instantiates a new Audit 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 NewAuditWithDefaults() *Audit { + this := Audit{} + return &this +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Audit) GetCreated() AuditCreated { + if o == nil || o.Created == nil { + var ret AuditCreated + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Audit) GetCreatedOk() (*AuditCreated, bool) { + if o == nil || o.Created == nil { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Audit) HasCreated() bool { + if o != nil && o.Created != nil { + return true + } + + return false +} + +// SetCreated gets a reference to the given AuditCreated and assigns it to the Created field. +func (o *Audit) SetCreated(v AuditCreated) { + o.Created = &v +} + +// GetUpdated returns the Updated field value if set, zero value otherwise. +func (o *Audit) GetUpdated() AuditCreated { + if o == nil || o.Updated == nil { + var ret AuditCreated + return ret + } + return *o.Updated +} + +// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Audit) GetUpdatedOk() (*AuditCreated, bool) { + if o == nil || o.Updated == nil { + return nil, false + } + return o.Updated, true +} + +// HasUpdated returns a boolean if a field has been set. +func (o *Audit) HasUpdated() bool { + if o != nil && o.Updated != nil { + return true + } + + return false +} + +// SetUpdated gets a reference to the given AuditCreated and assigns it to the Updated field. +func (o *Audit) SetUpdated(v AuditCreated) { + o.Updated = &v +} + +func (o Audit) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Created != nil { + toSerialize["created"] = o.Created + } + if o.Updated != nil { + toSerialize["updated"] = o.Updated + } + return json.Marshal(toSerialize) +} + +type NullableAudit struct { + value *Audit + isSet bool +} + +func (v NullableAudit) Get() *Audit { + return v.value +} + +func (v *NullableAudit) Set(val *Audit) { + v.value = val + v.isSet = true +} + +func (v NullableAudit) IsSet() bool { + return v.isSet +} + +func (v *NullableAudit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAudit(val *Audit) *NullableAudit { + return &NullableAudit{value: val, isSet: true} +} + +func (v NullableAudit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAudit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_audit_created.go b/apim/model_audit_created.go new file mode 100644 index 0000000..4c4cbdb --- /dev/null +++ b/apim/model_audit_created.go @@ -0,0 +1,116 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" + "time" +) + +// AuditCreated struct for AuditCreated +type AuditCreated struct { + Date *time.Time `json:"date,omitempty"` +} + +// NewAuditCreated instantiates a new AuditCreated 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 NewAuditCreated() *AuditCreated { + this := AuditCreated{} + return &this +} + +// NewAuditCreatedWithDefaults instantiates a new AuditCreated 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 NewAuditCreatedWithDefaults() *AuditCreated { + this := AuditCreated{} + return &this +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *AuditCreated) GetDate() time.Time { + if o == nil || o.Date == nil { + var ret time.Time + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuditCreated) GetDateOk() (*time.Time, bool) { + if o == nil || o.Date == nil { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *AuditCreated) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given time.Time and assigns it to the Date field. +func (o *AuditCreated) SetDate(v time.Time) { + o.Date = &v +} + +func (o AuditCreated) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Date != nil { + toSerialize["date"] = o.Date + } + return json.Marshal(toSerialize) +} + +type NullableAuditCreated struct { + value *AuditCreated + isSet bool +} + +func (v NullableAuditCreated) Get() *AuditCreated { + return v.value +} + +func (v *NullableAuditCreated) Set(val *AuditCreated) { + v.value = val + v.isSet = true +} + +func (v NullableAuditCreated) IsSet() bool { + return v.isSet +} + +func (v *NullableAuditCreated) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuditCreated(val *AuditCreated) *NullableAuditCreated { + return &NullableAuditCreated{value: val, isSet: true} +} + +func (v NullableAuditCreated) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuditCreated) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_deployment.go b/apim/model_deployment.go new file mode 100644 index 0000000..b47314e --- /dev/null +++ b/apim/model_deployment.go @@ -0,0 +1,634 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" + "time" +) + +// Deployment struct for Deployment +type Deployment struct { + Audit *Audit `json:"audit,omitempty"` + Id *int32 `json:"id,omitempty"` + ApplicationId *string `json:"applicationId,omitempty"` + ApplicationName NullableString `json:"applicationName,omitempty"` + GatewayVersion NullableString `json:"gatewayVersion,omitempty"` + EnvironmentName NullableString `json:"environmentName,omitempty"` + EnvironmentId NullableString `json:"environmentId,omitempty"` + TargetId *string `json:"targetId,omitempty"` + TargetName *string `json:"targetName,omitempty"` + DeploymentId NullableString `json:"deploymentId,omitempty"` + UpdatedDate *time.Time `json:"updatedDate,omitempty"` + Type *string `json:"type,omitempty"` + ExpectedStatus *string `json:"expectedStatus,omitempty"` + ApiId *int32 `json:"apiId,omitempty"` +} + +// NewDeployment instantiates a new Deployment 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 NewDeployment() *Deployment { + this := Deployment{} + return &this +} + +// NewDeploymentWithDefaults instantiates a new Deployment 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 NewDeploymentWithDefaults() *Deployment { + this := Deployment{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *Deployment) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *Deployment) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *Deployment) SetAudit(v Audit) { + o.Audit = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Deployment) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Deployment) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Deployment) SetId(v int32) { + o.Id = &v +} + +// GetApplicationId returns the ApplicationId field value if set, zero value otherwise. +func (o *Deployment) GetApplicationId() string { + if o == nil || o.ApplicationId == nil { + var ret string + return ret + } + return *o.ApplicationId +} + +// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetApplicationIdOk() (*string, bool) { + if o == nil || o.ApplicationId == nil { + return nil, false + } + return o.ApplicationId, true +} + +// HasApplicationId returns a boolean if a field has been set. +func (o *Deployment) HasApplicationId() bool { + if o != nil && o.ApplicationId != nil { + return true + } + + return false +} + +// SetApplicationId gets a reference to the given string and assigns it to the ApplicationId field. +func (o *Deployment) SetApplicationId(v string) { + o.ApplicationId = &v +} + +// GetApplicationName returns the ApplicationName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Deployment) GetApplicationName() string { + if o == nil || o.ApplicationName.Get() == nil { + var ret string + return ret + } + return *o.ApplicationName.Get() +} + +// GetApplicationNameOk returns a tuple with the ApplicationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Deployment) GetApplicationNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApplicationName.Get(), o.ApplicationName.IsSet() +} + +// HasApplicationName returns a boolean if a field has been set. +func (o *Deployment) HasApplicationName() bool { + if o != nil && o.ApplicationName.IsSet() { + return true + } + + return false +} + +// SetApplicationName gets a reference to the given NullableString and assigns it to the ApplicationName field. +func (o *Deployment) SetApplicationName(v string) { + o.ApplicationName.Set(&v) +} +// SetApplicationNameNil sets the value for ApplicationName to be an explicit nil +func (o *Deployment) SetApplicationNameNil() { + o.ApplicationName.Set(nil) +} + +// UnsetApplicationName ensures that no value is present for ApplicationName, not even an explicit nil +func (o *Deployment) UnsetApplicationName() { + o.ApplicationName.Unset() +} + +// GetGatewayVersion returns the GatewayVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Deployment) GetGatewayVersion() string { + if o == nil || o.GatewayVersion.Get() == nil { + var ret string + return ret + } + return *o.GatewayVersion.Get() +} + +// GetGatewayVersionOk returns a tuple with the GatewayVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Deployment) GetGatewayVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GatewayVersion.Get(), o.GatewayVersion.IsSet() +} + +// HasGatewayVersion returns a boolean if a field has been set. +func (o *Deployment) HasGatewayVersion() bool { + if o != nil && o.GatewayVersion.IsSet() { + return true + } + + return false +} + +// SetGatewayVersion gets a reference to the given NullableString and assigns it to the GatewayVersion field. +func (o *Deployment) SetGatewayVersion(v string) { + o.GatewayVersion.Set(&v) +} +// SetGatewayVersionNil sets the value for GatewayVersion to be an explicit nil +func (o *Deployment) SetGatewayVersionNil() { + o.GatewayVersion.Set(nil) +} + +// UnsetGatewayVersion ensures that no value is present for GatewayVersion, not even an explicit nil +func (o *Deployment) UnsetGatewayVersion() { + o.GatewayVersion.Unset() +} + +// GetEnvironmentName returns the EnvironmentName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Deployment) GetEnvironmentName() string { + if o == nil || o.EnvironmentName.Get() == nil { + var ret string + return ret + } + return *o.EnvironmentName.Get() +} + +// GetEnvironmentNameOk returns a tuple with the EnvironmentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Deployment) GetEnvironmentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentName.Get(), o.EnvironmentName.IsSet() +} + +// HasEnvironmentName returns a boolean if a field has been set. +func (o *Deployment) HasEnvironmentName() bool { + if o != nil && o.EnvironmentName.IsSet() { + return true + } + + return false +} + +// SetEnvironmentName gets a reference to the given NullableString and assigns it to the EnvironmentName field. +func (o *Deployment) SetEnvironmentName(v string) { + o.EnvironmentName.Set(&v) +} +// SetEnvironmentNameNil sets the value for EnvironmentName to be an explicit nil +func (o *Deployment) SetEnvironmentNameNil() { + o.EnvironmentName.Set(nil) +} + +// UnsetEnvironmentName ensures that no value is present for EnvironmentName, not even an explicit nil +func (o *Deployment) UnsetEnvironmentName() { + o.EnvironmentName.Unset() +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Deployment) GetEnvironmentId() string { + if o == nil || o.EnvironmentId.Get() == nil { + var ret string + return ret + } + return *o.EnvironmentId.Get() +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Deployment) GetEnvironmentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EnvironmentId.Get(), o.EnvironmentId.IsSet() +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *Deployment) HasEnvironmentId() bool { + if o != nil && o.EnvironmentId.IsSet() { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given NullableString and assigns it to the EnvironmentId field. +func (o *Deployment) SetEnvironmentId(v string) { + o.EnvironmentId.Set(&v) +} +// SetEnvironmentIdNil sets the value for EnvironmentId to be an explicit nil +func (o *Deployment) SetEnvironmentIdNil() { + o.EnvironmentId.Set(nil) +} + +// UnsetEnvironmentId ensures that no value is present for EnvironmentId, not even an explicit nil +func (o *Deployment) UnsetEnvironmentId() { + o.EnvironmentId.Unset() +} + +// GetTargetId returns the TargetId field value if set, zero value otherwise. +func (o *Deployment) GetTargetId() string { + if o == nil || o.TargetId == nil { + var ret string + return ret + } + return *o.TargetId +} + +// GetTargetIdOk returns a tuple with the TargetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetTargetIdOk() (*string, bool) { + if o == nil || o.TargetId == nil { + return nil, false + } + return o.TargetId, true +} + +// HasTargetId returns a boolean if a field has been set. +func (o *Deployment) HasTargetId() bool { + if o != nil && o.TargetId != nil { + return true + } + + return false +} + +// SetTargetId gets a reference to the given string and assigns it to the TargetId field. +func (o *Deployment) SetTargetId(v string) { + o.TargetId = &v +} + +// GetTargetName returns the TargetName field value if set, zero value otherwise. +func (o *Deployment) GetTargetName() string { + if o == nil || o.TargetName == nil { + var ret string + return ret + } + return *o.TargetName +} + +// GetTargetNameOk returns a tuple with the TargetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetTargetNameOk() (*string, bool) { + if o == nil || o.TargetName == nil { + return nil, false + } + return o.TargetName, true +} + +// HasTargetName returns a boolean if a field has been set. +func (o *Deployment) HasTargetName() bool { + if o != nil && o.TargetName != nil { + return true + } + + return false +} + +// SetTargetName gets a reference to the given string and assigns it to the TargetName field. +func (o *Deployment) SetTargetName(v string) { + o.TargetName = &v +} + +// GetDeploymentId returns the DeploymentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Deployment) GetDeploymentId() string { + if o == nil || o.DeploymentId.Get() == nil { + var ret string + return ret + } + return *o.DeploymentId.Get() +} + +// GetDeploymentIdOk returns a tuple with the DeploymentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Deployment) GetDeploymentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DeploymentId.Get(), o.DeploymentId.IsSet() +} + +// HasDeploymentId returns a boolean if a field has been set. +func (o *Deployment) HasDeploymentId() bool { + if o != nil && o.DeploymentId.IsSet() { + return true + } + + return false +} + +// SetDeploymentId gets a reference to the given NullableString and assigns it to the DeploymentId field. +func (o *Deployment) SetDeploymentId(v string) { + o.DeploymentId.Set(&v) +} +// SetDeploymentIdNil sets the value for DeploymentId to be an explicit nil +func (o *Deployment) SetDeploymentIdNil() { + o.DeploymentId.Set(nil) +} + +// UnsetDeploymentId ensures that no value is present for DeploymentId, not even an explicit nil +func (o *Deployment) UnsetDeploymentId() { + o.DeploymentId.Unset() +} + +// GetUpdatedDate returns the UpdatedDate field value if set, zero value otherwise. +func (o *Deployment) GetUpdatedDate() time.Time { + if o == nil || o.UpdatedDate == nil { + var ret time.Time + return ret + } + return *o.UpdatedDate +} + +// GetUpdatedDateOk returns a tuple with the UpdatedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetUpdatedDateOk() (*time.Time, bool) { + if o == nil || o.UpdatedDate == nil { + return nil, false + } + return o.UpdatedDate, true +} + +// HasUpdatedDate returns a boolean if a field has been set. +func (o *Deployment) HasUpdatedDate() bool { + if o != nil && o.UpdatedDate != nil { + return true + } + + return false +} + +// SetUpdatedDate gets a reference to the given time.Time and assigns it to the UpdatedDate field. +func (o *Deployment) SetUpdatedDate(v time.Time) { + o.UpdatedDate = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Deployment) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Deployment) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Deployment) SetType(v string) { + o.Type = &v +} + +// GetExpectedStatus returns the ExpectedStatus field value if set, zero value otherwise. +func (o *Deployment) GetExpectedStatus() string { + if o == nil || o.ExpectedStatus == nil { + var ret string + return ret + } + return *o.ExpectedStatus +} + +// GetExpectedStatusOk returns a tuple with the ExpectedStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetExpectedStatusOk() (*string, bool) { + if o == nil || o.ExpectedStatus == nil { + return nil, false + } + return o.ExpectedStatus, true +} + +// HasExpectedStatus returns a boolean if a field has been set. +func (o *Deployment) HasExpectedStatus() bool { + if o != nil && o.ExpectedStatus != nil { + return true + } + + return false +} + +// SetExpectedStatus gets a reference to the given string and assigns it to the ExpectedStatus field. +func (o *Deployment) SetExpectedStatus(v string) { + o.ExpectedStatus = &v +} + +// GetApiId returns the ApiId field value if set, zero value otherwise. +func (o *Deployment) GetApiId() int32 { + if o == nil || o.ApiId == nil { + var ret int32 + return ret + } + return *o.ApiId +} + +// GetApiIdOk returns a tuple with the ApiId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Deployment) GetApiIdOk() (*int32, bool) { + if o == nil || o.ApiId == nil { + return nil, false + } + return o.ApiId, true +} + +// HasApiId returns a boolean if a field has been set. +func (o *Deployment) HasApiId() bool { + if o != nil && o.ApiId != nil { + return true + } + + return false +} + +// SetApiId gets a reference to the given int32 and assigns it to the ApiId field. +func (o *Deployment) SetApiId(v int32) { + o.ApiId = &v +} + +func (o Deployment) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.ApplicationId != nil { + toSerialize["applicationId"] = o.ApplicationId + } + if o.ApplicationName.IsSet() { + toSerialize["applicationName"] = o.ApplicationName.Get() + } + if o.GatewayVersion.IsSet() { + toSerialize["gatewayVersion"] = o.GatewayVersion.Get() + } + if o.EnvironmentName.IsSet() { + toSerialize["environmentName"] = o.EnvironmentName.Get() + } + if o.EnvironmentId.IsSet() { + toSerialize["environmentId"] = o.EnvironmentId.Get() + } + if o.TargetId != nil { + toSerialize["targetId"] = o.TargetId + } + if o.TargetName != nil { + toSerialize["targetName"] = o.TargetName + } + if o.DeploymentId.IsSet() { + toSerialize["deploymentId"] = o.DeploymentId.Get() + } + if o.UpdatedDate != nil { + toSerialize["updatedDate"] = o.UpdatedDate + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.ExpectedStatus != nil { + toSerialize["expectedStatus"] = o.ExpectedStatus + } + if o.ApiId != nil { + toSerialize["apiId"] = o.ApiId + } + return json.Marshal(toSerialize) +} + +type NullableDeployment struct { + value *Deployment + isSet bool +} + +func (v NullableDeployment) Get() *Deployment { + return v.value +} + +func (v *NullableDeployment) Set(val *Deployment) { + v.value = val + v.isSet = true +} + +func (v NullableDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeployment(val *Deployment) *NullableDeployment { + return &NullableDeployment{value: val, isSet: true} +} + +func (v NullableDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_deployment_post_body.go b/apim/model_deployment_post_body.go new file mode 100644 index 0000000..ee9e939 --- /dev/null +++ b/apim/model_deployment_post_body.go @@ -0,0 +1,331 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// DeploymentPostBody struct for DeploymentPostBody +type DeploymentPostBody struct { + EnvironmentId *string `json:"environmentId,omitempty"` + Type *string `json:"type,omitempty"` + ExpectedStatus *string `json:"expectedStatus,omitempty"` + Overwrite *bool `json:"overwrite,omitempty"` + TargetId *string `json:"targetId,omitempty"` + TargetName *string `json:"targetName,omitempty"` + GatewayVersion *string `json:"gatewayVersion,omitempty"` +} + +// NewDeploymentPostBody instantiates a new DeploymentPostBody 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 NewDeploymentPostBody() *DeploymentPostBody { + this := DeploymentPostBody{} + return &this +} + +// NewDeploymentPostBodyWithDefaults instantiates a new DeploymentPostBody 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 NewDeploymentPostBodyWithDefaults() *DeploymentPostBody { + this := DeploymentPostBody{} + return &this +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetEnvironmentId() string { + if o == nil || o.EnvironmentId == nil { + var ret string + return ret + } + return *o.EnvironmentId +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetEnvironmentIdOk() (*string, bool) { + if o == nil || o.EnvironmentId == nil { + return nil, false + } + return o.EnvironmentId, true +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasEnvironmentId() bool { + if o != nil && o.EnvironmentId != nil { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given string and assigns it to the EnvironmentId field. +func (o *DeploymentPostBody) SetEnvironmentId(v string) { + o.EnvironmentId = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DeploymentPostBody) SetType(v string) { + o.Type = &v +} + +// GetExpectedStatus returns the ExpectedStatus field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetExpectedStatus() string { + if o == nil || o.ExpectedStatus == nil { + var ret string + return ret + } + return *o.ExpectedStatus +} + +// GetExpectedStatusOk returns a tuple with the ExpectedStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetExpectedStatusOk() (*string, bool) { + if o == nil || o.ExpectedStatus == nil { + return nil, false + } + return o.ExpectedStatus, true +} + +// HasExpectedStatus returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasExpectedStatus() bool { + if o != nil && o.ExpectedStatus != nil { + return true + } + + return false +} + +// SetExpectedStatus gets a reference to the given string and assigns it to the ExpectedStatus field. +func (o *DeploymentPostBody) SetExpectedStatus(v string) { + o.ExpectedStatus = &v +} + +// GetOverwrite returns the Overwrite field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetOverwrite() bool { + if o == nil || o.Overwrite == nil { + var ret bool + return ret + } + return *o.Overwrite +} + +// GetOverwriteOk returns a tuple with the Overwrite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetOverwriteOk() (*bool, bool) { + if o == nil || o.Overwrite == nil { + return nil, false + } + return o.Overwrite, true +} + +// HasOverwrite returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasOverwrite() bool { + if o != nil && o.Overwrite != nil { + return true + } + + return false +} + +// SetOverwrite gets a reference to the given bool and assigns it to the Overwrite field. +func (o *DeploymentPostBody) SetOverwrite(v bool) { + o.Overwrite = &v +} + +// GetTargetId returns the TargetId field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetTargetId() string { + if o == nil || o.TargetId == nil { + var ret string + return ret + } + return *o.TargetId +} + +// GetTargetIdOk returns a tuple with the TargetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetTargetIdOk() (*string, bool) { + if o == nil || o.TargetId == nil { + return nil, false + } + return o.TargetId, true +} + +// HasTargetId returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasTargetId() bool { + if o != nil && o.TargetId != nil { + return true + } + + return false +} + +// SetTargetId gets a reference to the given string and assigns it to the TargetId field. +func (o *DeploymentPostBody) SetTargetId(v string) { + o.TargetId = &v +} + +// GetTargetName returns the TargetName field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetTargetName() string { + if o == nil || o.TargetName == nil { + var ret string + return ret + } + return *o.TargetName +} + +// GetTargetNameOk returns a tuple with the TargetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetTargetNameOk() (*string, bool) { + if o == nil || o.TargetName == nil { + return nil, false + } + return o.TargetName, true +} + +// HasTargetName returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasTargetName() bool { + if o != nil && o.TargetName != nil { + return true + } + + return false +} + +// SetTargetName gets a reference to the given string and assigns it to the TargetName field. +func (o *DeploymentPostBody) SetTargetName(v string) { + o.TargetName = &v +} + +// GetGatewayVersion returns the GatewayVersion field value if set, zero value otherwise. +func (o *DeploymentPostBody) GetGatewayVersion() string { + if o == nil || o.GatewayVersion == nil { + var ret string + return ret + } + return *o.GatewayVersion +} + +// GetGatewayVersionOk returns a tuple with the GatewayVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeploymentPostBody) GetGatewayVersionOk() (*string, bool) { + if o == nil || o.GatewayVersion == nil { + return nil, false + } + return o.GatewayVersion, true +} + +// HasGatewayVersion returns a boolean if a field has been set. +func (o *DeploymentPostBody) HasGatewayVersion() bool { + if o != nil && o.GatewayVersion != nil { + return true + } + + return false +} + +// SetGatewayVersion gets a reference to the given string and assigns it to the GatewayVersion field. +func (o *DeploymentPostBody) SetGatewayVersion(v string) { + o.GatewayVersion = &v +} + +func (o DeploymentPostBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnvironmentId != nil { + toSerialize["environmentId"] = o.EnvironmentId + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.ExpectedStatus != nil { + toSerialize["expectedStatus"] = o.ExpectedStatus + } + if o.Overwrite != nil { + toSerialize["overwrite"] = o.Overwrite + } + if o.TargetId != nil { + toSerialize["targetId"] = o.TargetId + } + if o.TargetName != nil { + toSerialize["targetName"] = o.TargetName + } + if o.GatewayVersion != nil { + toSerialize["gatewayVersion"] = o.GatewayVersion + } + return json.Marshal(toSerialize) +} + +type NullableDeploymentPostBody struct { + value *DeploymentPostBody + isSet bool +} + +func (v NullableDeploymentPostBody) Get() *DeploymentPostBody { + return v.value +} + +func (v *NullableDeploymentPostBody) Set(val *DeploymentPostBody) { + v.value = val + v.isSet = true +} + +func (v NullableDeploymentPostBody) IsSet() bool { + return v.isSet +} + +func (v *NullableDeploymentPostBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeploymentPostBody(val *DeploymentPostBody) *NullableDeploymentPostBody { + return &NullableDeploymentPostBody{value: val, isSet: true} +} + +func (v NullableDeploymentPostBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeploymentPostBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_endpoint.go b/apim/model_endpoint.go new file mode 100644 index 0000000..d4161f4 --- /dev/null +++ b/apim/model_endpoint.go @@ -0,0 +1,904 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" + "time" +) + +// Endpoint struct for Endpoint +type Endpoint struct { + Audit *Audit `json:"audit,omitempty"` + Id *int32 `json:"id,omitempty"` + Type NullableString `json:"type,omitempty"` + Uri NullableString `json:"uri,omitempty"` + ApiGatewayVersion NullableString `json:"apiGatewayVersion,omitempty"` + ProxyUri NullableString `json:"proxyUri,omitempty"` + ProxyRegistrationUri NullableString `json:"proxyRegistrationUri,omitempty"` + LastActiveDate NullableTime `json:"lastActiveDate,omitempty"` + IsCloudHub NullableString `json:"isCloudHub,omitempty"` + DeploymentType *string `json:"deploymentType,omitempty"` + PoliciesVersion NullableString `json:"policiesVersion,omitempty"` + ReferencesUserDomain NullableString `json:"referencesUserDomain,omitempty"` + ResponseTimeout NullableString `json:"responseTimeout,omitempty"` + WsdlConfig NullableString `json:"wsdlConfig,omitempty"` + MuleVersion4OrAbove NullableBool `json:"muleVersion4OrAbove,omitempty"` + ApiVersionId *int32 `json:"apiVersionId,omitempty"` + Validation NullableString `json:"validation,omitempty"` + Console NullableString `json:"console,omitempty"` + TlsContexts *EndpointTlsContexts `json:"tlsContexts,omitempty"` +} + +// NewEndpoint instantiates a new Endpoint 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 NewEndpoint() *Endpoint { + this := Endpoint{} + return &this +} + +// NewEndpointWithDefaults instantiates a new Endpoint 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 NewEndpointWithDefaults() *Endpoint { + this := Endpoint{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *Endpoint) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Endpoint) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *Endpoint) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *Endpoint) SetAudit(v Audit) { + o.Audit = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Endpoint) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Endpoint) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Endpoint) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Endpoint) SetId(v int32) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetType() string { + if o == nil || o.Type.Get() == nil { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *Endpoint) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *Endpoint) SetType(v string) { + o.Type.Set(&v) +} +// SetTypeNil sets the value for Type to be an explicit nil +func (o *Endpoint) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *Endpoint) UnsetType() { + o.Type.Unset() +} + +// GetUri returns the Uri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetUri() string { + if o == nil || o.Uri.Get() == nil { + var ret string + return ret + } + return *o.Uri.Get() +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uri.Get(), o.Uri.IsSet() +} + +// HasUri returns a boolean if a field has been set. +func (o *Endpoint) HasUri() bool { + if o != nil && o.Uri.IsSet() { + return true + } + + return false +} + +// SetUri gets a reference to the given NullableString and assigns it to the Uri field. +func (o *Endpoint) SetUri(v string) { + o.Uri.Set(&v) +} +// SetUriNil sets the value for Uri to be an explicit nil +func (o *Endpoint) SetUriNil() { + o.Uri.Set(nil) +} + +// UnsetUri ensures that no value is present for Uri, not even an explicit nil +func (o *Endpoint) UnsetUri() { + o.Uri.Unset() +} + +// GetApiGatewayVersion returns the ApiGatewayVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetApiGatewayVersion() string { + if o == nil || o.ApiGatewayVersion.Get() == nil { + var ret string + return ret + } + return *o.ApiGatewayVersion.Get() +} + +// GetApiGatewayVersionOk returns a tuple with the ApiGatewayVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetApiGatewayVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiGatewayVersion.Get(), o.ApiGatewayVersion.IsSet() +} + +// HasApiGatewayVersion returns a boolean if a field has been set. +func (o *Endpoint) HasApiGatewayVersion() bool { + if o != nil && o.ApiGatewayVersion.IsSet() { + return true + } + + return false +} + +// SetApiGatewayVersion gets a reference to the given NullableString and assigns it to the ApiGatewayVersion field. +func (o *Endpoint) SetApiGatewayVersion(v string) { + o.ApiGatewayVersion.Set(&v) +} +// SetApiGatewayVersionNil sets the value for ApiGatewayVersion to be an explicit nil +func (o *Endpoint) SetApiGatewayVersionNil() { + o.ApiGatewayVersion.Set(nil) +} + +// UnsetApiGatewayVersion ensures that no value is present for ApiGatewayVersion, not even an explicit nil +func (o *Endpoint) UnsetApiGatewayVersion() { + o.ApiGatewayVersion.Unset() +} + +// GetProxyUri returns the ProxyUri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetProxyUri() string { + if o == nil || o.ProxyUri.Get() == nil { + var ret string + return ret + } + return *o.ProxyUri.Get() +} + +// GetProxyUriOk returns a tuple with the ProxyUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetProxyUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUri.Get(), o.ProxyUri.IsSet() +} + +// HasProxyUri returns a boolean if a field has been set. +func (o *Endpoint) HasProxyUri() bool { + if o != nil && o.ProxyUri.IsSet() { + return true + } + + return false +} + +// SetProxyUri gets a reference to the given NullableString and assigns it to the ProxyUri field. +func (o *Endpoint) SetProxyUri(v string) { + o.ProxyUri.Set(&v) +} +// SetProxyUriNil sets the value for ProxyUri to be an explicit nil +func (o *Endpoint) SetProxyUriNil() { + o.ProxyUri.Set(nil) +} + +// UnsetProxyUri ensures that no value is present for ProxyUri, not even an explicit nil +func (o *Endpoint) UnsetProxyUri() { + o.ProxyUri.Unset() +} + +// GetProxyRegistrationUri returns the ProxyRegistrationUri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetProxyRegistrationUri() string { + if o == nil || o.ProxyRegistrationUri.Get() == nil { + var ret string + return ret + } + return *o.ProxyRegistrationUri.Get() +} + +// GetProxyRegistrationUriOk returns a tuple with the ProxyRegistrationUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetProxyRegistrationUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyRegistrationUri.Get(), o.ProxyRegistrationUri.IsSet() +} + +// HasProxyRegistrationUri returns a boolean if a field has been set. +func (o *Endpoint) HasProxyRegistrationUri() bool { + if o != nil && o.ProxyRegistrationUri.IsSet() { + return true + } + + return false +} + +// SetProxyRegistrationUri gets a reference to the given NullableString and assigns it to the ProxyRegistrationUri field. +func (o *Endpoint) SetProxyRegistrationUri(v string) { + o.ProxyRegistrationUri.Set(&v) +} +// SetProxyRegistrationUriNil sets the value for ProxyRegistrationUri to be an explicit nil +func (o *Endpoint) SetProxyRegistrationUriNil() { + o.ProxyRegistrationUri.Set(nil) +} + +// UnsetProxyRegistrationUri ensures that no value is present for ProxyRegistrationUri, not even an explicit nil +func (o *Endpoint) UnsetProxyRegistrationUri() { + o.ProxyRegistrationUri.Unset() +} + +// GetLastActiveDate returns the LastActiveDate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetLastActiveDate() time.Time { + if o == nil || o.LastActiveDate.Get() == nil { + var ret time.Time + return ret + } + return *o.LastActiveDate.Get() +} + +// GetLastActiveDateOk returns a tuple with the LastActiveDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetLastActiveDateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastActiveDate.Get(), o.LastActiveDate.IsSet() +} + +// HasLastActiveDate returns a boolean if a field has been set. +func (o *Endpoint) HasLastActiveDate() bool { + if o != nil && o.LastActiveDate.IsSet() { + return true + } + + return false +} + +// SetLastActiveDate gets a reference to the given NullableTime and assigns it to the LastActiveDate field. +func (o *Endpoint) SetLastActiveDate(v time.Time) { + o.LastActiveDate.Set(&v) +} +// SetLastActiveDateNil sets the value for LastActiveDate to be an explicit nil +func (o *Endpoint) SetLastActiveDateNil() { + o.LastActiveDate.Set(nil) +} + +// UnsetLastActiveDate ensures that no value is present for LastActiveDate, not even an explicit nil +func (o *Endpoint) UnsetLastActiveDate() { + o.LastActiveDate.Unset() +} + +// GetIsCloudHub returns the IsCloudHub field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetIsCloudHub() string { + if o == nil || o.IsCloudHub.Get() == nil { + var ret string + return ret + } + return *o.IsCloudHub.Get() +} + +// GetIsCloudHubOk returns a tuple with the IsCloudHub field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetIsCloudHubOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IsCloudHub.Get(), o.IsCloudHub.IsSet() +} + +// HasIsCloudHub returns a boolean if a field has been set. +func (o *Endpoint) HasIsCloudHub() bool { + if o != nil && o.IsCloudHub.IsSet() { + return true + } + + return false +} + +// SetIsCloudHub gets a reference to the given NullableString and assigns it to the IsCloudHub field. +func (o *Endpoint) SetIsCloudHub(v string) { + o.IsCloudHub.Set(&v) +} +// SetIsCloudHubNil sets the value for IsCloudHub to be an explicit nil +func (o *Endpoint) SetIsCloudHubNil() { + o.IsCloudHub.Set(nil) +} + +// UnsetIsCloudHub ensures that no value is present for IsCloudHub, not even an explicit nil +func (o *Endpoint) UnsetIsCloudHub() { + o.IsCloudHub.Unset() +} + +// GetDeploymentType returns the DeploymentType field value if set, zero value otherwise. +func (o *Endpoint) GetDeploymentType() string { + if o == nil || o.DeploymentType == nil { + var ret string + return ret + } + return *o.DeploymentType +} + +// GetDeploymentTypeOk returns a tuple with the DeploymentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Endpoint) GetDeploymentTypeOk() (*string, bool) { + if o == nil || o.DeploymentType == nil { + return nil, false + } + return o.DeploymentType, true +} + +// HasDeploymentType returns a boolean if a field has been set. +func (o *Endpoint) HasDeploymentType() bool { + if o != nil && o.DeploymentType != nil { + return true + } + + return false +} + +// SetDeploymentType gets a reference to the given string and assigns it to the DeploymentType field. +func (o *Endpoint) SetDeploymentType(v string) { + o.DeploymentType = &v +} + +// GetPoliciesVersion returns the PoliciesVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetPoliciesVersion() string { + if o == nil || o.PoliciesVersion.Get() == nil { + var ret string + return ret + } + return *o.PoliciesVersion.Get() +} + +// GetPoliciesVersionOk returns a tuple with the PoliciesVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetPoliciesVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PoliciesVersion.Get(), o.PoliciesVersion.IsSet() +} + +// HasPoliciesVersion returns a boolean if a field has been set. +func (o *Endpoint) HasPoliciesVersion() bool { + if o != nil && o.PoliciesVersion.IsSet() { + return true + } + + return false +} + +// SetPoliciesVersion gets a reference to the given NullableString and assigns it to the PoliciesVersion field. +func (o *Endpoint) SetPoliciesVersion(v string) { + o.PoliciesVersion.Set(&v) +} +// SetPoliciesVersionNil sets the value for PoliciesVersion to be an explicit nil +func (o *Endpoint) SetPoliciesVersionNil() { + o.PoliciesVersion.Set(nil) +} + +// UnsetPoliciesVersion ensures that no value is present for PoliciesVersion, not even an explicit nil +func (o *Endpoint) UnsetPoliciesVersion() { + o.PoliciesVersion.Unset() +} + +// GetReferencesUserDomain returns the ReferencesUserDomain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetReferencesUserDomain() string { + if o == nil || o.ReferencesUserDomain.Get() == nil { + var ret string + return ret + } + return *o.ReferencesUserDomain.Get() +} + +// GetReferencesUserDomainOk returns a tuple with the ReferencesUserDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetReferencesUserDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReferencesUserDomain.Get(), o.ReferencesUserDomain.IsSet() +} + +// HasReferencesUserDomain returns a boolean if a field has been set. +func (o *Endpoint) HasReferencesUserDomain() bool { + if o != nil && o.ReferencesUserDomain.IsSet() { + return true + } + + return false +} + +// SetReferencesUserDomain gets a reference to the given NullableString and assigns it to the ReferencesUserDomain field. +func (o *Endpoint) SetReferencesUserDomain(v string) { + o.ReferencesUserDomain.Set(&v) +} +// SetReferencesUserDomainNil sets the value for ReferencesUserDomain to be an explicit nil +func (o *Endpoint) SetReferencesUserDomainNil() { + o.ReferencesUserDomain.Set(nil) +} + +// UnsetReferencesUserDomain ensures that no value is present for ReferencesUserDomain, not even an explicit nil +func (o *Endpoint) UnsetReferencesUserDomain() { + o.ReferencesUserDomain.Unset() +} + +// GetResponseTimeout returns the ResponseTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetResponseTimeout() string { + if o == nil || o.ResponseTimeout.Get() == nil { + var ret string + return ret + } + return *o.ResponseTimeout.Get() +} + +// GetResponseTimeoutOk returns a tuple with the ResponseTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetResponseTimeoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResponseTimeout.Get(), o.ResponseTimeout.IsSet() +} + +// HasResponseTimeout returns a boolean if a field has been set. +func (o *Endpoint) HasResponseTimeout() bool { + if o != nil && o.ResponseTimeout.IsSet() { + return true + } + + return false +} + +// SetResponseTimeout gets a reference to the given NullableString and assigns it to the ResponseTimeout field. +func (o *Endpoint) SetResponseTimeout(v string) { + o.ResponseTimeout.Set(&v) +} +// SetResponseTimeoutNil sets the value for ResponseTimeout to be an explicit nil +func (o *Endpoint) SetResponseTimeoutNil() { + o.ResponseTimeout.Set(nil) +} + +// UnsetResponseTimeout ensures that no value is present for ResponseTimeout, not even an explicit nil +func (o *Endpoint) UnsetResponseTimeout() { + o.ResponseTimeout.Unset() +} + +// GetWsdlConfig returns the WsdlConfig field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetWsdlConfig() string { + if o == nil || o.WsdlConfig.Get() == nil { + var ret string + return ret + } + return *o.WsdlConfig.Get() +} + +// GetWsdlConfigOk returns a tuple with the WsdlConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetWsdlConfigOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WsdlConfig.Get(), o.WsdlConfig.IsSet() +} + +// HasWsdlConfig returns a boolean if a field has been set. +func (o *Endpoint) HasWsdlConfig() bool { + if o != nil && o.WsdlConfig.IsSet() { + return true + } + + return false +} + +// SetWsdlConfig gets a reference to the given NullableString and assigns it to the WsdlConfig field. +func (o *Endpoint) SetWsdlConfig(v string) { + o.WsdlConfig.Set(&v) +} +// SetWsdlConfigNil sets the value for WsdlConfig to be an explicit nil +func (o *Endpoint) SetWsdlConfigNil() { + o.WsdlConfig.Set(nil) +} + +// UnsetWsdlConfig ensures that no value is present for WsdlConfig, not even an explicit nil +func (o *Endpoint) UnsetWsdlConfig() { + o.WsdlConfig.Unset() +} + +// GetMuleVersion4OrAbove returns the MuleVersion4OrAbove field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetMuleVersion4OrAbove() bool { + if o == nil || o.MuleVersion4OrAbove.Get() == nil { + var ret bool + return ret + } + return *o.MuleVersion4OrAbove.Get() +} + +// GetMuleVersion4OrAboveOk returns a tuple with the MuleVersion4OrAbove field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetMuleVersion4OrAboveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.MuleVersion4OrAbove.Get(), o.MuleVersion4OrAbove.IsSet() +} + +// HasMuleVersion4OrAbove returns a boolean if a field has been set. +func (o *Endpoint) HasMuleVersion4OrAbove() bool { + if o != nil && o.MuleVersion4OrAbove.IsSet() { + return true + } + + return false +} + +// SetMuleVersion4OrAbove gets a reference to the given NullableBool and assigns it to the MuleVersion4OrAbove field. +func (o *Endpoint) SetMuleVersion4OrAbove(v bool) { + o.MuleVersion4OrAbove.Set(&v) +} +// SetMuleVersion4OrAboveNil sets the value for MuleVersion4OrAbove to be an explicit nil +func (o *Endpoint) SetMuleVersion4OrAboveNil() { + o.MuleVersion4OrAbove.Set(nil) +} + +// UnsetMuleVersion4OrAbove ensures that no value is present for MuleVersion4OrAbove, not even an explicit nil +func (o *Endpoint) UnsetMuleVersion4OrAbove() { + o.MuleVersion4OrAbove.Unset() +} + +// GetApiVersionId returns the ApiVersionId field value if set, zero value otherwise. +func (o *Endpoint) GetApiVersionId() int32 { + if o == nil || o.ApiVersionId == nil { + var ret int32 + return ret + } + return *o.ApiVersionId +} + +// GetApiVersionIdOk returns a tuple with the ApiVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Endpoint) GetApiVersionIdOk() (*int32, bool) { + if o == nil || o.ApiVersionId == nil { + return nil, false + } + return o.ApiVersionId, true +} + +// HasApiVersionId returns a boolean if a field has been set. +func (o *Endpoint) HasApiVersionId() bool { + if o != nil && o.ApiVersionId != nil { + return true + } + + return false +} + +// SetApiVersionId gets a reference to the given int32 and assigns it to the ApiVersionId field. +func (o *Endpoint) SetApiVersionId(v int32) { + o.ApiVersionId = &v +} + +// GetValidation returns the Validation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetValidation() string { + if o == nil || o.Validation.Get() == nil { + var ret string + return ret + } + return *o.Validation.Get() +} + +// GetValidationOk returns a tuple with the Validation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetValidationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Validation.Get(), o.Validation.IsSet() +} + +// HasValidation returns a boolean if a field has been set. +func (o *Endpoint) HasValidation() bool { + if o != nil && o.Validation.IsSet() { + return true + } + + return false +} + +// SetValidation gets a reference to the given NullableString and assigns it to the Validation field. +func (o *Endpoint) SetValidation(v string) { + o.Validation.Set(&v) +} +// SetValidationNil sets the value for Validation to be an explicit nil +func (o *Endpoint) SetValidationNil() { + o.Validation.Set(nil) +} + +// UnsetValidation ensures that no value is present for Validation, not even an explicit nil +func (o *Endpoint) UnsetValidation() { + o.Validation.Unset() +} + +// GetConsole returns the Console field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Endpoint) GetConsole() string { + if o == nil || o.Console.Get() == nil { + var ret string + return ret + } + return *o.Console.Get() +} + +// GetConsoleOk returns a tuple with the Console field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Endpoint) GetConsoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Console.Get(), o.Console.IsSet() +} + +// HasConsole returns a boolean if a field has been set. +func (o *Endpoint) HasConsole() bool { + if o != nil && o.Console.IsSet() { + return true + } + + return false +} + +// SetConsole gets a reference to the given NullableString and assigns it to the Console field. +func (o *Endpoint) SetConsole(v string) { + o.Console.Set(&v) +} +// SetConsoleNil sets the value for Console to be an explicit nil +func (o *Endpoint) SetConsoleNil() { + o.Console.Set(nil) +} + +// UnsetConsole ensures that no value is present for Console, not even an explicit nil +func (o *Endpoint) UnsetConsole() { + o.Console.Unset() +} + +// GetTlsContexts returns the TlsContexts field value if set, zero value otherwise. +func (o *Endpoint) GetTlsContexts() EndpointTlsContexts { + if o == nil || o.TlsContexts == nil { + var ret EndpointTlsContexts + return ret + } + return *o.TlsContexts +} + +// GetTlsContextsOk returns a tuple with the TlsContexts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Endpoint) GetTlsContextsOk() (*EndpointTlsContexts, bool) { + if o == nil || o.TlsContexts == nil { + return nil, false + } + return o.TlsContexts, true +} + +// HasTlsContexts returns a boolean if a field has been set. +func (o *Endpoint) HasTlsContexts() bool { + if o != nil && o.TlsContexts != nil { + return true + } + + return false +} + +// SetTlsContexts gets a reference to the given EndpointTlsContexts and assigns it to the TlsContexts field. +func (o *Endpoint) SetTlsContexts(v EndpointTlsContexts) { + o.TlsContexts = &v +} + +func (o Endpoint) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Uri.IsSet() { + toSerialize["uri"] = o.Uri.Get() + } + if o.ApiGatewayVersion.IsSet() { + toSerialize["apiGatewayVersion"] = o.ApiGatewayVersion.Get() + } + if o.ProxyUri.IsSet() { + toSerialize["proxyUri"] = o.ProxyUri.Get() + } + if o.ProxyRegistrationUri.IsSet() { + toSerialize["proxyRegistrationUri"] = o.ProxyRegistrationUri.Get() + } + if o.LastActiveDate.IsSet() { + toSerialize["lastActiveDate"] = o.LastActiveDate.Get() + } + if o.IsCloudHub.IsSet() { + toSerialize["isCloudHub"] = o.IsCloudHub.Get() + } + if o.DeploymentType != nil { + toSerialize["deploymentType"] = o.DeploymentType + } + if o.PoliciesVersion.IsSet() { + toSerialize["policiesVersion"] = o.PoliciesVersion.Get() + } + if o.ReferencesUserDomain.IsSet() { + toSerialize["referencesUserDomain"] = o.ReferencesUserDomain.Get() + } + if o.ResponseTimeout.IsSet() { + toSerialize["responseTimeout"] = o.ResponseTimeout.Get() + } + if o.WsdlConfig.IsSet() { + toSerialize["wsdlConfig"] = o.WsdlConfig.Get() + } + if o.MuleVersion4OrAbove.IsSet() { + toSerialize["muleVersion4OrAbove"] = o.MuleVersion4OrAbove.Get() + } + if o.ApiVersionId != nil { + toSerialize["apiVersionId"] = o.ApiVersionId + } + if o.Validation.IsSet() { + toSerialize["validation"] = o.Validation.Get() + } + if o.Console.IsSet() { + toSerialize["console"] = o.Console.Get() + } + if o.TlsContexts != nil { + toSerialize["tlsContexts"] = o.TlsContexts + } + return json.Marshal(toSerialize) +} + +type NullableEndpoint struct { + value *Endpoint + isSet bool +} + +func (v NullableEndpoint) Get() *Endpoint { + return v.value +} + +func (v *NullableEndpoint) Set(val *Endpoint) { + v.value = val + v.isSet = true +} + +func (v NullableEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpoint(val *Endpoint) *NullableEndpoint { + return &NullableEndpoint{value: val, isSet: true} +} + +func (v NullableEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_endpoint_post_body.go b/apim/model_endpoint_post_body.go new file mode 100644 index 0000000..dd120b6 --- /dev/null +++ b/apim/model_endpoint_post_body.go @@ -0,0 +1,499 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// EndpointPostBody struct for EndpointPostBody +type EndpointPostBody struct { + DeploymentType *string `json:"deploymentType,omitempty"` + MuleVersion4OrAbove *bool `json:"muleVersion4OrAbove,omitempty"` + Uri *string `json:"uri,omitempty"` + Type *string `json:"type,omitempty"` + IsCloudHub NullableString `json:"isCloudHub,omitempty"` + ProxyUri NullableString `json:"proxyUri,omitempty"` + ProxyRegistrationUri NullableString `json:"proxyRegistrationUri,omitempty"` + ReferencesUserDomain NullableString `json:"referencesUserDomain,omitempty"` + ResponseTimeout NullableString `json:"responseTimeout,omitempty"` + TlsContexts NullableEndpointPostBodyTlsContexts `json:"tlsContexts,omitempty"` +} + +// NewEndpointPostBody instantiates a new EndpointPostBody 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 NewEndpointPostBody() *EndpointPostBody { + this := EndpointPostBody{} + return &this +} + +// NewEndpointPostBodyWithDefaults instantiates a new EndpointPostBody 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 NewEndpointPostBodyWithDefaults() *EndpointPostBody { + this := EndpointPostBody{} + return &this +} + +// GetDeploymentType returns the DeploymentType field value if set, zero value otherwise. +func (o *EndpointPostBody) GetDeploymentType() string { + if o == nil || o.DeploymentType == nil { + var ret string + return ret + } + return *o.DeploymentType +} + +// GetDeploymentTypeOk returns a tuple with the DeploymentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBody) GetDeploymentTypeOk() (*string, bool) { + if o == nil || o.DeploymentType == nil { + return nil, false + } + return o.DeploymentType, true +} + +// HasDeploymentType returns a boolean if a field has been set. +func (o *EndpointPostBody) HasDeploymentType() bool { + if o != nil && o.DeploymentType != nil { + return true + } + + return false +} + +// SetDeploymentType gets a reference to the given string and assigns it to the DeploymentType field. +func (o *EndpointPostBody) SetDeploymentType(v string) { + o.DeploymentType = &v +} + +// GetMuleVersion4OrAbove returns the MuleVersion4OrAbove field value if set, zero value otherwise. +func (o *EndpointPostBody) GetMuleVersion4OrAbove() bool { + if o == nil || o.MuleVersion4OrAbove == nil { + var ret bool + return ret + } + return *o.MuleVersion4OrAbove +} + +// GetMuleVersion4OrAboveOk returns a tuple with the MuleVersion4OrAbove field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBody) GetMuleVersion4OrAboveOk() (*bool, bool) { + if o == nil || o.MuleVersion4OrAbove == nil { + return nil, false + } + return o.MuleVersion4OrAbove, true +} + +// HasMuleVersion4OrAbove returns a boolean if a field has been set. +func (o *EndpointPostBody) HasMuleVersion4OrAbove() bool { + if o != nil && o.MuleVersion4OrAbove != nil { + return true + } + + return false +} + +// SetMuleVersion4OrAbove gets a reference to the given bool and assigns it to the MuleVersion4OrAbove field. +func (o *EndpointPostBody) SetMuleVersion4OrAbove(v bool) { + o.MuleVersion4OrAbove = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *EndpointPostBody) GetUri() string { + if o == nil || o.Uri == nil { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBody) GetUriOk() (*string, bool) { + if o == nil || o.Uri == nil { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *EndpointPostBody) HasUri() bool { + if o != nil && o.Uri != nil { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *EndpointPostBody) SetUri(v string) { + o.Uri = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EndpointPostBody) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBody) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EndpointPostBody) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EndpointPostBody) SetType(v string) { + o.Type = &v +} + +// GetIsCloudHub returns the IsCloudHub field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBody) GetIsCloudHub() string { + if o == nil || o.IsCloudHub.Get() == nil { + var ret string + return ret + } + return *o.IsCloudHub.Get() +} + +// GetIsCloudHubOk returns a tuple with the IsCloudHub field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBody) GetIsCloudHubOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IsCloudHub.Get(), o.IsCloudHub.IsSet() +} + +// HasIsCloudHub returns a boolean if a field has been set. +func (o *EndpointPostBody) HasIsCloudHub() bool { + if o != nil && o.IsCloudHub.IsSet() { + return true + } + + return false +} + +// SetIsCloudHub gets a reference to the given NullableString and assigns it to the IsCloudHub field. +func (o *EndpointPostBody) SetIsCloudHub(v string) { + o.IsCloudHub.Set(&v) +} +// SetIsCloudHubNil sets the value for IsCloudHub to be an explicit nil +func (o *EndpointPostBody) SetIsCloudHubNil() { + o.IsCloudHub.Set(nil) +} + +// UnsetIsCloudHub ensures that no value is present for IsCloudHub, not even an explicit nil +func (o *EndpointPostBody) UnsetIsCloudHub() { + o.IsCloudHub.Unset() +} + +// GetProxyUri returns the ProxyUri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBody) GetProxyUri() string { + if o == nil || o.ProxyUri.Get() == nil { + var ret string + return ret + } + return *o.ProxyUri.Get() +} + +// GetProxyUriOk returns a tuple with the ProxyUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBody) GetProxyUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUri.Get(), o.ProxyUri.IsSet() +} + +// HasProxyUri returns a boolean if a field has been set. +func (o *EndpointPostBody) HasProxyUri() bool { + if o != nil && o.ProxyUri.IsSet() { + return true + } + + return false +} + +// SetProxyUri gets a reference to the given NullableString and assigns it to the ProxyUri field. +func (o *EndpointPostBody) SetProxyUri(v string) { + o.ProxyUri.Set(&v) +} +// SetProxyUriNil sets the value for ProxyUri to be an explicit nil +func (o *EndpointPostBody) SetProxyUriNil() { + o.ProxyUri.Set(nil) +} + +// UnsetProxyUri ensures that no value is present for ProxyUri, not even an explicit nil +func (o *EndpointPostBody) UnsetProxyUri() { + o.ProxyUri.Unset() +} + +// GetProxyRegistrationUri returns the ProxyRegistrationUri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBody) GetProxyRegistrationUri() string { + if o == nil || o.ProxyRegistrationUri.Get() == nil { + var ret string + return ret + } + return *o.ProxyRegistrationUri.Get() +} + +// GetProxyRegistrationUriOk returns a tuple with the ProxyRegistrationUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBody) GetProxyRegistrationUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyRegistrationUri.Get(), o.ProxyRegistrationUri.IsSet() +} + +// HasProxyRegistrationUri returns a boolean if a field has been set. +func (o *EndpointPostBody) HasProxyRegistrationUri() bool { + if o != nil && o.ProxyRegistrationUri.IsSet() { + return true + } + + return false +} + +// SetProxyRegistrationUri gets a reference to the given NullableString and assigns it to the ProxyRegistrationUri field. +func (o *EndpointPostBody) SetProxyRegistrationUri(v string) { + o.ProxyRegistrationUri.Set(&v) +} +// SetProxyRegistrationUriNil sets the value for ProxyRegistrationUri to be an explicit nil +func (o *EndpointPostBody) SetProxyRegistrationUriNil() { + o.ProxyRegistrationUri.Set(nil) +} + +// UnsetProxyRegistrationUri ensures that no value is present for ProxyRegistrationUri, not even an explicit nil +func (o *EndpointPostBody) UnsetProxyRegistrationUri() { + o.ProxyRegistrationUri.Unset() +} + +// GetReferencesUserDomain returns the ReferencesUserDomain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBody) GetReferencesUserDomain() string { + if o == nil || o.ReferencesUserDomain.Get() == nil { + var ret string + return ret + } + return *o.ReferencesUserDomain.Get() +} + +// GetReferencesUserDomainOk returns a tuple with the ReferencesUserDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBody) GetReferencesUserDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReferencesUserDomain.Get(), o.ReferencesUserDomain.IsSet() +} + +// HasReferencesUserDomain returns a boolean if a field has been set. +func (o *EndpointPostBody) HasReferencesUserDomain() bool { + if o != nil && o.ReferencesUserDomain.IsSet() { + return true + } + + return false +} + +// SetReferencesUserDomain gets a reference to the given NullableString and assigns it to the ReferencesUserDomain field. +func (o *EndpointPostBody) SetReferencesUserDomain(v string) { + o.ReferencesUserDomain.Set(&v) +} +// SetReferencesUserDomainNil sets the value for ReferencesUserDomain to be an explicit nil +func (o *EndpointPostBody) SetReferencesUserDomainNil() { + o.ReferencesUserDomain.Set(nil) +} + +// UnsetReferencesUserDomain ensures that no value is present for ReferencesUserDomain, not even an explicit nil +func (o *EndpointPostBody) UnsetReferencesUserDomain() { + o.ReferencesUserDomain.Unset() +} + +// GetResponseTimeout returns the ResponseTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBody) GetResponseTimeout() string { + if o == nil || o.ResponseTimeout.Get() == nil { + var ret string + return ret + } + return *o.ResponseTimeout.Get() +} + +// GetResponseTimeoutOk returns a tuple with the ResponseTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBody) GetResponseTimeoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResponseTimeout.Get(), o.ResponseTimeout.IsSet() +} + +// HasResponseTimeout returns a boolean if a field has been set. +func (o *EndpointPostBody) HasResponseTimeout() bool { + if o != nil && o.ResponseTimeout.IsSet() { + return true + } + + return false +} + +// SetResponseTimeout gets a reference to the given NullableString and assigns it to the ResponseTimeout field. +func (o *EndpointPostBody) SetResponseTimeout(v string) { + o.ResponseTimeout.Set(&v) +} +// SetResponseTimeoutNil sets the value for ResponseTimeout to be an explicit nil +func (o *EndpointPostBody) SetResponseTimeoutNil() { + o.ResponseTimeout.Set(nil) +} + +// UnsetResponseTimeout ensures that no value is present for ResponseTimeout, not even an explicit nil +func (o *EndpointPostBody) UnsetResponseTimeout() { + o.ResponseTimeout.Unset() +} + +// GetTlsContexts returns the TlsContexts field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBody) GetTlsContexts() EndpointPostBodyTlsContexts { + if o == nil || o.TlsContexts.Get() == nil { + var ret EndpointPostBodyTlsContexts + return ret + } + return *o.TlsContexts.Get() +} + +// GetTlsContextsOk returns a tuple with the TlsContexts field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBody) GetTlsContextsOk() (*EndpointPostBodyTlsContexts, bool) { + if o == nil { + return nil, false + } + return o.TlsContexts.Get(), o.TlsContexts.IsSet() +} + +// HasTlsContexts returns a boolean if a field has been set. +func (o *EndpointPostBody) HasTlsContexts() bool { + if o != nil && o.TlsContexts.IsSet() { + return true + } + + return false +} + +// SetTlsContexts gets a reference to the given NullableEndpointPostBodyTlsContexts and assigns it to the TlsContexts field. +func (o *EndpointPostBody) SetTlsContexts(v EndpointPostBodyTlsContexts) { + o.TlsContexts.Set(&v) +} +// SetTlsContextsNil sets the value for TlsContexts to be an explicit nil +func (o *EndpointPostBody) SetTlsContextsNil() { + o.TlsContexts.Set(nil) +} + +// UnsetTlsContexts ensures that no value is present for TlsContexts, not even an explicit nil +func (o *EndpointPostBody) UnsetTlsContexts() { + o.TlsContexts.Unset() +} + +func (o EndpointPostBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.DeploymentType != nil { + toSerialize["deploymentType"] = o.DeploymentType + } + if o.MuleVersion4OrAbove != nil { + toSerialize["muleVersion4OrAbove"] = o.MuleVersion4OrAbove + } + if o.Uri != nil { + toSerialize["uri"] = o.Uri + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.IsCloudHub.IsSet() { + toSerialize["isCloudHub"] = o.IsCloudHub.Get() + } + if o.ProxyUri.IsSet() { + toSerialize["proxyUri"] = o.ProxyUri.Get() + } + if o.ProxyRegistrationUri.IsSet() { + toSerialize["proxyRegistrationUri"] = o.ProxyRegistrationUri.Get() + } + if o.ReferencesUserDomain.IsSet() { + toSerialize["referencesUserDomain"] = o.ReferencesUserDomain.Get() + } + if o.ResponseTimeout.IsSet() { + toSerialize["responseTimeout"] = o.ResponseTimeout.Get() + } + if o.TlsContexts.IsSet() { + toSerialize["tlsContexts"] = o.TlsContexts.Get() + } + return json.Marshal(toSerialize) +} + +type NullableEndpointPostBody struct { + value *EndpointPostBody + isSet bool +} + +func (v NullableEndpointPostBody) Get() *EndpointPostBody { + return v.value +} + +func (v *NullableEndpointPostBody) Set(val *EndpointPostBody) { + v.value = val + v.isSet = true +} + +func (v NullableEndpointPostBody) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpointPostBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpointPostBody(val *EndpointPostBody) *NullableEndpointPostBody { + return &NullableEndpointPostBody{value: val, isSet: true} +} + +func (v NullableEndpointPostBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpointPostBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_endpoint_post_body_tls_contexts.go b/apim/model_endpoint_post_body_tls_contexts.go new file mode 100644 index 0000000..1b154af --- /dev/null +++ b/apim/model_endpoint_post_body_tls_contexts.go @@ -0,0 +1,125 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// EndpointPostBodyTlsContexts struct for EndpointPostBodyTlsContexts +type EndpointPostBodyTlsContexts struct { + Inbound NullableEndpointPostBodyTlsContextsInbound `json:"inbound,omitempty"` +} + +// NewEndpointPostBodyTlsContexts instantiates a new EndpointPostBodyTlsContexts 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 NewEndpointPostBodyTlsContexts() *EndpointPostBodyTlsContexts { + this := EndpointPostBodyTlsContexts{} + return &this +} + +// NewEndpointPostBodyTlsContextsWithDefaults instantiates a new EndpointPostBodyTlsContexts 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 NewEndpointPostBodyTlsContextsWithDefaults() *EndpointPostBodyTlsContexts { + this := EndpointPostBodyTlsContexts{} + return &this +} + +// GetInbound returns the Inbound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointPostBodyTlsContexts) GetInbound() EndpointPostBodyTlsContextsInbound { + if o == nil || o.Inbound.Get() == nil { + var ret EndpointPostBodyTlsContextsInbound + return ret + } + return *o.Inbound.Get() +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointPostBodyTlsContexts) GetInboundOk() (*EndpointPostBodyTlsContextsInbound, bool) { + if o == nil { + return nil, false + } + return o.Inbound.Get(), o.Inbound.IsSet() +} + +// HasInbound returns a boolean if a field has been set. +func (o *EndpointPostBodyTlsContexts) HasInbound() bool { + if o != nil && o.Inbound.IsSet() { + return true + } + + return false +} + +// SetInbound gets a reference to the given NullableEndpointPostBodyTlsContextsInbound and assigns it to the Inbound field. +func (o *EndpointPostBodyTlsContexts) SetInbound(v EndpointPostBodyTlsContextsInbound) { + o.Inbound.Set(&v) +} +// SetInboundNil sets the value for Inbound to be an explicit nil +func (o *EndpointPostBodyTlsContexts) SetInboundNil() { + o.Inbound.Set(nil) +} + +// UnsetInbound ensures that no value is present for Inbound, not even an explicit nil +func (o *EndpointPostBodyTlsContexts) UnsetInbound() { + o.Inbound.Unset() +} + +func (o EndpointPostBodyTlsContexts) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Inbound.IsSet() { + toSerialize["inbound"] = o.Inbound.Get() + } + return json.Marshal(toSerialize) +} + +type NullableEndpointPostBodyTlsContexts struct { + value *EndpointPostBodyTlsContexts + isSet bool +} + +func (v NullableEndpointPostBodyTlsContexts) Get() *EndpointPostBodyTlsContexts { + return v.value +} + +func (v *NullableEndpointPostBodyTlsContexts) Set(val *EndpointPostBodyTlsContexts) { + v.value = val + v.isSet = true +} + +func (v NullableEndpointPostBodyTlsContexts) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpointPostBodyTlsContexts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpointPostBodyTlsContexts(val *EndpointPostBodyTlsContexts) *NullableEndpointPostBodyTlsContexts { + return &NullableEndpointPostBodyTlsContexts{value: val, isSet: true} +} + +func (v NullableEndpointPostBodyTlsContexts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpointPostBodyTlsContexts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_endpoint_post_body_tls_contexts_inbound.go b/apim/model_endpoint_post_body_tls_contexts_inbound.go new file mode 100644 index 0000000..88457f7 --- /dev/null +++ b/apim/model_endpoint_post_body_tls_contexts_inbound.go @@ -0,0 +1,187 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// EndpointPostBodyTlsContextsInbound struct for EndpointPostBodyTlsContextsInbound +type EndpointPostBodyTlsContextsInbound struct { + TlsContextId *string `json:"tlsContextId,omitempty"` + SecretGroupId *string `json:"secretGroupId,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewEndpointPostBodyTlsContextsInbound instantiates a new EndpointPostBodyTlsContextsInbound 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 NewEndpointPostBodyTlsContextsInbound() *EndpointPostBodyTlsContextsInbound { + this := EndpointPostBodyTlsContextsInbound{} + return &this +} + +// NewEndpointPostBodyTlsContextsInboundWithDefaults instantiates a new EndpointPostBodyTlsContextsInbound 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 NewEndpointPostBodyTlsContextsInboundWithDefaults() *EndpointPostBodyTlsContextsInbound { + this := EndpointPostBodyTlsContextsInbound{} + return &this +} + +// GetTlsContextId returns the TlsContextId field value if set, zero value otherwise. +func (o *EndpointPostBodyTlsContextsInbound) GetTlsContextId() string { + if o == nil || o.TlsContextId == nil { + var ret string + return ret + } + return *o.TlsContextId +} + +// GetTlsContextIdOk returns a tuple with the TlsContextId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBodyTlsContextsInbound) GetTlsContextIdOk() (*string, bool) { + if o == nil || o.TlsContextId == nil { + return nil, false + } + return o.TlsContextId, true +} + +// HasTlsContextId returns a boolean if a field has been set. +func (o *EndpointPostBodyTlsContextsInbound) HasTlsContextId() bool { + if o != nil && o.TlsContextId != nil { + return true + } + + return false +} + +// SetTlsContextId gets a reference to the given string and assigns it to the TlsContextId field. +func (o *EndpointPostBodyTlsContextsInbound) SetTlsContextId(v string) { + o.TlsContextId = &v +} + +// GetSecretGroupId returns the SecretGroupId field value if set, zero value otherwise. +func (o *EndpointPostBodyTlsContextsInbound) GetSecretGroupId() string { + if o == nil || o.SecretGroupId == nil { + var ret string + return ret + } + return *o.SecretGroupId +} + +// GetSecretGroupIdOk returns a tuple with the SecretGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBodyTlsContextsInbound) GetSecretGroupIdOk() (*string, bool) { + if o == nil || o.SecretGroupId == nil { + return nil, false + } + return o.SecretGroupId, true +} + +// HasSecretGroupId returns a boolean if a field has been set. +func (o *EndpointPostBodyTlsContextsInbound) HasSecretGroupId() bool { + if o != nil && o.SecretGroupId != nil { + return true + } + + return false +} + +// SetSecretGroupId gets a reference to the given string and assigns it to the SecretGroupId field. +func (o *EndpointPostBodyTlsContextsInbound) SetSecretGroupId(v string) { + o.SecretGroupId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EndpointPostBodyTlsContextsInbound) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointPostBodyTlsContextsInbound) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EndpointPostBodyTlsContextsInbound) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EndpointPostBodyTlsContextsInbound) SetName(v string) { + o.Name = &v +} + +func (o EndpointPostBodyTlsContextsInbound) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.TlsContextId != nil { + toSerialize["tlsContextId"] = o.TlsContextId + } + if o.SecretGroupId != nil { + toSerialize["secretGroupId"] = o.SecretGroupId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableEndpointPostBodyTlsContextsInbound struct { + value *EndpointPostBodyTlsContextsInbound + isSet bool +} + +func (v NullableEndpointPostBodyTlsContextsInbound) Get() *EndpointPostBodyTlsContextsInbound { + return v.value +} + +func (v *NullableEndpointPostBodyTlsContextsInbound) Set(val *EndpointPostBodyTlsContextsInbound) { + v.value = val + v.isSet = true +} + +func (v NullableEndpointPostBodyTlsContextsInbound) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpointPostBodyTlsContextsInbound) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpointPostBodyTlsContextsInbound(val *EndpointPostBodyTlsContextsInbound) *NullableEndpointPostBodyTlsContextsInbound { + return &NullableEndpointPostBodyTlsContextsInbound{value: val, isSet: true} +} + +func (v NullableEndpointPostBodyTlsContextsInbound) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpointPostBodyTlsContextsInbound) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_endpoint_tls_contexts.go b/apim/model_endpoint_tls_contexts.go new file mode 100644 index 0000000..b2f1f66 --- /dev/null +++ b/apim/model_endpoint_tls_contexts.go @@ -0,0 +1,198 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// EndpointTlsContexts struct for EndpointTlsContexts +type EndpointTlsContexts struct { + Audit *Audit `json:"audit,omitempty"` + Inbound NullableEndpointTlsContextsInbound `json:"inbound,omitempty"` + Outbound map[string]interface{} `json:"outbound,omitempty"` +} + +// NewEndpointTlsContexts instantiates a new EndpointTlsContexts 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 NewEndpointTlsContexts() *EndpointTlsContexts { + this := EndpointTlsContexts{} + return &this +} + +// NewEndpointTlsContextsWithDefaults instantiates a new EndpointTlsContexts 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 NewEndpointTlsContextsWithDefaults() *EndpointTlsContexts { + this := EndpointTlsContexts{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *EndpointTlsContexts) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointTlsContexts) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *EndpointTlsContexts) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *EndpointTlsContexts) SetAudit(v Audit) { + o.Audit = &v +} + +// GetInbound returns the Inbound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointTlsContexts) GetInbound() EndpointTlsContextsInbound { + if o == nil || o.Inbound.Get() == nil { + var ret EndpointTlsContextsInbound + return ret + } + return *o.Inbound.Get() +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointTlsContexts) GetInboundOk() (*EndpointTlsContextsInbound, bool) { + if o == nil { + return nil, false + } + return o.Inbound.Get(), o.Inbound.IsSet() +} + +// HasInbound returns a boolean if a field has been set. +func (o *EndpointTlsContexts) HasInbound() bool { + if o != nil && o.Inbound.IsSet() { + return true + } + + return false +} + +// SetInbound gets a reference to the given NullableEndpointTlsContextsInbound and assigns it to the Inbound field. +func (o *EndpointTlsContexts) SetInbound(v EndpointTlsContextsInbound) { + o.Inbound.Set(&v) +} +// SetInboundNil sets the value for Inbound to be an explicit nil +func (o *EndpointTlsContexts) SetInboundNil() { + o.Inbound.Set(nil) +} + +// UnsetInbound ensures that no value is present for Inbound, not even an explicit nil +func (o *EndpointTlsContexts) UnsetInbound() { + o.Inbound.Unset() +} + +// GetOutbound returns the Outbound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EndpointTlsContexts) GetOutbound() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Outbound +} + +// GetOutboundOk returns a tuple with the Outbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EndpointTlsContexts) GetOutboundOk() (*map[string]interface{}, bool) { + if o == nil || o.Outbound == nil { + return nil, false + } + return &o.Outbound, true +} + +// HasOutbound returns a boolean if a field has been set. +func (o *EndpointTlsContexts) HasOutbound() bool { + if o != nil && o.Outbound != nil { + return true + } + + return false +} + +// SetOutbound gets a reference to the given map[string]interface{} and assigns it to the Outbound field. +func (o *EndpointTlsContexts) SetOutbound(v map[string]interface{}) { + o.Outbound = v +} + +func (o EndpointTlsContexts) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.Inbound.IsSet() { + toSerialize["inbound"] = o.Inbound.Get() + } + if o.Outbound != nil { + toSerialize["outbound"] = o.Outbound + } + return json.Marshal(toSerialize) +} + +type NullableEndpointTlsContexts struct { + value *EndpointTlsContexts + isSet bool +} + +func (v NullableEndpointTlsContexts) Get() *EndpointTlsContexts { + return v.value +} + +func (v *NullableEndpointTlsContexts) Set(val *EndpointTlsContexts) { + v.value = val + v.isSet = true +} + +func (v NullableEndpointTlsContexts) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpointTlsContexts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpointTlsContexts(val *EndpointTlsContexts) *NullableEndpointTlsContexts { + return &NullableEndpointTlsContexts{value: val, isSet: true} +} + +func (v NullableEndpointTlsContexts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpointTlsContexts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_endpoint_tls_contexts_inbound.go b/apim/model_endpoint_tls_contexts_inbound.go new file mode 100644 index 0000000..7c476cf --- /dev/null +++ b/apim/model_endpoint_tls_contexts_inbound.go @@ -0,0 +1,223 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// EndpointTlsContextsInbound struct for EndpointTlsContextsInbound +type EndpointTlsContextsInbound struct { + SecretGroupId *string `json:"secretGroupId,omitempty"` + TlsContextId *string `json:"tlsContextId,omitempty"` + Name *string `json:"name,omitempty"` + Authorized *bool `json:"authorized,omitempty"` +} + +// NewEndpointTlsContextsInbound instantiates a new EndpointTlsContextsInbound 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 NewEndpointTlsContextsInbound() *EndpointTlsContextsInbound { + this := EndpointTlsContextsInbound{} + return &this +} + +// NewEndpointTlsContextsInboundWithDefaults instantiates a new EndpointTlsContextsInbound 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 NewEndpointTlsContextsInboundWithDefaults() *EndpointTlsContextsInbound { + this := EndpointTlsContextsInbound{} + return &this +} + +// GetSecretGroupId returns the SecretGroupId field value if set, zero value otherwise. +func (o *EndpointTlsContextsInbound) GetSecretGroupId() string { + if o == nil || o.SecretGroupId == nil { + var ret string + return ret + } + return *o.SecretGroupId +} + +// GetSecretGroupIdOk returns a tuple with the SecretGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointTlsContextsInbound) GetSecretGroupIdOk() (*string, bool) { + if o == nil || o.SecretGroupId == nil { + return nil, false + } + return o.SecretGroupId, true +} + +// HasSecretGroupId returns a boolean if a field has been set. +func (o *EndpointTlsContextsInbound) HasSecretGroupId() bool { + if o != nil && o.SecretGroupId != nil { + return true + } + + return false +} + +// SetSecretGroupId gets a reference to the given string and assigns it to the SecretGroupId field. +func (o *EndpointTlsContextsInbound) SetSecretGroupId(v string) { + o.SecretGroupId = &v +} + +// GetTlsContextId returns the TlsContextId field value if set, zero value otherwise. +func (o *EndpointTlsContextsInbound) GetTlsContextId() string { + if o == nil || o.TlsContextId == nil { + var ret string + return ret + } + return *o.TlsContextId +} + +// GetTlsContextIdOk returns a tuple with the TlsContextId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointTlsContextsInbound) GetTlsContextIdOk() (*string, bool) { + if o == nil || o.TlsContextId == nil { + return nil, false + } + return o.TlsContextId, true +} + +// HasTlsContextId returns a boolean if a field has been set. +func (o *EndpointTlsContextsInbound) HasTlsContextId() bool { + if o != nil && o.TlsContextId != nil { + return true + } + + return false +} + +// SetTlsContextId gets a reference to the given string and assigns it to the TlsContextId field. +func (o *EndpointTlsContextsInbound) SetTlsContextId(v string) { + o.TlsContextId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EndpointTlsContextsInbound) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointTlsContextsInbound) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EndpointTlsContextsInbound) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EndpointTlsContextsInbound) SetName(v string) { + o.Name = &v +} + +// GetAuthorized returns the Authorized field value if set, zero value otherwise. +func (o *EndpointTlsContextsInbound) GetAuthorized() bool { + if o == nil || o.Authorized == nil { + var ret bool + return ret + } + return *o.Authorized +} + +// GetAuthorizedOk returns a tuple with the Authorized field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EndpointTlsContextsInbound) GetAuthorizedOk() (*bool, bool) { + if o == nil || o.Authorized == nil { + return nil, false + } + return o.Authorized, true +} + +// HasAuthorized returns a boolean if a field has been set. +func (o *EndpointTlsContextsInbound) HasAuthorized() bool { + if o != nil && o.Authorized != nil { + return true + } + + return false +} + +// SetAuthorized gets a reference to the given bool and assigns it to the Authorized field. +func (o *EndpointTlsContextsInbound) SetAuthorized(v bool) { + o.Authorized = &v +} + +func (o EndpointTlsContextsInbound) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SecretGroupId != nil { + toSerialize["secretGroupId"] = o.SecretGroupId + } + if o.TlsContextId != nil { + toSerialize["tlsContextId"] = o.TlsContextId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Authorized != nil { + toSerialize["authorized"] = o.Authorized + } + return json.Marshal(toSerialize) +} + +type NullableEndpointTlsContextsInbound struct { + value *EndpointTlsContextsInbound + isSet bool +} + +func (v NullableEndpointTlsContextsInbound) Get() *EndpointTlsContextsInbound { + return v.value +} + +func (v *NullableEndpointTlsContextsInbound) Set(val *EndpointTlsContextsInbound) { + v.value = val + v.isSet = true +} + +func (v NullableEndpointTlsContextsInbound) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpointTlsContextsInbound) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpointTlsContextsInbound(val *EndpointTlsContextsInbound) *NullableEndpointTlsContextsInbound { + return &NullableEndpointTlsContextsInbound{value: val, isSet: true} +} + +func (v NullableEndpointTlsContextsInbound) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpointTlsContextsInbound) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_errors_response.go b/apim/model_errors_response.go new file mode 100644 index 0000000..1d10249 --- /dev/null +++ b/apim/model_errors_response.go @@ -0,0 +1,115 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ErrorsResponse struct for ErrorsResponse +type ErrorsResponse struct { + Errors *[]ErrorsResponseErrors `json:"errors,omitempty"` +} + +// NewErrorsResponse instantiates a new ErrorsResponse 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 NewErrorsResponse() *ErrorsResponse { + this := ErrorsResponse{} + return &this +} + +// NewErrorsResponseWithDefaults instantiates a new ErrorsResponse 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 NewErrorsResponseWithDefaults() *ErrorsResponse { + this := ErrorsResponse{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ErrorsResponse) GetErrors() []ErrorsResponseErrors { + if o == nil || o.Errors == nil { + var ret []ErrorsResponseErrors + return ret + } + return *o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponse) GetErrorsOk() (*[]ErrorsResponseErrors, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *ErrorsResponse) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given []ErrorsResponseErrors and assigns it to the Errors field. +func (o *ErrorsResponse) SetErrors(v []ErrorsResponseErrors) { + o.Errors = &v +} + +func (o ErrorsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + return json.Marshal(toSerialize) +} + +type NullableErrorsResponse struct { + value *ErrorsResponse + isSet bool +} + +func (v NullableErrorsResponse) Get() *ErrorsResponse { + return v.value +} + +func (v *NullableErrorsResponse) Set(val *ErrorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorsResponse(val *ErrorsResponse) *NullableErrorsResponse { + return &NullableErrorsResponse{value: val, isSet: true} +} + +func (v NullableErrorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_errors_response_errors.go b/apim/model_errors_response_errors.go new file mode 100644 index 0000000..4c9b523 --- /dev/null +++ b/apim/model_errors_response_errors.go @@ -0,0 +1,295 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// ErrorsResponseErrors struct for ErrorsResponseErrors +type ErrorsResponseErrors struct { + Type *string `json:"type,omitempty"` + DataPath *string `json:"dataPath,omitempty"` + Keyword *string `json:"keyword,omitempty"` + Schema *string `json:"schema,omitempty"` + Data *string `json:"data,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewErrorsResponseErrors instantiates a new ErrorsResponseErrors 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 NewErrorsResponseErrors() *ErrorsResponseErrors { + this := ErrorsResponseErrors{} + return &this +} + +// NewErrorsResponseErrorsWithDefaults instantiates a new ErrorsResponseErrors 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 NewErrorsResponseErrorsWithDefaults() *ErrorsResponseErrors { + this := ErrorsResponseErrors{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ErrorsResponseErrors) SetType(v string) { + o.Type = &v +} + +// GetDataPath returns the DataPath field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetDataPath() string { + if o == nil || o.DataPath == nil { + var ret string + return ret + } + return *o.DataPath +} + +// GetDataPathOk returns a tuple with the DataPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetDataPathOk() (*string, bool) { + if o == nil || o.DataPath == nil { + return nil, false + } + return o.DataPath, true +} + +// HasDataPath returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasDataPath() bool { + if o != nil && o.DataPath != nil { + return true + } + + return false +} + +// SetDataPath gets a reference to the given string and assigns it to the DataPath field. +func (o *ErrorsResponseErrors) SetDataPath(v string) { + o.DataPath = &v +} + +// GetKeyword returns the Keyword field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetKeyword() string { + if o == nil || o.Keyword == nil { + var ret string + return ret + } + return *o.Keyword +} + +// GetKeywordOk returns a tuple with the Keyword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetKeywordOk() (*string, bool) { + if o == nil || o.Keyword == nil { + return nil, false + } + return o.Keyword, true +} + +// HasKeyword returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasKeyword() bool { + if o != nil && o.Keyword != nil { + return true + } + + return false +} + +// SetKeyword gets a reference to the given string and assigns it to the Keyword field. +func (o *ErrorsResponseErrors) SetKeyword(v string) { + o.Keyword = &v +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetSchema() string { + if o == nil || o.Schema == nil { + var ret string + return ret + } + return *o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetSchemaOk() (*string, bool) { + if o == nil || o.Schema == nil { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasSchema() bool { + if o != nil && o.Schema != nil { + return true + } + + return false +} + +// SetSchema gets a reference to the given string and assigns it to the Schema field. +func (o *ErrorsResponseErrors) SetSchema(v string) { + o.Schema = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetData() string { + if o == nil || o.Data == nil { + var ret string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetDataOk() (*string, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given string and assigns it to the Data field. +func (o *ErrorsResponseErrors) SetData(v string) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ErrorsResponseErrors) SetMessage(v string) { + o.Message = &v +} + +func (o ErrorsResponseErrors) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.DataPath != nil { + toSerialize["dataPath"] = o.DataPath + } + if o.Keyword != nil { + toSerialize["keyword"] = o.Keyword + } + if o.Schema != nil { + toSerialize["schema"] = o.Schema + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableErrorsResponseErrors struct { + value *ErrorsResponseErrors + isSet bool +} + +func (v NullableErrorsResponseErrors) Get() *ErrorsResponseErrors { + return v.value +} + +func (v *NullableErrorsResponseErrors) Set(val *ErrorsResponseErrors) { + v.value = val + v.isSet = true +} + +func (v NullableErrorsResponseErrors) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorsResponseErrors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorsResponseErrors(val *ErrorsResponseErrors) *NullableErrorsResponseErrors { + return &NullableErrorsResponseErrors{value: val, isSet: true} +} + +func (v NullableErrorsResponseErrors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorsResponseErrors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_inline_response_404.go b/apim/model_inline_response_404.go new file mode 100644 index 0000000..f5fabec --- /dev/null +++ b/apim/model_inline_response_404.go @@ -0,0 +1,151 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// InlineResponse404 struct for InlineResponse404 +type InlineResponse404 struct { + Name *string `json:"name,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewInlineResponse404 instantiates a new InlineResponse404 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 NewInlineResponse404() *InlineResponse404 { + this := InlineResponse404{} + return &this +} + +// NewInlineResponse404WithDefaults instantiates a new InlineResponse404 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 NewInlineResponse404WithDefaults() *InlineResponse404 { + this := InlineResponse404{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InlineResponse404) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse404) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InlineResponse404) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InlineResponse404) SetName(v string) { + o.Name = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *InlineResponse404) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse404) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *InlineResponse404) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *InlineResponse404) SetMessage(v string) { + o.Message = &v +} + +func (o InlineResponse404) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableInlineResponse404 struct { + value *InlineResponse404 + isSet bool +} + +func (v NullableInlineResponse404) Get() *InlineResponse404 { + return v.value +} + +func (v *NullableInlineResponse404) Set(val *InlineResponse404) { + v.value = val + v.isSet = true +} + +func (v NullableInlineResponse404) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineResponse404) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineResponse404(val *InlineResponse404) *NullableInlineResponse404 { + return &NullableInlineResponse404{value: val, isSet: true} +} + +func (v NullableInlineResponse404) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInlineResponse404) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_routing.go b/apim/model_routing.go new file mode 100644 index 0000000..89a2822 --- /dev/null +++ b/apim/model_routing.go @@ -0,0 +1,187 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// Routing struct for Routing +type Routing struct { + Label *string `json:"label,omitempty"` + Rules *RoutingRules `json:"rules,omitempty"` + Upstreams *[]RoutingUpstreams `json:"upstreams,omitempty"` +} + +// NewRouting instantiates a new Routing 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 NewRouting() *Routing { + this := Routing{} + return &this +} + +// NewRoutingWithDefaults instantiates a new Routing 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 NewRoutingWithDefaults() *Routing { + this := Routing{} + return &this +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *Routing) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Routing) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *Routing) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *Routing) SetLabel(v string) { + o.Label = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *Routing) GetRules() RoutingRules { + if o == nil || o.Rules == nil { + var ret RoutingRules + return ret + } + return *o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Routing) GetRulesOk() (*RoutingRules, bool) { + if o == nil || o.Rules == nil { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *Routing) HasRules() bool { + if o != nil && o.Rules != nil { + return true + } + + return false +} + +// SetRules gets a reference to the given RoutingRules and assigns it to the Rules field. +func (o *Routing) SetRules(v RoutingRules) { + o.Rules = &v +} + +// GetUpstreams returns the Upstreams field value if set, zero value otherwise. +func (o *Routing) GetUpstreams() []RoutingUpstreams { + if o == nil || o.Upstreams == nil { + var ret []RoutingUpstreams + return ret + } + return *o.Upstreams +} + +// GetUpstreamsOk returns a tuple with the Upstreams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Routing) GetUpstreamsOk() (*[]RoutingUpstreams, bool) { + if o == nil || o.Upstreams == nil { + return nil, false + } + return o.Upstreams, true +} + +// HasUpstreams returns a boolean if a field has been set. +func (o *Routing) HasUpstreams() bool { + if o != nil && o.Upstreams != nil { + return true + } + + return false +} + +// SetUpstreams gets a reference to the given []RoutingUpstreams and assigns it to the Upstreams field. +func (o *Routing) SetUpstreams(v []RoutingUpstreams) { + o.Upstreams = &v +} + +func (o Routing) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Label != nil { + toSerialize["label"] = o.Label + } + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + if o.Upstreams != nil { + toSerialize["upstreams"] = o.Upstreams + } + return json.Marshal(toSerialize) +} + +type NullableRouting struct { + value *Routing + isSet bool +} + +func (v NullableRouting) Get() *Routing { + return v.value +} + +func (v *NullableRouting) Set(val *Routing) { + v.value = val + v.isSet = true +} + +func (v NullableRouting) IsSet() bool { + return v.isSet +} + +func (v *NullableRouting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRouting(val *Routing) *NullableRouting { + return &NullableRouting{value: val, isSet: true} +} + +func (v NullableRouting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRouting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_routing_rules.go b/apim/model_routing_rules.go new file mode 100644 index 0000000..9048ce7 --- /dev/null +++ b/apim/model_routing_rules.go @@ -0,0 +1,223 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// RoutingRules struct for RoutingRules +type RoutingRules struct { + Methods *string `json:"methods,omitempty"` + Host *string `json:"host,omitempty"` + Path *string `json:"path,omitempty"` + Headers *map[string]interface{} `json:"headers,omitempty"` +} + +// NewRoutingRules instantiates a new RoutingRules 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 NewRoutingRules() *RoutingRules { + this := RoutingRules{} + return &this +} + +// NewRoutingRulesWithDefaults instantiates a new RoutingRules 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 NewRoutingRulesWithDefaults() *RoutingRules { + this := RoutingRules{} + return &this +} + +// GetMethods returns the Methods field value if set, zero value otherwise. +func (o *RoutingRules) GetMethods() string { + if o == nil || o.Methods == nil { + var ret string + return ret + } + return *o.Methods +} + +// GetMethodsOk returns a tuple with the Methods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingRules) GetMethodsOk() (*string, bool) { + if o == nil || o.Methods == nil { + return nil, false + } + return o.Methods, true +} + +// HasMethods returns a boolean if a field has been set. +func (o *RoutingRules) HasMethods() bool { + if o != nil && o.Methods != nil { + return true + } + + return false +} + +// SetMethods gets a reference to the given string and assigns it to the Methods field. +func (o *RoutingRules) SetMethods(v string) { + o.Methods = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *RoutingRules) GetHost() string { + if o == nil || o.Host == nil { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingRules) GetHostOk() (*string, bool) { + if o == nil || o.Host == nil { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *RoutingRules) HasHost() bool { + if o != nil && o.Host != nil { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *RoutingRules) SetHost(v string) { + o.Host = &v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *RoutingRules) GetPath() string { + if o == nil || o.Path == nil { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingRules) GetPathOk() (*string, bool) { + if o == nil || o.Path == nil { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *RoutingRules) HasPath() bool { + if o != nil && o.Path != nil { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *RoutingRules) SetPath(v string) { + o.Path = &v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *RoutingRules) GetHeaders() map[string]interface{} { + if o == nil || o.Headers == nil { + var ret map[string]interface{} + return ret + } + return *o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingRules) GetHeadersOk() (*map[string]interface{}, bool) { + if o == nil || o.Headers == nil { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *RoutingRules) HasHeaders() bool { + if o != nil && o.Headers != nil { + return true + } + + return false +} + +// SetHeaders gets a reference to the given map[string]interface{} and assigns it to the Headers field. +func (o *RoutingRules) SetHeaders(v map[string]interface{}) { + o.Headers = &v +} + +func (o RoutingRules) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Methods != nil { + toSerialize["methods"] = o.Methods + } + if o.Host != nil { + toSerialize["host"] = o.Host + } + if o.Path != nil { + toSerialize["path"] = o.Path + } + if o.Headers != nil { + toSerialize["headers"] = o.Headers + } + return json.Marshal(toSerialize) +} + +type NullableRoutingRules struct { + value *RoutingRules + isSet bool +} + +func (v NullableRoutingRules) Get() *RoutingRules { + return v.value +} + +func (v *NullableRoutingRules) Set(val *RoutingRules) { + v.value = val + v.isSet = true +} + +func (v NullableRoutingRules) IsSet() bool { + return v.isSet +} + +func (v *NullableRoutingRules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoutingRules(val *RoutingRules) *NullableRoutingRules { + return &NullableRoutingRules{value: val, isSet: true} +} + +func (v NullableRoutingRules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoutingRules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_routing_upstreams.go b/apim/model_routing_upstreams.go new file mode 100644 index 0000000..812d58f --- /dev/null +++ b/apim/model_routing_upstreams.go @@ -0,0 +1,223 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// RoutingUpstreams struct for RoutingUpstreams +type RoutingUpstreams struct { + Id *string `json:"id,omitempty"` + Weight *int32 `json:"weight,omitempty"` + Uri *string `json:"uri,omitempty"` + Label *string `json:"label,omitempty"` +} + +// NewRoutingUpstreams instantiates a new RoutingUpstreams 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 NewRoutingUpstreams() *RoutingUpstreams { + this := RoutingUpstreams{} + return &this +} + +// NewRoutingUpstreamsWithDefaults instantiates a new RoutingUpstreams 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 NewRoutingUpstreamsWithDefaults() *RoutingUpstreams { + this := RoutingUpstreams{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RoutingUpstreams) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingUpstreams) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RoutingUpstreams) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RoutingUpstreams) SetId(v string) { + o.Id = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *RoutingUpstreams) GetWeight() int32 { + if o == nil || o.Weight == nil { + var ret int32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingUpstreams) GetWeightOk() (*int32, bool) { + if o == nil || o.Weight == nil { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *RoutingUpstreams) HasWeight() bool { + if o != nil && o.Weight != nil { + return true + } + + return false +} + +// SetWeight gets a reference to the given int32 and assigns it to the Weight field. +func (o *RoutingUpstreams) SetWeight(v int32) { + o.Weight = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *RoutingUpstreams) GetUri() string { + if o == nil || o.Uri == nil { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingUpstreams) GetUriOk() (*string, bool) { + if o == nil || o.Uri == nil { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *RoutingUpstreams) HasUri() bool { + if o != nil && o.Uri != nil { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *RoutingUpstreams) SetUri(v string) { + o.Uri = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *RoutingUpstreams) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoutingUpstreams) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *RoutingUpstreams) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *RoutingUpstreams) SetLabel(v string) { + o.Label = &v +} + +func (o RoutingUpstreams) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Weight != nil { + toSerialize["weight"] = o.Weight + } + if o.Uri != nil { + toSerialize["uri"] = o.Uri + } + if o.Label != nil { + toSerialize["label"] = o.Label + } + return json.Marshal(toSerialize) +} + +type NullableRoutingUpstreams struct { + value *RoutingUpstreams + isSet bool +} + +func (v NullableRoutingUpstreams) Get() *RoutingUpstreams { + return v.value +} + +func (v *NullableRoutingUpstreams) Set(val *RoutingUpstreams) { + v.value = val + v.isSet = true +} + +func (v NullableRoutingUpstreams) IsSet() bool { + return v.isSet +} + +func (v *NullableRoutingUpstreams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoutingUpstreams(val *RoutingUpstreams) *NullableRoutingUpstreams { + return &NullableRoutingUpstreams{value: val, isSet: true} +} + +func (v NullableRoutingUpstreams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoutingUpstreams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/model_spec.go b/apim/model_spec.go new file mode 100644 index 0000000..194a25e --- /dev/null +++ b/apim/model_spec.go @@ -0,0 +1,187 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" +) + +// Spec struct for Spec +type Spec struct { + AssetId *string `json:"assetId,omitempty"` + GroupId *string `json:"groupId,omitempty"` + Version *string `json:"version,omitempty"` +} + +// NewSpec instantiates a new Spec 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 NewSpec() *Spec { + this := Spec{} + return &this +} + +// NewSpecWithDefaults instantiates a new Spec 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 NewSpecWithDefaults() *Spec { + this := Spec{} + return &this +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *Spec) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Spec) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *Spec) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *Spec) SetAssetId(v string) { + o.AssetId = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *Spec) GetGroupId() string { + if o == nil || o.GroupId == nil { + var ret string + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Spec) GetGroupIdOk() (*string, bool) { + if o == nil || o.GroupId == nil { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *Spec) HasGroupId() bool { + if o != nil && o.GroupId != nil { + return true + } + + return false +} + +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. +func (o *Spec) SetGroupId(v string) { + o.GroupId = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *Spec) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Spec) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Spec) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *Spec) SetVersion(v string) { + o.Version = &v +} + +func (o Spec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AssetId != nil { + toSerialize["assetId"] = o.AssetId + } + if o.GroupId != nil { + toSerialize["groupId"] = o.GroupId + } + if o.Version != nil { + toSerialize["version"] = o.Version + } + return json.Marshal(toSerialize) +} + +type NullableSpec struct { + value *Spec + isSet bool +} + +func (v NullableSpec) Get() *Spec { + return v.value +} + +func (v *NullableSpec) Set(val *Spec) { + v.value = val + v.isSet = true +} + +func (v NullableSpec) IsSet() bool { + return v.isSet +} + +func (v *NullableSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpec(val *Spec) *NullableSpec { + return &NullableSpec{value: val, isSet: true} +} + +func (v NullableSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim/response.go b/apim/response.go new file mode 100644 index 0000000..1ca6e06 --- /dev/null +++ b/apim/response.go @@ -0,0 +1,47 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +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:"-"` +} + +// NewAPIResponse returns a new APIResonse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/apim/utils.go b/apim/utils.go new file mode 100644 index 0000000..ff2cf7a --- /dev/null +++ b/apim/utils.go @@ -0,0 +1,328 @@ +/* + * API Manager API + * + * API Manager API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim + +import ( + "encoding/json" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/apim_upstream/.gitignore b/apim_upstream/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/apim_upstream/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/apim_upstream/.openapi-generator-ignore b/apim_upstream/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/apim_upstream/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/apim_upstream/.openapi-generator/FILES b/apim_upstream/.openapi-generator/FILES new file mode 100644 index 0000000..d39a138 --- /dev/null +++ b/apim_upstream/.openapi-generator/FILES @@ -0,0 +1,40 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_default.go +client.go +configuration.go +docs/Audit.md +docs/AuditCreated.md +docs/DefaultApi.md +docs/ErrorsResponse.md +docs/ErrorsResponseErrors.md +docs/InlineResponse404.md +docs/Upstream.md +docs/UpstreamCollection.md +docs/UpstreamDetails.md +docs/UpstreamDetailsTlsContext.md +docs/UpstreamPatchBody.md +docs/UpstreamPostBody.md +docs/UpstreamPostBodyTlsContext.md +docs/UpstreamTlsContext.md +git_push.sh +go.mod +go.sum +model_audit.go +model_audit_created.go +model_errors_response.go +model_errors_response_errors.go +model_inline_response_404.go +model_upstream.go +model_upstream_collection.go +model_upstream_details.go +model_upstream_details_tls_context.go +model_upstream_patch_body.go +model_upstream_post_body.go +model_upstream_post_body_tls_context.go +model_upstream_tls_context.go +response.go +utils.go diff --git a/apim_upstream/.openapi-generator/VERSION b/apim_upstream/.openapi-generator/VERSION new file mode 100644 index 0000000..acf69b4 --- /dev/null +++ b/apim_upstream/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.1.0 \ No newline at end of file diff --git a/apim_upstream/.travis.yml b/apim_upstream/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/apim_upstream/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/apim_upstream/README.md b/apim_upstream/README.md new file mode 100644 index 0000000..370cd3e --- /dev/null +++ b/apim_upstream/README.md @@ -0,0 +1,140 @@ +# Go API client for apim_upstream + +API Manager Upstream API + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import sw "./apim_upstream" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +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`. + +```golang +ctx := context.WithValue(context.Background(), sw.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`. + +```golang +ctx := context.WithValue(context.Background(), sw.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 identifield 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(), sw.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://anypoint.mulesoft.com/apimanager/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**DeleteApimInstanceUpstream**](docs/DefaultApi.md#deleteapiminstanceupstream) | **Delete** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId} | Delete a specific Upstream of the given API Manager Instance +*DefaultApi* | [**GetApimInstanceUpstream**](docs/DefaultApi.md#getapiminstanceupstream) | **Get** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId} | Retrieve a specific upstream for a given API Manager instance +*DefaultApi* | [**GetApimInstanceUpstreams**](docs/DefaultApi.md#getapiminstanceupstreams) | **Get** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams | Retrieve all upstreams of a given API Manager instance +*DefaultApi* | [**PatchApimInstanceUpstream**](docs/DefaultApi.md#patchapiminstanceupstream) | **Patch** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId} | Update a specific upstream in a given API Manager instance +*DefaultApi* | [**PostApimInstanceUpstream**](docs/DefaultApi.md#postapiminstanceupstream) | **Post** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams | Creates an upstream for a given API Manager instance + + +## Documentation For Models + + - [Audit](docs/Audit.md) + - [AuditCreated](docs/AuditCreated.md) + - [ErrorsResponse](docs/ErrorsResponse.md) + - [ErrorsResponseErrors](docs/ErrorsResponseErrors.md) + - [InlineResponse404](docs/InlineResponse404.md) + - [Upstream](docs/Upstream.md) + - [UpstreamCollection](docs/UpstreamCollection.md) + - [UpstreamDetails](docs/UpstreamDetails.md) + - [UpstreamDetailsTlsContext](docs/UpstreamDetailsTlsContext.md) + - [UpstreamPatchBody](docs/UpstreamPatchBody.md) + - [UpstreamPostBody](docs/UpstreamPostBody.md) + - [UpstreamPostBodyTlsContext](docs/UpstreamPostBodyTlsContext.md) + - [UpstreamTlsContext](docs/UpstreamTlsContext.md) + + +## Documentation For Authorization + + + +### bearerAuth + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING") +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 + + + diff --git a/apim_upstream/api/openapi.yaml b/apim_upstream/api/openapi.yaml new file mode 100644 index 0000000..29c5598 --- /dev/null +++ b/apim_upstream/api/openapi.yaml @@ -0,0 +1,564 @@ +openapi: 3.0.0 +info: + description: API Manager Upstream API + title: API Manager Upstream API + version: 1.0.0 +servers: +- description: Anypoint Cloudhub + url: https://anypoint.mulesoft.com/apimanager/api/v1/ +- description: Anypoint Cloudhub EU + url: https://eu1.anypoint.mulesoft.com/apimanager/api/v1/ +- description: Anypoint Cloudhub GOV + url: https://gov.anypoint.mulesoft.com/apimanager/api/v1/ +security: +- bearerAuth: [] +paths: + /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams: + get: + description: Retrieves all upstreams for a given API Manager instance in a given + environment. Connected App requires the scope "View APIs Configuration" + operationId: GetApimInstanceUpstreams + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api id specific to a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamCollection' + description: Collection of upstreams in a given api manager instance + summary: Retrieve all upstreams of a given API Manager instance + post: + description: Creates an upstream for a given API Manager instance in a given + environment. Connected App requires the scope "Manage APIs Configuration" + operationId: PostApimInstanceUpstream + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api id specific to a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamPostBody' + description: Post API Manager Instance Upstream Body + responses: + "401": + description: Access token is missing or invalid + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorsResponse' + description: Bad request response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamDetails' + description: Upstream post response + summary: Creates an upstream for a given API Manager instance + /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId}: + delete: + description: Delete a specific Upstream in a API Manager Instance in a specific + environment and organization. Connected Apps require the scope "Manage APIs + Configuration". + operationId: DeleteApimInstanceUpstream + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api id specific to a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + - description: The upstream id + explode: false + in: path + name: upstreamId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + "204": + description: delete upstream response + summary: Delete a specific Upstream of the given API Manager Instance + get: + description: Retrieve a specific upstream for a given API Manager instance in + a given environment. Connected App requires the scope "View APIs Configuration" + operationId: GetApimInstanceUpstream + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api id specific to a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + - description: The upstream id + explode: false + in: path + name: upstreamId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamDetails' + description: single upstream in a given api manager instance + summary: Retrieve a specific upstream for a given API Manager instance + patch: + description: Update a specific upstream in a given API Manager instance in a + given environment. Connected App requires the scope "Manage APIs Configuration" + operationId: PatchApimInstanceUpstream + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The api id specific to a given environment + explode: false + in: path + name: envApiId + required: true + schema: + type: string + style: simple + - description: The upstream id + explode: false + in: path + name: upstreamId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamPatchBody' + description: Patch API Manager Instance Upstream Body + responses: + "401": + description: Access token is missing or invalid + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorsResponse' + description: Bad request response + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Upstream' + description: Upstream patch response + summary: Update a specific upstream in a given API Manager instance +components: + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorsResponse' + description: Bad request response + NotFoundError: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' + description: resource not found + SuccessGetApimInstanceUpstreams: + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamCollection' + description: Collection of upstreams in a given api manager instance + SuccessPostApimInstanceUpstream: + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamDetails' + description: Upstream post response + SuccessGetApimInstanceUpstream: + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamDetails' + description: single upstream in a given api manager instance + SuccessPatchApimInstanceUpstream: + content: + application/json: + schema: + $ref: '#/components/schemas/Upstream' + description: Upstream patch response + SuccessDeleteApimInstanceUpstream: + description: delete upstream response + schemas: + ErrorsResponse: + properties: + errors: + items: + $ref: '#/components/schemas/ErrorsResponse_errors' + type: array + title: errorsResponse + type: object + UpstreamCollection: + example: + total: 0 + upstreams: + - audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + tlsContext: + tlsContextId: tlsContextId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + authorized: true + name: name + secretGroupId: secretGroupId + id: id + label: label + uri: uri + - audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + tlsContext: + tlsContextId: tlsContextId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + authorized: true + name: name + secretGroupId: secretGroupId + id: id + label: label + uri: uri + properties: + total: + type: integer + upstreams: + items: + $ref: '#/components/schemas/UpstreamDetails' + type: array + type: object + UpstreamDetails: + example: + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + tlsContext: + tlsContextId: tlsContextId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + authorized: true + name: name + secretGroupId: secretGroupId + id: id + label: label + uri: uri + properties: + audit: + $ref: '#/components/schemas/Audit' + id: + type: string + label: + type: string + uri: + type: string + tlsContext: + $ref: '#/components/schemas/UpstreamDetails_tlsContext' + type: object + Upstream: + example: + tlsContext: + tlsContextId: tlsContextId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + secretGroupId: secretGroupId + id: id + label: label + uri: uri + properties: + id: + type: string + label: + type: string + uri: + type: string + tlsContext: + $ref: '#/components/schemas/Upstream_tlsContext' + type: object + UpstreamPostBody: + example: + tlsContext: + tlsContextId: tlsContextId + secretGroupId: secretGroupId + label: label + uri: uri + properties: + label: + type: string + uri: + type: string + tlsContext: + $ref: '#/components/schemas/UpstreamPostBody_tlsContext' + type: object + UpstreamPatchBody: + example: + tlsContext: + tlsContextId: tlsContextId + secretGroupId: secretGroupId + label: label + uri: uri + properties: + label: + type: string + uri: + type: string + tlsContext: + $ref: '#/components/schemas/UpstreamPostBody_tlsContext' + type: object + Audit: + example: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + properties: + created: + $ref: '#/components/schemas/Audit_created' + updated: + $ref: '#/components/schemas/Audit_created' + type: object + inline_response_404: + properties: + name: + type: string + message: + type: string + type: object + ErrorsResponse_errors: + properties: + type: + title: type + type: string + dataPath: + title: dataPath + type: string + keyword: + title: keyword + type: string + schema: + title: schema + type: string + data: + title: data + type: string + message: + title: message + type: string + type: object + UpstreamDetails_tlsContext: + example: + tlsContextId: tlsContextId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + authorized: true + name: name + secretGroupId: secretGroupId + nullable: true + properties: + audit: + $ref: '#/components/schemas/Audit' + secretGroupId: + type: string + tlsContextId: + type: string + name: + type: string + authorized: + type: boolean + type: object + Upstream_tlsContext: + example: + tlsContextId: tlsContextId + audit: + created: + date: 2000-01-23T04:56:07.000+00:00 + updated: + date: 2000-01-23T04:56:07.000+00:00 + secretGroupId: secretGroupId + properties: + secretGroupId: + type: string + tlsContextId: + type: string + audit: + $ref: '#/components/schemas/Audit' + type: object + UpstreamPostBody_tlsContext: + example: + tlsContextId: tlsContextId + secretGroupId: secretGroupId + nullable: true + properties: + secretGroupId: + type: string + tlsContextId: + type: string + type: object + Audit_created: + example: + date: 2000-01-23T04:56:07.000+00:00 + properties: + date: + format: date-time + type: string + type: object + securitySchemes: + bearerAuth: + bearerFormat: JWT + scheme: bearer + type: http diff --git a/apim_upstream/api_default.go b/apim_upstream/api_default.go new file mode 100644 index 0000000..b65ffbf --- /dev/null +++ b/apim_upstream/api_default.go @@ -0,0 +1,663 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type DefaultApiApiDeleteApimInstanceUpstreamRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string + upstreamId string +} + + +func (r DefaultApiApiDeleteApimInstanceUpstreamRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteApimInstanceUpstreamExecute(r) +} + +/* + * DeleteApimInstanceUpstream Delete a specific Upstream of the given API Manager Instance + * Delete a specific Upstream in a API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api id specific to a given environment + * @param upstreamId The upstream id + * @return DefaultApiApiDeleteApimInstanceUpstreamRequest + */ +func (a *DefaultApiService) DeleteApimInstanceUpstream(ctx _context.Context, orgId string, envId string, envApiId string, upstreamId string) DefaultApiApiDeleteApimInstanceUpstreamRequest { + return DefaultApiApiDeleteApimInstanceUpstreamRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + upstreamId: upstreamId, + } +} + +/* + * Execute executes the request + */ +func (a *DefaultApiService) DeleteApimInstanceUpstreamExecute(r DefaultApiApiDeleteApimInstanceUpstreamRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteApimInstanceUpstream") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"upstreamId"+"}", _neturl.PathEscape(parameterToString(r.upstreamId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse404 + 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 +} + +type DefaultApiApiGetApimInstanceUpstreamRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string + upstreamId string +} + + +func (r DefaultApiApiGetApimInstanceUpstreamRequest) Execute() (UpstreamDetails, *_nethttp.Response, error) { + return r.ApiService.GetApimInstanceUpstreamExecute(r) +} + +/* + * GetApimInstanceUpstream Retrieve a specific upstream for a given API Manager instance + * Retrieve a specific upstream for a given API Manager instance in a given environment. Connected App requires the scope "View APIs Configuration" + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api id specific to a given environment + * @param upstreamId The upstream id + * @return DefaultApiApiGetApimInstanceUpstreamRequest + */ +func (a *DefaultApiService) GetApimInstanceUpstream(ctx _context.Context, orgId string, envId string, envApiId string, upstreamId string) DefaultApiApiGetApimInstanceUpstreamRequest { + return DefaultApiApiGetApimInstanceUpstreamRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + upstreamId: upstreamId, + } +} + +/* + * Execute executes the request + * @return UpstreamDetails + */ +func (a *DefaultApiService) GetApimInstanceUpstreamExecute(r DefaultApiApiGetApimInstanceUpstreamRequest) (UpstreamDetails, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue UpstreamDetails + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApimInstanceUpstream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"upstreamId"+"}", _neturl.PathEscape(parameterToString(r.upstreamId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse404 + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiGetApimInstanceUpstreamsRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string +} + + +func (r DefaultApiApiGetApimInstanceUpstreamsRequest) Execute() (UpstreamCollection, *_nethttp.Response, error) { + return r.ApiService.GetApimInstanceUpstreamsExecute(r) +} + +/* + * GetApimInstanceUpstreams Retrieve all upstreams of a given API Manager instance + * Retrieves all upstreams for a given API Manager instance in a given environment. Connected App requires the scope "View APIs Configuration" + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api id specific to a given environment + * @return DefaultApiApiGetApimInstanceUpstreamsRequest + */ +func (a *DefaultApiService) GetApimInstanceUpstreams(ctx _context.Context, orgId string, envId string, envApiId string) DefaultApiApiGetApimInstanceUpstreamsRequest { + return DefaultApiApiGetApimInstanceUpstreamsRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + } +} + +/* + * Execute executes the request + * @return UpstreamCollection + */ +func (a *DefaultApiService) GetApimInstanceUpstreamsExecute(r DefaultApiApiGetApimInstanceUpstreamsRequest) (UpstreamCollection, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue UpstreamCollection + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApimInstanceUpstreams") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse404 + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiPatchApimInstanceUpstreamRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string + upstreamId string + upstreamPatchBody *UpstreamPatchBody +} + +func (r DefaultApiApiPatchApimInstanceUpstreamRequest) UpstreamPatchBody(upstreamPatchBody UpstreamPatchBody) DefaultApiApiPatchApimInstanceUpstreamRequest { + r.upstreamPatchBody = &upstreamPatchBody + return r +} + +func (r DefaultApiApiPatchApimInstanceUpstreamRequest) Execute() (Upstream, *_nethttp.Response, error) { + return r.ApiService.PatchApimInstanceUpstreamExecute(r) +} + +/* + * PatchApimInstanceUpstream Update a specific upstream in a given API Manager instance + * Update a specific upstream in a given API Manager instance in a given environment. Connected App requires the scope "Manage APIs Configuration" + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api id specific to a given environment + * @param upstreamId The upstream id + * @return DefaultApiApiPatchApimInstanceUpstreamRequest + */ +func (a *DefaultApiService) PatchApimInstanceUpstream(ctx _context.Context, orgId string, envId string, envApiId string, upstreamId string) DefaultApiApiPatchApimInstanceUpstreamRequest { + return DefaultApiApiPatchApimInstanceUpstreamRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + upstreamId: upstreamId, + } +} + +/* + * Execute executes the request + * @return Upstream + */ +func (a *DefaultApiService) PatchApimInstanceUpstreamExecute(r DefaultApiApiPatchApimInstanceUpstreamRequest) (Upstream, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Upstream + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PatchApimInstanceUpstream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"upstreamId"+"}", _neturl.PathEscape(parameterToString(r.upstreamId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upstreamPatchBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorsResponse + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiPostApimInstanceUpstreamRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + envApiId string + upstreamPostBody *UpstreamPostBody +} + +func (r DefaultApiApiPostApimInstanceUpstreamRequest) UpstreamPostBody(upstreamPostBody UpstreamPostBody) DefaultApiApiPostApimInstanceUpstreamRequest { + r.upstreamPostBody = &upstreamPostBody + return r +} + +func (r DefaultApiApiPostApimInstanceUpstreamRequest) Execute() (UpstreamDetails, *_nethttp.Response, error) { + return r.ApiService.PostApimInstanceUpstreamExecute(r) +} + +/* + * PostApimInstanceUpstream Creates an upstream for a given API Manager instance + * Creates an upstream for a given API Manager instance in a given environment. Connected App requires the scope "Manage APIs Configuration" + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param envApiId The api id specific to a given environment + * @return DefaultApiApiPostApimInstanceUpstreamRequest + */ +func (a *DefaultApiService) PostApimInstanceUpstream(ctx _context.Context, orgId string, envId string, envApiId string) DefaultApiApiPostApimInstanceUpstreamRequest { + return DefaultApiApiPostApimInstanceUpstreamRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + envApiId: envApiId, + } +} + +/* + * Execute executes the request + * @return UpstreamDetails + */ +func (a *DefaultApiService) PostApimInstanceUpstreamExecute(r DefaultApiApiPostApimInstanceUpstreamRequest) (UpstreamDetails, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue UpstreamDetails + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PostApimInstanceUpstream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envApiId"+"}", _neturl.PathEscape(parameterToString(r.envApiId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upstreamPostBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorsResponse + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/apim_upstream/client.go b/apim_upstream/client.go new file mode 100644 index 0000000..54b0827 --- /dev/null +++ b/apim_upstream/client.go @@ -0,0 +1,535 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the API Manager Upstream API API v1.0.0 +// 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 + + DefaultApi *DefaultApiService +} + +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.DefaultApi = (*DefaultApiService)(&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), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +// 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, + formFileName string, + 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 strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && 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(formFileName, 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() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // 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 + } + + // 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 len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + 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 fp, ok := body.(**os.File); ok { + _, err = bodyBuf.ReadFrom(*fp) + } 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) { + err = 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 + } else { + 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) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/apim_upstream/configuration.go b/apim_upstream/configuration.go new file mode 100644 index 0000000..955bbaa --- /dev/null +++ b/apim_upstream/configuration.go @@ -0,0 +1,238 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// 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 an 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") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + // 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") +) + +// 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 +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +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 +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://anypoint.mulesoft.com/apimanager/api/v1", + Description: "Anypoint Cloudhub", + }, + { + URL: "https://eu1.anypoint.mulesoft.com/apimanager/api/v1", + Description: "Anypoint Cloudhub EU", + }, + { + URL: "https://gov.anypoint.mulesoft.com/apimanager/api/v1", + Description: "Anypoint Cloudhub GOV", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/apim_upstream/docs/Audit.md b/apim_upstream/docs/Audit.md new file mode 100644 index 0000000..835dca2 --- /dev/null +++ b/apim_upstream/docs/Audit.md @@ -0,0 +1,82 @@ +# Audit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | Pointer to [**AuditCreated**](AuditCreated.md) | | [optional] +**Updated** | Pointer to [**AuditCreated**](AuditCreated.md) | | [optional] + +## Methods + +### NewAudit + +`func NewAudit() *Audit` + +NewAudit instantiates a new Audit 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 + +### NewAuditWithDefaults + +`func NewAuditWithDefaults() *Audit` + +NewAuditWithDefaults instantiates a new Audit 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 + +### GetCreated + +`func (o *Audit) GetCreated() AuditCreated` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Audit) GetCreatedOk() (*AuditCreated, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Audit) SetCreated(v AuditCreated)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Audit) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetUpdated + +`func (o *Audit) GetUpdated() AuditCreated` + +GetUpdated returns the Updated field if non-nil, zero value otherwise. + +### GetUpdatedOk + +`func (o *Audit) GetUpdatedOk() (*AuditCreated, bool)` + +GetUpdatedOk returns a tuple with the Updated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdated + +`func (o *Audit) SetUpdated(v AuditCreated)` + +SetUpdated sets Updated field to given value. + +### HasUpdated + +`func (o *Audit) HasUpdated() bool` + +HasUpdated returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/AuditCreated.md b/apim_upstream/docs/AuditCreated.md new file mode 100644 index 0000000..9af0dec --- /dev/null +++ b/apim_upstream/docs/AuditCreated.md @@ -0,0 +1,56 @@ +# AuditCreated + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewAuditCreated + +`func NewAuditCreated() *AuditCreated` + +NewAuditCreated instantiates a new AuditCreated 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 + +### NewAuditCreatedWithDefaults + +`func NewAuditCreatedWithDefaults() *AuditCreated` + +NewAuditCreatedWithDefaults instantiates a new AuditCreated 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 + +### GetDate + +`func (o *AuditCreated) GetDate() time.Time` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *AuditCreated) GetDateOk() (*time.Time, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDate + +`func (o *AuditCreated) SetDate(v time.Time)` + +SetDate sets Date field to given value. + +### HasDate + +`func (o *AuditCreated) HasDate() bool` + +HasDate returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/DefaultApi.md b/apim_upstream/docs/DefaultApi.md new file mode 100644 index 0000000..df5eb0f --- /dev/null +++ b/apim_upstream/docs/DefaultApi.md @@ -0,0 +1,404 @@ +# \DefaultApi + +All URIs are relative to *https://anypoint.mulesoft.com/apimanager/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApimInstanceUpstream**](DefaultApi.md#DeleteApimInstanceUpstream) | **Delete** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId} | Delete a specific Upstream of the given API Manager Instance +[**GetApimInstanceUpstream**](DefaultApi.md#GetApimInstanceUpstream) | **Get** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId} | Retrieve a specific upstream for a given API Manager instance +[**GetApimInstanceUpstreams**](DefaultApi.md#GetApimInstanceUpstreams) | **Get** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams | Retrieve all upstreams of a given API Manager instance +[**PatchApimInstanceUpstream**](DefaultApi.md#PatchApimInstanceUpstream) | **Patch** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId} | Update a specific upstream in a given API Manager instance +[**PostApimInstanceUpstream**](DefaultApi.md#PostApimInstanceUpstream) | **Post** /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams | Creates an upstream for a given API Manager instance + + + +## DeleteApimInstanceUpstream + +> DeleteApimInstanceUpstream(ctx, orgId, envId, envApiId, upstreamId).Execute() + +Delete a specific Upstream of the given API Manager Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api id specific to a given environment + upstreamId := "upstreamId_example" // string | The upstream id + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.DeleteApimInstanceUpstream(context.Background(), orgId, envId, envApiId, upstreamId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteApimInstanceUpstream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api id specific to a given environment | +**upstreamId** | **string** | The upstream id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApimInstanceUpstreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + +### Return type + + (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## GetApimInstanceUpstream + +> UpstreamDetails GetApimInstanceUpstream(ctx, orgId, envId, envApiId, upstreamId).Execute() + +Retrieve a specific upstream for a given API Manager instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api id specific to a given environment + upstreamId := "upstreamId_example" // string | The upstream id + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetApimInstanceUpstream(context.Background(), orgId, envId, envApiId, upstreamId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApimInstanceUpstream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetApimInstanceUpstream`: UpstreamDetails + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApimInstanceUpstream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api id specific to a given environment | +**upstreamId** | **string** | The upstream id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetApimInstanceUpstreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + +### Return type + +[**UpstreamDetails**](UpstreamDetails.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## GetApimInstanceUpstreams + +> UpstreamCollection GetApimInstanceUpstreams(ctx, orgId, envId, envApiId).Execute() + +Retrieve all upstreams of a given API Manager instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api id specific to a given environment + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetApimInstanceUpstreams(context.Background(), orgId, envId, envApiId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApimInstanceUpstreams``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetApimInstanceUpstreams`: UpstreamCollection + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApimInstanceUpstreams`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api id specific to a given environment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetApimInstanceUpstreamsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**UpstreamCollection**](UpstreamCollection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## PatchApimInstanceUpstream + +> Upstream PatchApimInstanceUpstream(ctx, orgId, envId, envApiId, upstreamId).UpstreamPatchBody(upstreamPatchBody).Execute() + +Update a specific upstream in a given API Manager instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api id specific to a given environment + upstreamId := "upstreamId_example" // string | The upstream id + upstreamPatchBody := *openapiclient.NewUpstreamPatchBody() // UpstreamPatchBody | Patch API Manager Instance Upstream Body (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.PatchApimInstanceUpstream(context.Background(), orgId, envId, envApiId, upstreamId).UpstreamPatchBody(upstreamPatchBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PatchApimInstanceUpstream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchApimInstanceUpstream`: Upstream + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.PatchApimInstanceUpstream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api id specific to a given environment | +**upstreamId** | **string** | The upstream id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchApimInstanceUpstreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + **upstreamPatchBody** | [**UpstreamPatchBody**](UpstreamPatchBody.md) | Patch API Manager Instance Upstream Body | + +### Return type + +[**Upstream**](Upstream.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + +## PostApimInstanceUpstream + +> UpstreamDetails PostApimInstanceUpstream(ctx, orgId, envId, envApiId).UpstreamPostBody(upstreamPostBody).Execute() + +Creates an upstream for a given API Manager instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + envApiId := "envApiId_example" // string | The api id specific to a given environment + upstreamPostBody := *openapiclient.NewUpstreamPostBody() // UpstreamPostBody | Post API Manager Instance Upstream Body (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.PostApimInstanceUpstream(context.Background(), orgId, envId, envApiId).UpstreamPostBody(upstreamPostBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PostApimInstanceUpstream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostApimInstanceUpstream`: UpstreamDetails + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.PostApimInstanceUpstream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**envApiId** | **string** | The api id specific to a given environment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPostApimInstanceUpstreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **upstreamPostBody** | [**UpstreamPostBody**](UpstreamPostBody.md) | Post API Manager Instance Upstream Body | + +### Return type + +[**UpstreamDetails**](UpstreamDetails.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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/apim_upstream/docs/ErrorsResponse.md b/apim_upstream/docs/ErrorsResponse.md new file mode 100644 index 0000000..ef8a2f5 --- /dev/null +++ b/apim_upstream/docs/ErrorsResponse.md @@ -0,0 +1,56 @@ +# ErrorsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | Pointer to [**[]ErrorsResponseErrors**](ErrorsResponseErrors.md) | | [optional] + +## Methods + +### NewErrorsResponse + +`func NewErrorsResponse() *ErrorsResponse` + +NewErrorsResponse instantiates a new ErrorsResponse 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 + +### NewErrorsResponseWithDefaults + +`func NewErrorsResponseWithDefaults() *ErrorsResponse` + +NewErrorsResponseWithDefaults instantiates a new ErrorsResponse 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 + +### GetErrors + +`func (o *ErrorsResponse) GetErrors() []ErrorsResponseErrors` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *ErrorsResponse) GetErrorsOk() (*[]ErrorsResponseErrors, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *ErrorsResponse) SetErrors(v []ErrorsResponseErrors)` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *ErrorsResponse) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/ErrorsResponseErrors.md b/apim_upstream/docs/ErrorsResponseErrors.md new file mode 100644 index 0000000..d5baab7 --- /dev/null +++ b/apim_upstream/docs/ErrorsResponseErrors.md @@ -0,0 +1,186 @@ +# ErrorsResponseErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] +**DataPath** | Pointer to **string** | | [optional] +**Keyword** | Pointer to **string** | | [optional] +**Schema** | Pointer to **string** | | [optional] +**Data** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewErrorsResponseErrors + +`func NewErrorsResponseErrors() *ErrorsResponseErrors` + +NewErrorsResponseErrors instantiates a new ErrorsResponseErrors 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 + +### NewErrorsResponseErrorsWithDefaults + +`func NewErrorsResponseErrorsWithDefaults() *ErrorsResponseErrors` + +NewErrorsResponseErrorsWithDefaults instantiates a new ErrorsResponseErrors 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 + +### GetType + +`func (o *ErrorsResponseErrors) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ErrorsResponseErrors) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ErrorsResponseErrors) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ErrorsResponseErrors) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDataPath + +`func (o *ErrorsResponseErrors) GetDataPath() string` + +GetDataPath returns the DataPath field if non-nil, zero value otherwise. + +### GetDataPathOk + +`func (o *ErrorsResponseErrors) GetDataPathOk() (*string, bool)` + +GetDataPathOk returns a tuple with the DataPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataPath + +`func (o *ErrorsResponseErrors) SetDataPath(v string)` + +SetDataPath sets DataPath field to given value. + +### HasDataPath + +`func (o *ErrorsResponseErrors) HasDataPath() bool` + +HasDataPath returns a boolean if a field has been set. + +### GetKeyword + +`func (o *ErrorsResponseErrors) GetKeyword() string` + +GetKeyword returns the Keyword field if non-nil, zero value otherwise. + +### GetKeywordOk + +`func (o *ErrorsResponseErrors) GetKeywordOk() (*string, bool)` + +GetKeywordOk returns a tuple with the Keyword field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyword + +`func (o *ErrorsResponseErrors) SetKeyword(v string)` + +SetKeyword sets Keyword field to given value. + +### HasKeyword + +`func (o *ErrorsResponseErrors) HasKeyword() bool` + +HasKeyword returns a boolean if a field has been set. + +### GetSchema + +`func (o *ErrorsResponseErrors) GetSchema() string` + +GetSchema returns the Schema field if non-nil, zero value otherwise. + +### GetSchemaOk + +`func (o *ErrorsResponseErrors) GetSchemaOk() (*string, bool)` + +GetSchemaOk returns a tuple with the Schema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchema + +`func (o *ErrorsResponseErrors) SetSchema(v string)` + +SetSchema sets Schema field to given value. + +### HasSchema + +`func (o *ErrorsResponseErrors) HasSchema() bool` + +HasSchema returns a boolean if a field has been set. + +### GetData + +`func (o *ErrorsResponseErrors) GetData() string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ErrorsResponseErrors) GetDataOk() (*string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ErrorsResponseErrors) SetData(v string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ErrorsResponseErrors) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorsResponseErrors) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorsResponseErrors) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorsResponseErrors) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ErrorsResponseErrors) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/InlineResponse404.md b/apim_upstream/docs/InlineResponse404.md new file mode 100644 index 0000000..1a3ff91 --- /dev/null +++ b/apim_upstream/docs/InlineResponse404.md @@ -0,0 +1,82 @@ +# InlineResponse404 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewInlineResponse404 + +`func NewInlineResponse404() *InlineResponse404` + +NewInlineResponse404 instantiates a new InlineResponse404 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 + +### NewInlineResponse404WithDefaults + +`func NewInlineResponse404WithDefaults() *InlineResponse404` + +NewInlineResponse404WithDefaults instantiates a new InlineResponse404 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 + +### GetName + +`func (o *InlineResponse404) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *InlineResponse404) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *InlineResponse404) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *InlineResponse404) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMessage + +`func (o *InlineResponse404) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *InlineResponse404) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *InlineResponse404) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *InlineResponse404) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/Upstream.md b/apim_upstream/docs/Upstream.md new file mode 100644 index 0000000..993c8aa --- /dev/null +++ b/apim_upstream/docs/Upstream.md @@ -0,0 +1,134 @@ +# Upstream + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Label** | Pointer to **string** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**TlsContext** | Pointer to [**UpstreamTlsContext**](UpstreamTlsContext.md) | | [optional] + +## Methods + +### NewUpstream + +`func NewUpstream() *Upstream` + +NewUpstream instantiates a new Upstream 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 + +### NewUpstreamWithDefaults + +`func NewUpstreamWithDefaults() *Upstream` + +NewUpstreamWithDefaults instantiates a new Upstream 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 + +### GetId + +`func (o *Upstream) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Upstream) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Upstream) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Upstream) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLabel + +`func (o *Upstream) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *Upstream) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *Upstream) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *Upstream) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetUri + +`func (o *Upstream) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *Upstream) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *Upstream) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *Upstream) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetTlsContext + +`func (o *Upstream) GetTlsContext() UpstreamTlsContext` + +GetTlsContext returns the TlsContext field if non-nil, zero value otherwise. + +### GetTlsContextOk + +`func (o *Upstream) GetTlsContextOk() (*UpstreamTlsContext, bool)` + +GetTlsContextOk returns a tuple with the TlsContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContext + +`func (o *Upstream) SetTlsContext(v UpstreamTlsContext)` + +SetTlsContext sets TlsContext field to given value. + +### HasTlsContext + +`func (o *Upstream) HasTlsContext() bool` + +HasTlsContext returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/UpstreamCollection.md b/apim_upstream/docs/UpstreamCollection.md new file mode 100644 index 0000000..483bdb5 --- /dev/null +++ b/apim_upstream/docs/UpstreamCollection.md @@ -0,0 +1,82 @@ +# UpstreamCollection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **int32** | | [optional] +**Upstreams** | Pointer to [**[]UpstreamDetails**](UpstreamDetails.md) | | [optional] + +## Methods + +### NewUpstreamCollection + +`func NewUpstreamCollection() *UpstreamCollection` + +NewUpstreamCollection instantiates a new UpstreamCollection 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 + +### NewUpstreamCollectionWithDefaults + +`func NewUpstreamCollectionWithDefaults() *UpstreamCollection` + +NewUpstreamCollectionWithDefaults instantiates a new UpstreamCollection 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 + +### GetTotal + +`func (o *UpstreamCollection) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *UpstreamCollection) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *UpstreamCollection) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *UpstreamCollection) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetUpstreams + +`func (o *UpstreamCollection) GetUpstreams() []UpstreamDetails` + +GetUpstreams returns the Upstreams field if non-nil, zero value otherwise. + +### GetUpstreamsOk + +`func (o *UpstreamCollection) GetUpstreamsOk() (*[]UpstreamDetails, bool)` + +GetUpstreamsOk returns a tuple with the Upstreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreams + +`func (o *UpstreamCollection) SetUpstreams(v []UpstreamDetails)` + +SetUpstreams sets Upstreams field to given value. + +### HasUpstreams + +`func (o *UpstreamCollection) HasUpstreams() bool` + +HasUpstreams returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/UpstreamDetails.md b/apim_upstream/docs/UpstreamDetails.md new file mode 100644 index 0000000..aa7c51f --- /dev/null +++ b/apim_upstream/docs/UpstreamDetails.md @@ -0,0 +1,170 @@ +# UpstreamDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**Id** | Pointer to **string** | | [optional] +**Label** | Pointer to **string** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**TlsContext** | Pointer to [**NullableUpstreamDetailsTlsContext**](UpstreamDetailsTlsContext.md) | | [optional] + +## Methods + +### NewUpstreamDetails + +`func NewUpstreamDetails() *UpstreamDetails` + +NewUpstreamDetails instantiates a new UpstreamDetails 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 + +### NewUpstreamDetailsWithDefaults + +`func NewUpstreamDetailsWithDefaults() *UpstreamDetails` + +NewUpstreamDetailsWithDefaults instantiates a new UpstreamDetails 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 + +### GetAudit + +`func (o *UpstreamDetails) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *UpstreamDetails) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *UpstreamDetails) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *UpstreamDetails) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetId + +`func (o *UpstreamDetails) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UpstreamDetails) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UpstreamDetails) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *UpstreamDetails) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLabel + +`func (o *UpstreamDetails) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *UpstreamDetails) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *UpstreamDetails) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *UpstreamDetails) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetUri + +`func (o *UpstreamDetails) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *UpstreamDetails) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *UpstreamDetails) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *UpstreamDetails) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetTlsContext + +`func (o *UpstreamDetails) GetTlsContext() UpstreamDetailsTlsContext` + +GetTlsContext returns the TlsContext field if non-nil, zero value otherwise. + +### GetTlsContextOk + +`func (o *UpstreamDetails) GetTlsContextOk() (*UpstreamDetailsTlsContext, bool)` + +GetTlsContextOk returns a tuple with the TlsContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContext + +`func (o *UpstreamDetails) SetTlsContext(v UpstreamDetailsTlsContext)` + +SetTlsContext sets TlsContext field to given value. + +### HasTlsContext + +`func (o *UpstreamDetails) HasTlsContext() bool` + +HasTlsContext returns a boolean if a field has been set. + +### SetTlsContextNil + +`func (o *UpstreamDetails) SetTlsContextNil(b bool)` + + SetTlsContextNil sets the value for TlsContext to be an explicit nil + +### UnsetTlsContext +`func (o *UpstreamDetails) UnsetTlsContext()` + +UnsetTlsContext ensures that no value is present for TlsContext, not even an explicit nil + +[[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/apim_upstream/docs/UpstreamDetailsTlsContext.md b/apim_upstream/docs/UpstreamDetailsTlsContext.md new file mode 100644 index 0000000..15e97a5 --- /dev/null +++ b/apim_upstream/docs/UpstreamDetailsTlsContext.md @@ -0,0 +1,160 @@ +# UpstreamDetailsTlsContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] +**SecretGroupId** | Pointer to **string** | | [optional] +**TlsContextId** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Authorized** | Pointer to **bool** | | [optional] + +## Methods + +### NewUpstreamDetailsTlsContext + +`func NewUpstreamDetailsTlsContext() *UpstreamDetailsTlsContext` + +NewUpstreamDetailsTlsContext instantiates a new UpstreamDetailsTlsContext 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 + +### NewUpstreamDetailsTlsContextWithDefaults + +`func NewUpstreamDetailsTlsContextWithDefaults() *UpstreamDetailsTlsContext` + +NewUpstreamDetailsTlsContextWithDefaults instantiates a new UpstreamDetailsTlsContext 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 + +### GetAudit + +`func (o *UpstreamDetailsTlsContext) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *UpstreamDetailsTlsContext) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *UpstreamDetailsTlsContext) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *UpstreamDetailsTlsContext) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + +### GetSecretGroupId + +`func (o *UpstreamDetailsTlsContext) GetSecretGroupId() string` + +GetSecretGroupId returns the SecretGroupId field if non-nil, zero value otherwise. + +### GetSecretGroupIdOk + +`func (o *UpstreamDetailsTlsContext) GetSecretGroupIdOk() (*string, bool)` + +GetSecretGroupIdOk returns a tuple with the SecretGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretGroupId + +`func (o *UpstreamDetailsTlsContext) SetSecretGroupId(v string)` + +SetSecretGroupId sets SecretGroupId field to given value. + +### HasSecretGroupId + +`func (o *UpstreamDetailsTlsContext) HasSecretGroupId() bool` + +HasSecretGroupId returns a boolean if a field has been set. + +### GetTlsContextId + +`func (o *UpstreamDetailsTlsContext) GetTlsContextId() string` + +GetTlsContextId returns the TlsContextId field if non-nil, zero value otherwise. + +### GetTlsContextIdOk + +`func (o *UpstreamDetailsTlsContext) GetTlsContextIdOk() (*string, bool)` + +GetTlsContextIdOk returns a tuple with the TlsContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContextId + +`func (o *UpstreamDetailsTlsContext) SetTlsContextId(v string)` + +SetTlsContextId sets TlsContextId field to given value. + +### HasTlsContextId + +`func (o *UpstreamDetailsTlsContext) HasTlsContextId() bool` + +HasTlsContextId returns a boolean if a field has been set. + +### GetName + +`func (o *UpstreamDetailsTlsContext) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpstreamDetailsTlsContext) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpstreamDetailsTlsContext) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *UpstreamDetailsTlsContext) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAuthorized + +`func (o *UpstreamDetailsTlsContext) GetAuthorized() bool` + +GetAuthorized returns the Authorized field if non-nil, zero value otherwise. + +### GetAuthorizedOk + +`func (o *UpstreamDetailsTlsContext) GetAuthorizedOk() (*bool, bool)` + +GetAuthorizedOk returns a tuple with the Authorized field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorized + +`func (o *UpstreamDetailsTlsContext) SetAuthorized(v bool)` + +SetAuthorized sets Authorized field to given value. + +### HasAuthorized + +`func (o *UpstreamDetailsTlsContext) HasAuthorized() bool` + +HasAuthorized returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/UpstreamPatchBody.md b/apim_upstream/docs/UpstreamPatchBody.md new file mode 100644 index 0000000..f5224d9 --- /dev/null +++ b/apim_upstream/docs/UpstreamPatchBody.md @@ -0,0 +1,118 @@ +# UpstreamPatchBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Label** | Pointer to **string** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**TlsContext** | Pointer to [**NullableUpstreamPostBodyTlsContext**](UpstreamPostBodyTlsContext.md) | | [optional] + +## Methods + +### NewUpstreamPatchBody + +`func NewUpstreamPatchBody() *UpstreamPatchBody` + +NewUpstreamPatchBody instantiates a new UpstreamPatchBody 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 + +### NewUpstreamPatchBodyWithDefaults + +`func NewUpstreamPatchBodyWithDefaults() *UpstreamPatchBody` + +NewUpstreamPatchBodyWithDefaults instantiates a new UpstreamPatchBody 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 + +### GetLabel + +`func (o *UpstreamPatchBody) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *UpstreamPatchBody) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *UpstreamPatchBody) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *UpstreamPatchBody) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetUri + +`func (o *UpstreamPatchBody) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *UpstreamPatchBody) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *UpstreamPatchBody) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *UpstreamPatchBody) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetTlsContext + +`func (o *UpstreamPatchBody) GetTlsContext() UpstreamPostBodyTlsContext` + +GetTlsContext returns the TlsContext field if non-nil, zero value otherwise. + +### GetTlsContextOk + +`func (o *UpstreamPatchBody) GetTlsContextOk() (*UpstreamPostBodyTlsContext, bool)` + +GetTlsContextOk returns a tuple with the TlsContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContext + +`func (o *UpstreamPatchBody) SetTlsContext(v UpstreamPostBodyTlsContext)` + +SetTlsContext sets TlsContext field to given value. + +### HasTlsContext + +`func (o *UpstreamPatchBody) HasTlsContext() bool` + +HasTlsContext returns a boolean if a field has been set. + +### SetTlsContextNil + +`func (o *UpstreamPatchBody) SetTlsContextNil(b bool)` + + SetTlsContextNil sets the value for TlsContext to be an explicit nil + +### UnsetTlsContext +`func (o *UpstreamPatchBody) UnsetTlsContext()` + +UnsetTlsContext ensures that no value is present for TlsContext, not even an explicit nil + +[[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/apim_upstream/docs/UpstreamPostBody.md b/apim_upstream/docs/UpstreamPostBody.md new file mode 100644 index 0000000..6b7e93f --- /dev/null +++ b/apim_upstream/docs/UpstreamPostBody.md @@ -0,0 +1,118 @@ +# UpstreamPostBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Label** | Pointer to **string** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**TlsContext** | Pointer to [**NullableUpstreamPostBodyTlsContext**](UpstreamPostBodyTlsContext.md) | | [optional] + +## Methods + +### NewUpstreamPostBody + +`func NewUpstreamPostBody() *UpstreamPostBody` + +NewUpstreamPostBody instantiates a new UpstreamPostBody 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 + +### NewUpstreamPostBodyWithDefaults + +`func NewUpstreamPostBodyWithDefaults() *UpstreamPostBody` + +NewUpstreamPostBodyWithDefaults instantiates a new UpstreamPostBody 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 + +### GetLabel + +`func (o *UpstreamPostBody) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *UpstreamPostBody) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *UpstreamPostBody) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *UpstreamPostBody) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetUri + +`func (o *UpstreamPostBody) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *UpstreamPostBody) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *UpstreamPostBody) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *UpstreamPostBody) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetTlsContext + +`func (o *UpstreamPostBody) GetTlsContext() UpstreamPostBodyTlsContext` + +GetTlsContext returns the TlsContext field if non-nil, zero value otherwise. + +### GetTlsContextOk + +`func (o *UpstreamPostBody) GetTlsContextOk() (*UpstreamPostBodyTlsContext, bool)` + +GetTlsContextOk returns a tuple with the TlsContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContext + +`func (o *UpstreamPostBody) SetTlsContext(v UpstreamPostBodyTlsContext)` + +SetTlsContext sets TlsContext field to given value. + +### HasTlsContext + +`func (o *UpstreamPostBody) HasTlsContext() bool` + +HasTlsContext returns a boolean if a field has been set. + +### SetTlsContextNil + +`func (o *UpstreamPostBody) SetTlsContextNil(b bool)` + + SetTlsContextNil sets the value for TlsContext to be an explicit nil + +### UnsetTlsContext +`func (o *UpstreamPostBody) UnsetTlsContext()` + +UnsetTlsContext ensures that no value is present for TlsContext, not even an explicit nil + +[[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/apim_upstream/docs/UpstreamPostBodyTlsContext.md b/apim_upstream/docs/UpstreamPostBodyTlsContext.md new file mode 100644 index 0000000..3938e80 --- /dev/null +++ b/apim_upstream/docs/UpstreamPostBodyTlsContext.md @@ -0,0 +1,82 @@ +# UpstreamPostBodyTlsContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SecretGroupId** | Pointer to **string** | | [optional] +**TlsContextId** | Pointer to **string** | | [optional] + +## Methods + +### NewUpstreamPostBodyTlsContext + +`func NewUpstreamPostBodyTlsContext() *UpstreamPostBodyTlsContext` + +NewUpstreamPostBodyTlsContext instantiates a new UpstreamPostBodyTlsContext 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 + +### NewUpstreamPostBodyTlsContextWithDefaults + +`func NewUpstreamPostBodyTlsContextWithDefaults() *UpstreamPostBodyTlsContext` + +NewUpstreamPostBodyTlsContextWithDefaults instantiates a new UpstreamPostBodyTlsContext 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 + +### GetSecretGroupId + +`func (o *UpstreamPostBodyTlsContext) GetSecretGroupId() string` + +GetSecretGroupId returns the SecretGroupId field if non-nil, zero value otherwise. + +### GetSecretGroupIdOk + +`func (o *UpstreamPostBodyTlsContext) GetSecretGroupIdOk() (*string, bool)` + +GetSecretGroupIdOk returns a tuple with the SecretGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretGroupId + +`func (o *UpstreamPostBodyTlsContext) SetSecretGroupId(v string)` + +SetSecretGroupId sets SecretGroupId field to given value. + +### HasSecretGroupId + +`func (o *UpstreamPostBodyTlsContext) HasSecretGroupId() bool` + +HasSecretGroupId returns a boolean if a field has been set. + +### GetTlsContextId + +`func (o *UpstreamPostBodyTlsContext) GetTlsContextId() string` + +GetTlsContextId returns the TlsContextId field if non-nil, zero value otherwise. + +### GetTlsContextIdOk + +`func (o *UpstreamPostBodyTlsContext) GetTlsContextIdOk() (*string, bool)` + +GetTlsContextIdOk returns a tuple with the TlsContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContextId + +`func (o *UpstreamPostBodyTlsContext) SetTlsContextId(v string)` + +SetTlsContextId sets TlsContextId field to given value. + +### HasTlsContextId + +`func (o *UpstreamPostBodyTlsContext) HasTlsContextId() bool` + +HasTlsContextId returns a boolean if a field has been set. + + +[[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/apim_upstream/docs/UpstreamTlsContext.md b/apim_upstream/docs/UpstreamTlsContext.md new file mode 100644 index 0000000..956bbfe --- /dev/null +++ b/apim_upstream/docs/UpstreamTlsContext.md @@ -0,0 +1,108 @@ +# UpstreamTlsContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SecretGroupId** | Pointer to **string** | | [optional] +**TlsContextId** | Pointer to **string** | | [optional] +**Audit** | Pointer to [**Audit**](Audit.md) | | [optional] + +## Methods + +### NewUpstreamTlsContext + +`func NewUpstreamTlsContext() *UpstreamTlsContext` + +NewUpstreamTlsContext instantiates a new UpstreamTlsContext 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 + +### NewUpstreamTlsContextWithDefaults + +`func NewUpstreamTlsContextWithDefaults() *UpstreamTlsContext` + +NewUpstreamTlsContextWithDefaults instantiates a new UpstreamTlsContext 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 + +### GetSecretGroupId + +`func (o *UpstreamTlsContext) GetSecretGroupId() string` + +GetSecretGroupId returns the SecretGroupId field if non-nil, zero value otherwise. + +### GetSecretGroupIdOk + +`func (o *UpstreamTlsContext) GetSecretGroupIdOk() (*string, bool)` + +GetSecretGroupIdOk returns a tuple with the SecretGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretGroupId + +`func (o *UpstreamTlsContext) SetSecretGroupId(v string)` + +SetSecretGroupId sets SecretGroupId field to given value. + +### HasSecretGroupId + +`func (o *UpstreamTlsContext) HasSecretGroupId() bool` + +HasSecretGroupId returns a boolean if a field has been set. + +### GetTlsContextId + +`func (o *UpstreamTlsContext) GetTlsContextId() string` + +GetTlsContextId returns the TlsContextId field if non-nil, zero value otherwise. + +### GetTlsContextIdOk + +`func (o *UpstreamTlsContext) GetTlsContextIdOk() (*string, bool)` + +GetTlsContextIdOk returns a tuple with the TlsContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsContextId + +`func (o *UpstreamTlsContext) SetTlsContextId(v string)` + +SetTlsContextId sets TlsContextId field to given value. + +### HasTlsContextId + +`func (o *UpstreamTlsContext) HasTlsContextId() bool` + +HasTlsContextId returns a boolean if a field has been set. + +### GetAudit + +`func (o *UpstreamTlsContext) GetAudit() Audit` + +GetAudit returns the Audit field if non-nil, zero value otherwise. + +### GetAuditOk + +`func (o *UpstreamTlsContext) GetAuditOk() (*Audit, bool)` + +GetAuditOk returns a tuple with the Audit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudit + +`func (o *UpstreamTlsContext) SetAudit(v Audit)` + +SetAudit sets Audit field to given value. + +### HasAudit + +`func (o *UpstreamTlsContext) HasAudit() bool` + +HasAudit returns a boolean if a field has been set. + + +[[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/apim_upstream/git_push.sh b/apim_upstream/git_push.sh new file mode 100644 index 0000000..7b7f8fb --- /dev/null +++ b/apim_upstream/git_push.sh @@ -0,0 +1,58 @@ +#!/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 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="mulesoft-anypoint" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="anypoint-client-go" + 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://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${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://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/apim_upstream/go.mod b/apim_upstream/go.mod new file mode 100644 index 0000000..7993d66 --- /dev/null +++ b/apim_upstream/go.mod @@ -0,0 +1,7 @@ +module github.com/mulesoft-anypoint/anypoint-client-go/apim_upstream + +go 1.13 + +require ( + golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 +) diff --git a/apim_upstream/go.sum b/apim_upstream/go.sum new file mode 100644 index 0000000..734252e --- /dev/null +++ b/apim_upstream/go.sum @@ -0,0 +1,13 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/apim_upstream/model_audit.go b/apim_upstream/model_audit.go new file mode 100644 index 0000000..700d00d --- /dev/null +++ b/apim_upstream/model_audit.go @@ -0,0 +1,151 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// Audit struct for Audit +type Audit struct { + Created *AuditCreated `json:"created,omitempty"` + Updated *AuditCreated `json:"updated,omitempty"` +} + +// NewAudit instantiates a new Audit 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 NewAudit() *Audit { + this := Audit{} + return &this +} + +// NewAuditWithDefaults instantiates a new Audit 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 NewAuditWithDefaults() *Audit { + this := Audit{} + return &this +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Audit) GetCreated() AuditCreated { + if o == nil || o.Created == nil { + var ret AuditCreated + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Audit) GetCreatedOk() (*AuditCreated, bool) { + if o == nil || o.Created == nil { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Audit) HasCreated() bool { + if o != nil && o.Created != nil { + return true + } + + return false +} + +// SetCreated gets a reference to the given AuditCreated and assigns it to the Created field. +func (o *Audit) SetCreated(v AuditCreated) { + o.Created = &v +} + +// GetUpdated returns the Updated field value if set, zero value otherwise. +func (o *Audit) GetUpdated() AuditCreated { + if o == nil || o.Updated == nil { + var ret AuditCreated + return ret + } + return *o.Updated +} + +// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Audit) GetUpdatedOk() (*AuditCreated, bool) { + if o == nil || o.Updated == nil { + return nil, false + } + return o.Updated, true +} + +// HasUpdated returns a boolean if a field has been set. +func (o *Audit) HasUpdated() bool { + if o != nil && o.Updated != nil { + return true + } + + return false +} + +// SetUpdated gets a reference to the given AuditCreated and assigns it to the Updated field. +func (o *Audit) SetUpdated(v AuditCreated) { + o.Updated = &v +} + +func (o Audit) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Created != nil { + toSerialize["created"] = o.Created + } + if o.Updated != nil { + toSerialize["updated"] = o.Updated + } + return json.Marshal(toSerialize) +} + +type NullableAudit struct { + value *Audit + isSet bool +} + +func (v NullableAudit) Get() *Audit { + return v.value +} + +func (v *NullableAudit) Set(val *Audit) { + v.value = val + v.isSet = true +} + +func (v NullableAudit) IsSet() bool { + return v.isSet +} + +func (v *NullableAudit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAudit(val *Audit) *NullableAudit { + return &NullableAudit{value: val, isSet: true} +} + +func (v NullableAudit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAudit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_audit_created.go b/apim_upstream/model_audit_created.go new file mode 100644 index 0000000..fdb0603 --- /dev/null +++ b/apim_upstream/model_audit_created.go @@ -0,0 +1,116 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" + "time" +) + +// AuditCreated struct for AuditCreated +type AuditCreated struct { + Date *time.Time `json:"date,omitempty"` +} + +// NewAuditCreated instantiates a new AuditCreated 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 NewAuditCreated() *AuditCreated { + this := AuditCreated{} + return &this +} + +// NewAuditCreatedWithDefaults instantiates a new AuditCreated 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 NewAuditCreatedWithDefaults() *AuditCreated { + this := AuditCreated{} + return &this +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *AuditCreated) GetDate() time.Time { + if o == nil || o.Date == nil { + var ret time.Time + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuditCreated) GetDateOk() (*time.Time, bool) { + if o == nil || o.Date == nil { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *AuditCreated) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given time.Time and assigns it to the Date field. +func (o *AuditCreated) SetDate(v time.Time) { + o.Date = &v +} + +func (o AuditCreated) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Date != nil { + toSerialize["date"] = o.Date + } + return json.Marshal(toSerialize) +} + +type NullableAuditCreated struct { + value *AuditCreated + isSet bool +} + +func (v NullableAuditCreated) Get() *AuditCreated { + return v.value +} + +func (v *NullableAuditCreated) Set(val *AuditCreated) { + v.value = val + v.isSet = true +} + +func (v NullableAuditCreated) IsSet() bool { + return v.isSet +} + +func (v *NullableAuditCreated) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuditCreated(val *AuditCreated) *NullableAuditCreated { + return &NullableAuditCreated{value: val, isSet: true} +} + +func (v NullableAuditCreated) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuditCreated) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_errors_response.go b/apim_upstream/model_errors_response.go new file mode 100644 index 0000000..84bc4c8 --- /dev/null +++ b/apim_upstream/model_errors_response.go @@ -0,0 +1,115 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// ErrorsResponse struct for ErrorsResponse +type ErrorsResponse struct { + Errors *[]ErrorsResponseErrors `json:"errors,omitempty"` +} + +// NewErrorsResponse instantiates a new ErrorsResponse 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 NewErrorsResponse() *ErrorsResponse { + this := ErrorsResponse{} + return &this +} + +// NewErrorsResponseWithDefaults instantiates a new ErrorsResponse 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 NewErrorsResponseWithDefaults() *ErrorsResponse { + this := ErrorsResponse{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ErrorsResponse) GetErrors() []ErrorsResponseErrors { + if o == nil || o.Errors == nil { + var ret []ErrorsResponseErrors + return ret + } + return *o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponse) GetErrorsOk() (*[]ErrorsResponseErrors, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *ErrorsResponse) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given []ErrorsResponseErrors and assigns it to the Errors field. +func (o *ErrorsResponse) SetErrors(v []ErrorsResponseErrors) { + o.Errors = &v +} + +func (o ErrorsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + return json.Marshal(toSerialize) +} + +type NullableErrorsResponse struct { + value *ErrorsResponse + isSet bool +} + +func (v NullableErrorsResponse) Get() *ErrorsResponse { + return v.value +} + +func (v *NullableErrorsResponse) Set(val *ErrorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorsResponse(val *ErrorsResponse) *NullableErrorsResponse { + return &NullableErrorsResponse{value: val, isSet: true} +} + +func (v NullableErrorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_errors_response_errors.go b/apim_upstream/model_errors_response_errors.go new file mode 100644 index 0000000..67df94c --- /dev/null +++ b/apim_upstream/model_errors_response_errors.go @@ -0,0 +1,295 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// ErrorsResponseErrors struct for ErrorsResponseErrors +type ErrorsResponseErrors struct { + Type *string `json:"type,omitempty"` + DataPath *string `json:"dataPath,omitempty"` + Keyword *string `json:"keyword,omitempty"` + Schema *string `json:"schema,omitempty"` + Data *string `json:"data,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewErrorsResponseErrors instantiates a new ErrorsResponseErrors 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 NewErrorsResponseErrors() *ErrorsResponseErrors { + this := ErrorsResponseErrors{} + return &this +} + +// NewErrorsResponseErrorsWithDefaults instantiates a new ErrorsResponseErrors 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 NewErrorsResponseErrorsWithDefaults() *ErrorsResponseErrors { + this := ErrorsResponseErrors{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ErrorsResponseErrors) SetType(v string) { + o.Type = &v +} + +// GetDataPath returns the DataPath field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetDataPath() string { + if o == nil || o.DataPath == nil { + var ret string + return ret + } + return *o.DataPath +} + +// GetDataPathOk returns a tuple with the DataPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetDataPathOk() (*string, bool) { + if o == nil || o.DataPath == nil { + return nil, false + } + return o.DataPath, true +} + +// HasDataPath returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasDataPath() bool { + if o != nil && o.DataPath != nil { + return true + } + + return false +} + +// SetDataPath gets a reference to the given string and assigns it to the DataPath field. +func (o *ErrorsResponseErrors) SetDataPath(v string) { + o.DataPath = &v +} + +// GetKeyword returns the Keyword field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetKeyword() string { + if o == nil || o.Keyword == nil { + var ret string + return ret + } + return *o.Keyword +} + +// GetKeywordOk returns a tuple with the Keyword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetKeywordOk() (*string, bool) { + if o == nil || o.Keyword == nil { + return nil, false + } + return o.Keyword, true +} + +// HasKeyword returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasKeyword() bool { + if o != nil && o.Keyword != nil { + return true + } + + return false +} + +// SetKeyword gets a reference to the given string and assigns it to the Keyword field. +func (o *ErrorsResponseErrors) SetKeyword(v string) { + o.Keyword = &v +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetSchema() string { + if o == nil || o.Schema == nil { + var ret string + return ret + } + return *o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetSchemaOk() (*string, bool) { + if o == nil || o.Schema == nil { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasSchema() bool { + if o != nil && o.Schema != nil { + return true + } + + return false +} + +// SetSchema gets a reference to the given string and assigns it to the Schema field. +func (o *ErrorsResponseErrors) SetSchema(v string) { + o.Schema = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetData() string { + if o == nil || o.Data == nil { + var ret string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetDataOk() (*string, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given string and assigns it to the Data field. +func (o *ErrorsResponseErrors) SetData(v string) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorsResponseErrors) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorsResponseErrors) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorsResponseErrors) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ErrorsResponseErrors) SetMessage(v string) { + o.Message = &v +} + +func (o ErrorsResponseErrors) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.DataPath != nil { + toSerialize["dataPath"] = o.DataPath + } + if o.Keyword != nil { + toSerialize["keyword"] = o.Keyword + } + if o.Schema != nil { + toSerialize["schema"] = o.Schema + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableErrorsResponseErrors struct { + value *ErrorsResponseErrors + isSet bool +} + +func (v NullableErrorsResponseErrors) Get() *ErrorsResponseErrors { + return v.value +} + +func (v *NullableErrorsResponseErrors) Set(val *ErrorsResponseErrors) { + v.value = val + v.isSet = true +} + +func (v NullableErrorsResponseErrors) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorsResponseErrors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorsResponseErrors(val *ErrorsResponseErrors) *NullableErrorsResponseErrors { + return &NullableErrorsResponseErrors{value: val, isSet: true} +} + +func (v NullableErrorsResponseErrors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorsResponseErrors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_inline_response_404.go b/apim_upstream/model_inline_response_404.go new file mode 100644 index 0000000..74bf9b0 --- /dev/null +++ b/apim_upstream/model_inline_response_404.go @@ -0,0 +1,151 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// InlineResponse404 struct for InlineResponse404 +type InlineResponse404 struct { + Name *string `json:"name,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewInlineResponse404 instantiates a new InlineResponse404 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 NewInlineResponse404() *InlineResponse404 { + this := InlineResponse404{} + return &this +} + +// NewInlineResponse404WithDefaults instantiates a new InlineResponse404 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 NewInlineResponse404WithDefaults() *InlineResponse404 { + this := InlineResponse404{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InlineResponse404) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse404) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InlineResponse404) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InlineResponse404) SetName(v string) { + o.Name = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *InlineResponse404) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse404) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *InlineResponse404) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *InlineResponse404) SetMessage(v string) { + o.Message = &v +} + +func (o InlineResponse404) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableInlineResponse404 struct { + value *InlineResponse404 + isSet bool +} + +func (v NullableInlineResponse404) Get() *InlineResponse404 { + return v.value +} + +func (v *NullableInlineResponse404) Set(val *InlineResponse404) { + v.value = val + v.isSet = true +} + +func (v NullableInlineResponse404) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineResponse404) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineResponse404(val *InlineResponse404) *NullableInlineResponse404 { + return &NullableInlineResponse404{value: val, isSet: true} +} + +func (v NullableInlineResponse404) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInlineResponse404) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream.go b/apim_upstream/model_upstream.go new file mode 100644 index 0000000..0c6980d --- /dev/null +++ b/apim_upstream/model_upstream.go @@ -0,0 +1,223 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// Upstream struct for Upstream +type Upstream struct { + Id *string `json:"id,omitempty"` + Label *string `json:"label,omitempty"` + Uri *string `json:"uri,omitempty"` + TlsContext *UpstreamTlsContext `json:"tlsContext,omitempty"` +} + +// NewUpstream instantiates a new Upstream 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 NewUpstream() *Upstream { + this := Upstream{} + return &this +} + +// NewUpstreamWithDefaults instantiates a new Upstream 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 NewUpstreamWithDefaults() *Upstream { + this := Upstream{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Upstream) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upstream) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Upstream) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Upstream) SetId(v string) { + o.Id = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *Upstream) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upstream) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *Upstream) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *Upstream) SetLabel(v string) { + o.Label = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *Upstream) GetUri() string { + if o == nil || o.Uri == nil { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upstream) GetUriOk() (*string, bool) { + if o == nil || o.Uri == nil { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *Upstream) HasUri() bool { + if o != nil && o.Uri != nil { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *Upstream) SetUri(v string) { + o.Uri = &v +} + +// GetTlsContext returns the TlsContext field value if set, zero value otherwise. +func (o *Upstream) GetTlsContext() UpstreamTlsContext { + if o == nil || o.TlsContext == nil { + var ret UpstreamTlsContext + return ret + } + return *o.TlsContext +} + +// GetTlsContextOk returns a tuple with the TlsContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upstream) GetTlsContextOk() (*UpstreamTlsContext, bool) { + if o == nil || o.TlsContext == nil { + return nil, false + } + return o.TlsContext, true +} + +// HasTlsContext returns a boolean if a field has been set. +func (o *Upstream) HasTlsContext() bool { + if o != nil && o.TlsContext != nil { + return true + } + + return false +} + +// SetTlsContext gets a reference to the given UpstreamTlsContext and assigns it to the TlsContext field. +func (o *Upstream) SetTlsContext(v UpstreamTlsContext) { + o.TlsContext = &v +} + +func (o Upstream) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Label != nil { + toSerialize["label"] = o.Label + } + if o.Uri != nil { + toSerialize["uri"] = o.Uri + } + if o.TlsContext != nil { + toSerialize["tlsContext"] = o.TlsContext + } + return json.Marshal(toSerialize) +} + +type NullableUpstream struct { + value *Upstream + isSet bool +} + +func (v NullableUpstream) Get() *Upstream { + return v.value +} + +func (v *NullableUpstream) Set(val *Upstream) { + v.value = val + v.isSet = true +} + +func (v NullableUpstream) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstream) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstream(val *Upstream) *NullableUpstream { + return &NullableUpstream{value: val, isSet: true} +} + +func (v NullableUpstream) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstream) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_collection.go b/apim_upstream/model_upstream_collection.go new file mode 100644 index 0000000..56bc7e2 --- /dev/null +++ b/apim_upstream/model_upstream_collection.go @@ -0,0 +1,151 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamCollection struct for UpstreamCollection +type UpstreamCollection struct { + Total *int32 `json:"total,omitempty"` + Upstreams *[]UpstreamDetails `json:"upstreams,omitempty"` +} + +// NewUpstreamCollection instantiates a new UpstreamCollection 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 NewUpstreamCollection() *UpstreamCollection { + this := UpstreamCollection{} + return &this +} + +// NewUpstreamCollectionWithDefaults instantiates a new UpstreamCollection 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 NewUpstreamCollectionWithDefaults() *UpstreamCollection { + this := UpstreamCollection{} + return &this +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *UpstreamCollection) GetTotal() int32 { + if o == nil || o.Total == nil { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamCollection) GetTotalOk() (*int32, bool) { + if o == nil || o.Total == nil { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *UpstreamCollection) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *UpstreamCollection) SetTotal(v int32) { + o.Total = &v +} + +// GetUpstreams returns the Upstreams field value if set, zero value otherwise. +func (o *UpstreamCollection) GetUpstreams() []UpstreamDetails { + if o == nil || o.Upstreams == nil { + var ret []UpstreamDetails + return ret + } + return *o.Upstreams +} + +// GetUpstreamsOk returns a tuple with the Upstreams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamCollection) GetUpstreamsOk() (*[]UpstreamDetails, bool) { + if o == nil || o.Upstreams == nil { + return nil, false + } + return o.Upstreams, true +} + +// HasUpstreams returns a boolean if a field has been set. +func (o *UpstreamCollection) HasUpstreams() bool { + if o != nil && o.Upstreams != nil { + return true + } + + return false +} + +// SetUpstreams gets a reference to the given []UpstreamDetails and assigns it to the Upstreams field. +func (o *UpstreamCollection) SetUpstreams(v []UpstreamDetails) { + o.Upstreams = &v +} + +func (o UpstreamCollection) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Total != nil { + toSerialize["total"] = o.Total + } + if o.Upstreams != nil { + toSerialize["upstreams"] = o.Upstreams + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamCollection struct { + value *UpstreamCollection + isSet bool +} + +func (v NullableUpstreamCollection) Get() *UpstreamCollection { + return v.value +} + +func (v *NullableUpstreamCollection) Set(val *UpstreamCollection) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamCollection(val *UpstreamCollection) *NullableUpstreamCollection { + return &NullableUpstreamCollection{value: val, isSet: true} +} + +func (v NullableUpstreamCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_details.go b/apim_upstream/model_upstream_details.go new file mode 100644 index 0000000..7711be6 --- /dev/null +++ b/apim_upstream/model_upstream_details.go @@ -0,0 +1,269 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamDetails struct for UpstreamDetails +type UpstreamDetails struct { + Audit *Audit `json:"audit,omitempty"` + Id *string `json:"id,omitempty"` + Label *string `json:"label,omitempty"` + Uri *string `json:"uri,omitempty"` + TlsContext NullableUpstreamDetailsTlsContext `json:"tlsContext,omitempty"` +} + +// NewUpstreamDetails instantiates a new UpstreamDetails 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 NewUpstreamDetails() *UpstreamDetails { + this := UpstreamDetails{} + return &this +} + +// NewUpstreamDetailsWithDefaults instantiates a new UpstreamDetails 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 NewUpstreamDetailsWithDefaults() *UpstreamDetails { + this := UpstreamDetails{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *UpstreamDetails) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetails) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *UpstreamDetails) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *UpstreamDetails) SetAudit(v Audit) { + o.Audit = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpstreamDetails) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetails) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpstreamDetails) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpstreamDetails) SetId(v string) { + o.Id = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *UpstreamDetails) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetails) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *UpstreamDetails) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *UpstreamDetails) SetLabel(v string) { + o.Label = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *UpstreamDetails) GetUri() string { + if o == nil || o.Uri == nil { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetails) GetUriOk() (*string, bool) { + if o == nil || o.Uri == nil { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *UpstreamDetails) HasUri() bool { + if o != nil && o.Uri != nil { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *UpstreamDetails) SetUri(v string) { + o.Uri = &v +} + +// GetTlsContext returns the TlsContext field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamDetails) GetTlsContext() UpstreamDetailsTlsContext { + if o == nil || o.TlsContext.Get() == nil { + var ret UpstreamDetailsTlsContext + return ret + } + return *o.TlsContext.Get() +} + +// GetTlsContextOk returns a tuple with the TlsContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamDetails) GetTlsContextOk() (*UpstreamDetailsTlsContext, bool) { + if o == nil { + return nil, false + } + return o.TlsContext.Get(), o.TlsContext.IsSet() +} + +// HasTlsContext returns a boolean if a field has been set. +func (o *UpstreamDetails) HasTlsContext() bool { + if o != nil && o.TlsContext.IsSet() { + return true + } + + return false +} + +// SetTlsContext gets a reference to the given NullableUpstreamDetailsTlsContext and assigns it to the TlsContext field. +func (o *UpstreamDetails) SetTlsContext(v UpstreamDetailsTlsContext) { + o.TlsContext.Set(&v) +} +// SetTlsContextNil sets the value for TlsContext to be an explicit nil +func (o *UpstreamDetails) SetTlsContextNil() { + o.TlsContext.Set(nil) +} + +// UnsetTlsContext ensures that no value is present for TlsContext, not even an explicit nil +func (o *UpstreamDetails) UnsetTlsContext() { + o.TlsContext.Unset() +} + +func (o UpstreamDetails) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Label != nil { + toSerialize["label"] = o.Label + } + if o.Uri != nil { + toSerialize["uri"] = o.Uri + } + if o.TlsContext.IsSet() { + toSerialize["tlsContext"] = o.TlsContext.Get() + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamDetails struct { + value *UpstreamDetails + isSet bool +} + +func (v NullableUpstreamDetails) Get() *UpstreamDetails { + return v.value +} + +func (v *NullableUpstreamDetails) Set(val *UpstreamDetails) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamDetails(val *UpstreamDetails) *NullableUpstreamDetails { + return &NullableUpstreamDetails{value: val, isSet: true} +} + +func (v NullableUpstreamDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_details_tls_context.go b/apim_upstream/model_upstream_details_tls_context.go new file mode 100644 index 0000000..33393c6 --- /dev/null +++ b/apim_upstream/model_upstream_details_tls_context.go @@ -0,0 +1,259 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamDetailsTlsContext struct for UpstreamDetailsTlsContext +type UpstreamDetailsTlsContext struct { + Audit *Audit `json:"audit,omitempty"` + SecretGroupId *string `json:"secretGroupId,omitempty"` + TlsContextId *string `json:"tlsContextId,omitempty"` + Name *string `json:"name,omitempty"` + Authorized *bool `json:"authorized,omitempty"` +} + +// NewUpstreamDetailsTlsContext instantiates a new UpstreamDetailsTlsContext 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 NewUpstreamDetailsTlsContext() *UpstreamDetailsTlsContext { + this := UpstreamDetailsTlsContext{} + return &this +} + +// NewUpstreamDetailsTlsContextWithDefaults instantiates a new UpstreamDetailsTlsContext 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 NewUpstreamDetailsTlsContextWithDefaults() *UpstreamDetailsTlsContext { + this := UpstreamDetailsTlsContext{} + return &this +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *UpstreamDetailsTlsContext) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetailsTlsContext) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *UpstreamDetailsTlsContext) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *UpstreamDetailsTlsContext) SetAudit(v Audit) { + o.Audit = &v +} + +// GetSecretGroupId returns the SecretGroupId field value if set, zero value otherwise. +func (o *UpstreamDetailsTlsContext) GetSecretGroupId() string { + if o == nil || o.SecretGroupId == nil { + var ret string + return ret + } + return *o.SecretGroupId +} + +// GetSecretGroupIdOk returns a tuple with the SecretGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetailsTlsContext) GetSecretGroupIdOk() (*string, bool) { + if o == nil || o.SecretGroupId == nil { + return nil, false + } + return o.SecretGroupId, true +} + +// HasSecretGroupId returns a boolean if a field has been set. +func (o *UpstreamDetailsTlsContext) HasSecretGroupId() bool { + if o != nil && o.SecretGroupId != nil { + return true + } + + return false +} + +// SetSecretGroupId gets a reference to the given string and assigns it to the SecretGroupId field. +func (o *UpstreamDetailsTlsContext) SetSecretGroupId(v string) { + o.SecretGroupId = &v +} + +// GetTlsContextId returns the TlsContextId field value if set, zero value otherwise. +func (o *UpstreamDetailsTlsContext) GetTlsContextId() string { + if o == nil || o.TlsContextId == nil { + var ret string + return ret + } + return *o.TlsContextId +} + +// GetTlsContextIdOk returns a tuple with the TlsContextId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetailsTlsContext) GetTlsContextIdOk() (*string, bool) { + if o == nil || o.TlsContextId == nil { + return nil, false + } + return o.TlsContextId, true +} + +// HasTlsContextId returns a boolean if a field has been set. +func (o *UpstreamDetailsTlsContext) HasTlsContextId() bool { + if o != nil && o.TlsContextId != nil { + return true + } + + return false +} + +// SetTlsContextId gets a reference to the given string and assigns it to the TlsContextId field. +func (o *UpstreamDetailsTlsContext) SetTlsContextId(v string) { + o.TlsContextId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpstreamDetailsTlsContext) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetailsTlsContext) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpstreamDetailsTlsContext) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpstreamDetailsTlsContext) SetName(v string) { + o.Name = &v +} + +// GetAuthorized returns the Authorized field value if set, zero value otherwise. +func (o *UpstreamDetailsTlsContext) GetAuthorized() bool { + if o == nil || o.Authorized == nil { + var ret bool + return ret + } + return *o.Authorized +} + +// GetAuthorizedOk returns a tuple with the Authorized field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamDetailsTlsContext) GetAuthorizedOk() (*bool, bool) { + if o == nil || o.Authorized == nil { + return nil, false + } + return o.Authorized, true +} + +// HasAuthorized returns a boolean if a field has been set. +func (o *UpstreamDetailsTlsContext) HasAuthorized() bool { + if o != nil && o.Authorized != nil { + return true + } + + return false +} + +// SetAuthorized gets a reference to the given bool and assigns it to the Authorized field. +func (o *UpstreamDetailsTlsContext) SetAuthorized(v bool) { + o.Authorized = &v +} + +func (o UpstreamDetailsTlsContext) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + if o.SecretGroupId != nil { + toSerialize["secretGroupId"] = o.SecretGroupId + } + if o.TlsContextId != nil { + toSerialize["tlsContextId"] = o.TlsContextId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Authorized != nil { + toSerialize["authorized"] = o.Authorized + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamDetailsTlsContext struct { + value *UpstreamDetailsTlsContext + isSet bool +} + +func (v NullableUpstreamDetailsTlsContext) Get() *UpstreamDetailsTlsContext { + return v.value +} + +func (v *NullableUpstreamDetailsTlsContext) Set(val *UpstreamDetailsTlsContext) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamDetailsTlsContext) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamDetailsTlsContext) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamDetailsTlsContext(val *UpstreamDetailsTlsContext) *NullableUpstreamDetailsTlsContext { + return &NullableUpstreamDetailsTlsContext{value: val, isSet: true} +} + +func (v NullableUpstreamDetailsTlsContext) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamDetailsTlsContext) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_patch_body.go b/apim_upstream/model_upstream_patch_body.go new file mode 100644 index 0000000..337dff2 --- /dev/null +++ b/apim_upstream/model_upstream_patch_body.go @@ -0,0 +1,197 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamPatchBody struct for UpstreamPatchBody +type UpstreamPatchBody struct { + Label *string `json:"label,omitempty"` + Uri *string `json:"uri,omitempty"` + TlsContext NullableUpstreamPostBodyTlsContext `json:"tlsContext,omitempty"` +} + +// NewUpstreamPatchBody instantiates a new UpstreamPatchBody 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 NewUpstreamPatchBody() *UpstreamPatchBody { + this := UpstreamPatchBody{} + return &this +} + +// NewUpstreamPatchBodyWithDefaults instantiates a new UpstreamPatchBody 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 NewUpstreamPatchBodyWithDefaults() *UpstreamPatchBody { + this := UpstreamPatchBody{} + return &this +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *UpstreamPatchBody) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPatchBody) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *UpstreamPatchBody) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *UpstreamPatchBody) SetLabel(v string) { + o.Label = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *UpstreamPatchBody) GetUri() string { + if o == nil || o.Uri == nil { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPatchBody) GetUriOk() (*string, bool) { + if o == nil || o.Uri == nil { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *UpstreamPatchBody) HasUri() bool { + if o != nil && o.Uri != nil { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *UpstreamPatchBody) SetUri(v string) { + o.Uri = &v +} + +// GetTlsContext returns the TlsContext field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPatchBody) GetTlsContext() UpstreamPostBodyTlsContext { + if o == nil || o.TlsContext.Get() == nil { + var ret UpstreamPostBodyTlsContext + return ret + } + return *o.TlsContext.Get() +} + +// GetTlsContextOk returns a tuple with the TlsContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPatchBody) GetTlsContextOk() (*UpstreamPostBodyTlsContext, bool) { + if o == nil { + return nil, false + } + return o.TlsContext.Get(), o.TlsContext.IsSet() +} + +// HasTlsContext returns a boolean if a field has been set. +func (o *UpstreamPatchBody) HasTlsContext() bool { + if o != nil && o.TlsContext.IsSet() { + return true + } + + return false +} + +// SetTlsContext gets a reference to the given NullableUpstreamPostBodyTlsContext and assigns it to the TlsContext field. +func (o *UpstreamPatchBody) SetTlsContext(v UpstreamPostBodyTlsContext) { + o.TlsContext.Set(&v) +} +// SetTlsContextNil sets the value for TlsContext to be an explicit nil +func (o *UpstreamPatchBody) SetTlsContextNil() { + o.TlsContext.Set(nil) +} + +// UnsetTlsContext ensures that no value is present for TlsContext, not even an explicit nil +func (o *UpstreamPatchBody) UnsetTlsContext() { + o.TlsContext.Unset() +} + +func (o UpstreamPatchBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Label != nil { + toSerialize["label"] = o.Label + } + if o.Uri != nil { + toSerialize["uri"] = o.Uri + } + if o.TlsContext.IsSet() { + toSerialize["tlsContext"] = o.TlsContext.Get() + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamPatchBody struct { + value *UpstreamPatchBody + isSet bool +} + +func (v NullableUpstreamPatchBody) Get() *UpstreamPatchBody { + return v.value +} + +func (v *NullableUpstreamPatchBody) Set(val *UpstreamPatchBody) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamPatchBody) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamPatchBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamPatchBody(val *UpstreamPatchBody) *NullableUpstreamPatchBody { + return &NullableUpstreamPatchBody{value: val, isSet: true} +} + +func (v NullableUpstreamPatchBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamPatchBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_post_body.go b/apim_upstream/model_upstream_post_body.go new file mode 100644 index 0000000..f84f801 --- /dev/null +++ b/apim_upstream/model_upstream_post_body.go @@ -0,0 +1,197 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamPostBody struct for UpstreamPostBody +type UpstreamPostBody struct { + Label *string `json:"label,omitempty"` + Uri *string `json:"uri,omitempty"` + TlsContext NullableUpstreamPostBodyTlsContext `json:"tlsContext,omitempty"` +} + +// NewUpstreamPostBody instantiates a new UpstreamPostBody 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 NewUpstreamPostBody() *UpstreamPostBody { + this := UpstreamPostBody{} + return &this +} + +// NewUpstreamPostBodyWithDefaults instantiates a new UpstreamPostBody 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 NewUpstreamPostBodyWithDefaults() *UpstreamPostBody { + this := UpstreamPostBody{} + return &this +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *UpstreamPostBody) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPostBody) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *UpstreamPostBody) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *UpstreamPostBody) SetLabel(v string) { + o.Label = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *UpstreamPostBody) GetUri() string { + if o == nil || o.Uri == nil { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPostBody) GetUriOk() (*string, bool) { + if o == nil || o.Uri == nil { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *UpstreamPostBody) HasUri() bool { + if o != nil && o.Uri != nil { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *UpstreamPostBody) SetUri(v string) { + o.Uri = &v +} + +// GetTlsContext returns the TlsContext field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPostBody) GetTlsContext() UpstreamPostBodyTlsContext { + if o == nil || o.TlsContext.Get() == nil { + var ret UpstreamPostBodyTlsContext + return ret + } + return *o.TlsContext.Get() +} + +// GetTlsContextOk returns a tuple with the TlsContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPostBody) GetTlsContextOk() (*UpstreamPostBodyTlsContext, bool) { + if o == nil { + return nil, false + } + return o.TlsContext.Get(), o.TlsContext.IsSet() +} + +// HasTlsContext returns a boolean if a field has been set. +func (o *UpstreamPostBody) HasTlsContext() bool { + if o != nil && o.TlsContext.IsSet() { + return true + } + + return false +} + +// SetTlsContext gets a reference to the given NullableUpstreamPostBodyTlsContext and assigns it to the TlsContext field. +func (o *UpstreamPostBody) SetTlsContext(v UpstreamPostBodyTlsContext) { + o.TlsContext.Set(&v) +} +// SetTlsContextNil sets the value for TlsContext to be an explicit nil +func (o *UpstreamPostBody) SetTlsContextNil() { + o.TlsContext.Set(nil) +} + +// UnsetTlsContext ensures that no value is present for TlsContext, not even an explicit nil +func (o *UpstreamPostBody) UnsetTlsContext() { + o.TlsContext.Unset() +} + +func (o UpstreamPostBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Label != nil { + toSerialize["label"] = o.Label + } + if o.Uri != nil { + toSerialize["uri"] = o.Uri + } + if o.TlsContext.IsSet() { + toSerialize["tlsContext"] = o.TlsContext.Get() + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamPostBody struct { + value *UpstreamPostBody + isSet bool +} + +func (v NullableUpstreamPostBody) Get() *UpstreamPostBody { + return v.value +} + +func (v *NullableUpstreamPostBody) Set(val *UpstreamPostBody) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamPostBody) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamPostBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamPostBody(val *UpstreamPostBody) *NullableUpstreamPostBody { + return &NullableUpstreamPostBody{value: val, isSet: true} +} + +func (v NullableUpstreamPostBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamPostBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_post_body_tls_context.go b/apim_upstream/model_upstream_post_body_tls_context.go new file mode 100644 index 0000000..6fe16bd --- /dev/null +++ b/apim_upstream/model_upstream_post_body_tls_context.go @@ -0,0 +1,151 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamPostBodyTlsContext struct for UpstreamPostBodyTlsContext +type UpstreamPostBodyTlsContext struct { + SecretGroupId *string `json:"secretGroupId,omitempty"` + TlsContextId *string `json:"tlsContextId,omitempty"` +} + +// NewUpstreamPostBodyTlsContext instantiates a new UpstreamPostBodyTlsContext 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 NewUpstreamPostBodyTlsContext() *UpstreamPostBodyTlsContext { + this := UpstreamPostBodyTlsContext{} + return &this +} + +// NewUpstreamPostBodyTlsContextWithDefaults instantiates a new UpstreamPostBodyTlsContext 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 NewUpstreamPostBodyTlsContextWithDefaults() *UpstreamPostBodyTlsContext { + this := UpstreamPostBodyTlsContext{} + return &this +} + +// GetSecretGroupId returns the SecretGroupId field value if set, zero value otherwise. +func (o *UpstreamPostBodyTlsContext) GetSecretGroupId() string { + if o == nil || o.SecretGroupId == nil { + var ret string + return ret + } + return *o.SecretGroupId +} + +// GetSecretGroupIdOk returns a tuple with the SecretGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPostBodyTlsContext) GetSecretGroupIdOk() (*string, bool) { + if o == nil || o.SecretGroupId == nil { + return nil, false + } + return o.SecretGroupId, true +} + +// HasSecretGroupId returns a boolean if a field has been set. +func (o *UpstreamPostBodyTlsContext) HasSecretGroupId() bool { + if o != nil && o.SecretGroupId != nil { + return true + } + + return false +} + +// SetSecretGroupId gets a reference to the given string and assigns it to the SecretGroupId field. +func (o *UpstreamPostBodyTlsContext) SetSecretGroupId(v string) { + o.SecretGroupId = &v +} + +// GetTlsContextId returns the TlsContextId field value if set, zero value otherwise. +func (o *UpstreamPostBodyTlsContext) GetTlsContextId() string { + if o == nil || o.TlsContextId == nil { + var ret string + return ret + } + return *o.TlsContextId +} + +// GetTlsContextIdOk returns a tuple with the TlsContextId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPostBodyTlsContext) GetTlsContextIdOk() (*string, bool) { + if o == nil || o.TlsContextId == nil { + return nil, false + } + return o.TlsContextId, true +} + +// HasTlsContextId returns a boolean if a field has been set. +func (o *UpstreamPostBodyTlsContext) HasTlsContextId() bool { + if o != nil && o.TlsContextId != nil { + return true + } + + return false +} + +// SetTlsContextId gets a reference to the given string and assigns it to the TlsContextId field. +func (o *UpstreamPostBodyTlsContext) SetTlsContextId(v string) { + o.TlsContextId = &v +} + +func (o UpstreamPostBodyTlsContext) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SecretGroupId != nil { + toSerialize["secretGroupId"] = o.SecretGroupId + } + if o.TlsContextId != nil { + toSerialize["tlsContextId"] = o.TlsContextId + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamPostBodyTlsContext struct { + value *UpstreamPostBodyTlsContext + isSet bool +} + +func (v NullableUpstreamPostBodyTlsContext) Get() *UpstreamPostBodyTlsContext { + return v.value +} + +func (v *NullableUpstreamPostBodyTlsContext) Set(val *UpstreamPostBodyTlsContext) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamPostBodyTlsContext) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamPostBodyTlsContext) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamPostBodyTlsContext(val *UpstreamPostBodyTlsContext) *NullableUpstreamPostBodyTlsContext { + return &NullableUpstreamPostBodyTlsContext{value: val, isSet: true} +} + +func (v NullableUpstreamPostBodyTlsContext) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamPostBodyTlsContext) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/model_upstream_tls_context.go b/apim_upstream/model_upstream_tls_context.go new file mode 100644 index 0000000..4c18b70 --- /dev/null +++ b/apim_upstream/model_upstream_tls_context.go @@ -0,0 +1,187 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" +) + +// UpstreamTlsContext struct for UpstreamTlsContext +type UpstreamTlsContext struct { + SecretGroupId *string `json:"secretGroupId,omitempty"` + TlsContextId *string `json:"tlsContextId,omitempty"` + Audit *Audit `json:"audit,omitempty"` +} + +// NewUpstreamTlsContext instantiates a new UpstreamTlsContext 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 NewUpstreamTlsContext() *UpstreamTlsContext { + this := UpstreamTlsContext{} + return &this +} + +// NewUpstreamTlsContextWithDefaults instantiates a new UpstreamTlsContext 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 NewUpstreamTlsContextWithDefaults() *UpstreamTlsContext { + this := UpstreamTlsContext{} + return &this +} + +// GetSecretGroupId returns the SecretGroupId field value if set, zero value otherwise. +func (o *UpstreamTlsContext) GetSecretGroupId() string { + if o == nil || o.SecretGroupId == nil { + var ret string + return ret + } + return *o.SecretGroupId +} + +// GetSecretGroupIdOk returns a tuple with the SecretGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamTlsContext) GetSecretGroupIdOk() (*string, bool) { + if o == nil || o.SecretGroupId == nil { + return nil, false + } + return o.SecretGroupId, true +} + +// HasSecretGroupId returns a boolean if a field has been set. +func (o *UpstreamTlsContext) HasSecretGroupId() bool { + if o != nil && o.SecretGroupId != nil { + return true + } + + return false +} + +// SetSecretGroupId gets a reference to the given string and assigns it to the SecretGroupId field. +func (o *UpstreamTlsContext) SetSecretGroupId(v string) { + o.SecretGroupId = &v +} + +// GetTlsContextId returns the TlsContextId field value if set, zero value otherwise. +func (o *UpstreamTlsContext) GetTlsContextId() string { + if o == nil || o.TlsContextId == nil { + var ret string + return ret + } + return *o.TlsContextId +} + +// GetTlsContextIdOk returns a tuple with the TlsContextId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamTlsContext) GetTlsContextIdOk() (*string, bool) { + if o == nil || o.TlsContextId == nil { + return nil, false + } + return o.TlsContextId, true +} + +// HasTlsContextId returns a boolean if a field has been set. +func (o *UpstreamTlsContext) HasTlsContextId() bool { + if o != nil && o.TlsContextId != nil { + return true + } + + return false +} + +// SetTlsContextId gets a reference to the given string and assigns it to the TlsContextId field. +func (o *UpstreamTlsContext) SetTlsContextId(v string) { + o.TlsContextId = &v +} + +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *UpstreamTlsContext) GetAudit() Audit { + if o == nil || o.Audit == nil { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamTlsContext) GetAuditOk() (*Audit, bool) { + if o == nil || o.Audit == nil { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *UpstreamTlsContext) HasAudit() bool { + if o != nil && o.Audit != nil { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *UpstreamTlsContext) SetAudit(v Audit) { + o.Audit = &v +} + +func (o UpstreamTlsContext) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SecretGroupId != nil { + toSerialize["secretGroupId"] = o.SecretGroupId + } + if o.TlsContextId != nil { + toSerialize["tlsContextId"] = o.TlsContextId + } + if o.Audit != nil { + toSerialize["audit"] = o.Audit + } + return json.Marshal(toSerialize) +} + +type NullableUpstreamTlsContext struct { + value *UpstreamTlsContext + isSet bool +} + +func (v NullableUpstreamTlsContext) Get() *UpstreamTlsContext { + return v.value +} + +func (v *NullableUpstreamTlsContext) Set(val *UpstreamTlsContext) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamTlsContext) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamTlsContext) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamTlsContext(val *UpstreamTlsContext) *NullableUpstreamTlsContext { + return &NullableUpstreamTlsContext{value: val, isSet: true} +} + +func (v NullableUpstreamTlsContext) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamTlsContext) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/apim_upstream/response.go b/apim_upstream/response.go new file mode 100644 index 0000000..b98659f --- /dev/null +++ b/apim_upstream/response.go @@ -0,0 +1,47 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +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:"-"` +} + +// NewAPIResponse returns a new APIResonse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/apim_upstream/utils.go b/apim_upstream/utils.go new file mode 100644 index 0000000..52da218 --- /dev/null +++ b/apim_upstream/utils.go @@ -0,0 +1,328 @@ +/* + * API Manager Upstream API + * + * API Manager Upstream API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apim_upstream + +import ( + "encoding/json" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/flex_gateway/.gitignore b/flex_gateway/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/flex_gateway/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/flex_gateway/.openapi-generator-ignore b/flex_gateway/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/flex_gateway/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/flex_gateway/.openapi-generator/FILES b/flex_gateway/.openapi-generator/FILES new file mode 100644 index 0000000..bdab8f5 --- /dev/null +++ b/flex_gateway/.openapi-generator/FILES @@ -0,0 +1,26 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_default.go +client.go +configuration.go +docs/DefaultApi.md +docs/FlexGatewayTargetApis.md +docs/FlexGatewayTargetApisInstances.md +docs/FlexGatewayTargetDetails.md +docs/FlexGatewayTargetDetailsReplicas.md +docs/FlexGatewayTargetSummary.md +docs/FlexGatewayTargetSummaryReplicas.md +git_push.sh +go.mod +go.sum +model_flex_gateway_target_apis.go +model_flex_gateway_target_apis_instances.go +model_flex_gateway_target_details.go +model_flex_gateway_target_details_replicas.go +model_flex_gateway_target_summary.go +model_flex_gateway_target_summary_replicas.go +response.go +utils.go diff --git a/flex_gateway/.openapi-generator/VERSION b/flex_gateway/.openapi-generator/VERSION new file mode 100644 index 0000000..acf69b4 --- /dev/null +++ b/flex_gateway/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.1.0 \ No newline at end of file diff --git a/flex_gateway/.travis.yml b/flex_gateway/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/flex_gateway/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/flex_gateway/README.md b/flex_gateway/README.md new file mode 100644 index 0000000..365adbf --- /dev/null +++ b/flex_gateway/README.md @@ -0,0 +1,131 @@ +# Go API client for flex_gateway + +Description of the Flex Gateway API + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import sw "./flex_gateway" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +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`. + +```golang +ctx := context.WithValue(context.Background(), sw.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`. + +```golang +ctx := context.WithValue(context.Background(), sw.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 identifield 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(), sw.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://anypoint.mulesoft.com/apimanager/xapi/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**GetFlexGatewayTargetApis**](docs/DefaultApi.md#getflexgatewaytargetapis) | **Get** /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis | Retrieves all APIs within a particular flex gateway target +*DefaultApi* | [**GetFlexGatewayTargetById**](docs/DefaultApi.md#getflexgatewaytargetbyid) | **Get** /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId} | Retrieves a particular flex gateway by Id +*DefaultApi* | [**GetFlexGatewayTargets**](docs/DefaultApi.md#getflexgatewaytargets) | **Get** /organizations/{orgId}/environments/{envId}/flex-gateway-targets | Retrieves all flex gateways + + +## Documentation For Models + + - [FlexGatewayTargetApis](docs/FlexGatewayTargetApis.md) + - [FlexGatewayTargetApisInstances](docs/FlexGatewayTargetApisInstances.md) + - [FlexGatewayTargetDetails](docs/FlexGatewayTargetDetails.md) + - [FlexGatewayTargetDetailsReplicas](docs/FlexGatewayTargetDetailsReplicas.md) + - [FlexGatewayTargetSummary](docs/FlexGatewayTargetSummary.md) + - [FlexGatewayTargetSummaryReplicas](docs/FlexGatewayTargetSummaryReplicas.md) + + +## Documentation For Authorization + + + +### bearerAuth + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING") +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 + + + diff --git a/flex_gateway/api/openapi.yaml b/flex_gateway/api/openapi.yaml new file mode 100644 index 0000000..cc23f95 --- /dev/null +++ b/flex_gateway/api/openapi.yaml @@ -0,0 +1,307 @@ +openapi: 3.0.0 +info: + description: Description of the Flex Gateway API + title: Flex Gateway API + version: 1.0.0 +servers: +- description: Anypoint Cloudhub + url: https://anypoint.mulesoft.com/apimanager/xapi/v1 +- description: Anypoint Cloudhub EU + url: https://eu1.anypoint.mulesoft.com/apimanager/xapi/v1 +- description: Anypoint Cloudhub GOV + url: https://gov.anypoint.mulesoft.com/apimanager/xapi/v1 +security: +- bearerAuth: [] +paths: + /organizations/{orgId}/environments/{envId}/flex-gateway-targets: + get: + description: Retrieves all flex gateway target within an organization and environment + operationId: GetFlexGatewayTargets + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment Id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargets' + description: List of flex gateway targets + summary: Retrieves all flex gateways + /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}: + get: + description: Retrieves a flex gateway target using the given id within the given + organization and environment + operationId: GetFlexGatewayTargetById + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment Id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The flex gateway target Id + explode: false + in: path + name: flexGatewayTargetId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargetDetails' + description: flex gateway target details + summary: Retrieves a particular flex gateway by Id + /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis: + get: + description: Retrieves all APIs within a particular flex gateway target within + a organization and environment + operationId: GetFlexGatewayTargetApis + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment Id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The flex gateway target Id + explode: false + in: path + name: flexGatewayTargetId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargetApis' + description: flex gateway target Apis + summary: Retrieves all APIs within a particular flex gateway target +components: + responses: + UnauthorizedError: + description: Access token is missing or invalid + SuccessGetFlexGatewayTargets: + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargets' + description: List of flex gateway targets + SuccessGetFlexGatewayTargetDetails: + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargetDetails' + description: flex gateway target details + SuccessGetFlexGatewayTargetApis: + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargetApis' + description: flex gateway target Apis + schemas: + FlexGatewayTargets: + items: + $ref: '#/components/schemas/FlexGatewayTargetSummary' + type: array + FlexGatewayTargetSummary: + example: + organizationId: organizationId + replicas: + DISCONNECTED: 6 + CONNECTED: 0 + lastUpdate: 2000-01-23T04:56:07.000+00:00 + name: name + id: id + status: status + tags: + - tags + - tags + properties: + organizationId: + type: string + id: + type: string + name: + type: string + status: + type: string + replicas: + $ref: '#/components/schemas/FlexGatewayTargetSummary_replicas' + tags: + items: + type: string + type: array + lastUpdate: + format: date-time + type: string + title: FlexGatewayTargetSummary + type: object + FlexGatewayTargetDetails: + example: + organizationId: organizationId + versions: + - versions + - versions + replicas: + - certificateExpirationDates: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + count: 0 + status: CONNECTED + - certificateExpirationDates: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + count: 0 + status: CONNECTED + lastUpdate: 2000-01-23T04:56:07.000+00:00 + name: name + id: id + version: version + status: status + tags: + - tags + - tags + properties: + organizationId: + type: string + id: + type: string + name: + type: string + status: + type: string + replicas: + items: + $ref: '#/components/schemas/FlexGatewayTargetDetails_replicas' + type: array + tags: + items: + type: string + type: array + lastUpdate: + format: date-time + type: string + versions: + items: + type: string + type: array + version: + type: string + title: FlexGatewayTargetDetails + type: object + FlexGatewayTargetApis: + example: + instances: + - path: path + port: port + id: 0 + - path: path + port: port + id: 0 + targetAllowsPortSharing: true + properties: + instances: + items: + $ref: '#/components/schemas/FlexGatewayTargetApis_instances' + type: array + targetAllowsPortSharing: + type: boolean + title: FlexGatewayTargetApis + type: object + FlexGatewayTargetSummary_replicas: + example: + DISCONNECTED: 6 + CONNECTED: 0 + properties: + CONNECTED: + type: integer + DISCONNECTED: + type: integer + type: object + FlexGatewayTargetDetails_replicas: + example: + certificateExpirationDates: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + count: 0 + status: CONNECTED + properties: + status: + enum: + - CONNECTED + - DISCONNECTED + type: string + count: + type: integer + certificateExpirationDates: + items: + format: date-time + type: string + type: array + type: object + FlexGatewayTargetApis_instances: + example: + path: path + port: port + id: 0 + properties: + id: + type: integer + port: + type: string + path: + type: string + type: object + securitySchemes: + bearerAuth: + bearerFormat: JWT + scheme: bearer + type: http diff --git a/flex_gateway/api_default.go b/flex_gateway/api_default.go new file mode 100644 index 0000000..6c89aba --- /dev/null +++ b/flex_gateway/api_default.go @@ -0,0 +1,366 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type DefaultApiApiGetFlexGatewayTargetApisRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + flexGatewayTargetId string +} + + +func (r DefaultApiApiGetFlexGatewayTargetApisRequest) Execute() (FlexGatewayTargetApis, *_nethttp.Response, error) { + return r.ApiService.GetFlexGatewayTargetApisExecute(r) +} + +/* + * GetFlexGatewayTargetApis Retrieves all APIs within a particular flex gateway target + * Retrieves all APIs within a particular flex gateway target within a organization and environment + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment Id + * @param flexGatewayTargetId The flex gateway target Id + * @return DefaultApiApiGetFlexGatewayTargetApisRequest + */ +func (a *DefaultApiService) GetFlexGatewayTargetApis(ctx _context.Context, orgId string, envId string, flexGatewayTargetId string) DefaultApiApiGetFlexGatewayTargetApisRequest { + return DefaultApiApiGetFlexGatewayTargetApisRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + flexGatewayTargetId: flexGatewayTargetId, + } +} + +/* + * Execute executes the request + * @return FlexGatewayTargetApis + */ +func (a *DefaultApiService) GetFlexGatewayTargetApisExecute(r DefaultApiApiGetFlexGatewayTargetApisRequest) (FlexGatewayTargetApis, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlexGatewayTargetApis + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetFlexGatewayTargetApis") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flexGatewayTargetId"+"}", _neturl.PathEscape(parameterToString(r.flexGatewayTargetId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiGetFlexGatewayTargetByIdRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + flexGatewayTargetId string +} + + +func (r DefaultApiApiGetFlexGatewayTargetByIdRequest) Execute() (FlexGatewayTargetDetails, *_nethttp.Response, error) { + return r.ApiService.GetFlexGatewayTargetByIdExecute(r) +} + +/* + * GetFlexGatewayTargetById Retrieves a particular flex gateway by Id + * Retrieves a flex gateway target using the given id within the given organization and environment + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment Id + * @param flexGatewayTargetId The flex gateway target Id + * @return DefaultApiApiGetFlexGatewayTargetByIdRequest + */ +func (a *DefaultApiService) GetFlexGatewayTargetById(ctx _context.Context, orgId string, envId string, flexGatewayTargetId string) DefaultApiApiGetFlexGatewayTargetByIdRequest { + return DefaultApiApiGetFlexGatewayTargetByIdRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + flexGatewayTargetId: flexGatewayTargetId, + } +} + +/* + * Execute executes the request + * @return FlexGatewayTargetDetails + */ +func (a *DefaultApiService) GetFlexGatewayTargetByIdExecute(r DefaultApiApiGetFlexGatewayTargetByIdRequest) (FlexGatewayTargetDetails, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlexGatewayTargetDetails + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetFlexGatewayTargetById") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flexGatewayTargetId"+"}", _neturl.PathEscape(parameterToString(r.flexGatewayTargetId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DefaultApiApiGetFlexGatewayTargetsRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string +} + + +func (r DefaultApiApiGetFlexGatewayTargetsRequest) Execute() ([]FlexGatewayTargetSummary, *_nethttp.Response, error) { + return r.ApiService.GetFlexGatewayTargetsExecute(r) +} + +/* + * GetFlexGatewayTargets Retrieves all flex gateways + * Retrieves all flex gateway target within an organization and environment + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment Id + * @return DefaultApiApiGetFlexGatewayTargetsRequest + */ +func (a *DefaultApiService) GetFlexGatewayTargets(ctx _context.Context, orgId string, envId string) DefaultApiApiGetFlexGatewayTargetsRequest { + return DefaultApiApiGetFlexGatewayTargetsRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + } +} + +/* + * Execute executes the request + * @return []FlexGatewayTargetSummary + */ +func (a *DefaultApiService) GetFlexGatewayTargetsExecute(r DefaultApiApiGetFlexGatewayTargetsRequest) ([]FlexGatewayTargetSummary, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []FlexGatewayTargetSummary + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetFlexGatewayTargets") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/flex-gateway-targets" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/flex_gateway/client.go b/flex_gateway/client.go new file mode 100644 index 0000000..3fdc24b --- /dev/null +++ b/flex_gateway/client.go @@ -0,0 +1,535 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the Flex Gateway API API v1.0.0 +// 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 + + DefaultApi *DefaultApiService +} + +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.DefaultApi = (*DefaultApiService)(&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), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +// 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, + formFileName string, + 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 strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && 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(formFileName, 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() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // 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 + } + + // 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 len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + 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 fp, ok := body.(**os.File); ok { + _, err = bodyBuf.ReadFrom(*fp) + } 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) { + err = 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 + } else { + 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) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/flex_gateway/configuration.go b/flex_gateway/configuration.go new file mode 100644 index 0000000..0a36217 --- /dev/null +++ b/flex_gateway/configuration.go @@ -0,0 +1,238 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// 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 an 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") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + // 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") +) + +// 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 +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +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 +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://anypoint.mulesoft.com/apimanager/xapi/v1", + Description: "Anypoint Cloudhub", + }, + { + URL: "https://eu1.anypoint.mulesoft.com/apimanager/xapi/v1", + Description: "Anypoint Cloudhub EU", + }, + { + URL: "https://gov.anypoint.mulesoft.com/apimanager/xapi/v1", + Description: "Anypoint Cloudhub GOV", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/flex_gateway/docs/DefaultApi.md b/flex_gateway/docs/DefaultApi.md new file mode 100644 index 0000000..f955721 --- /dev/null +++ b/flex_gateway/docs/DefaultApi.md @@ -0,0 +1,236 @@ +# \DefaultApi + +All URIs are relative to *https://anypoint.mulesoft.com/apimanager/xapi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetFlexGatewayTargetApis**](DefaultApi.md#GetFlexGatewayTargetApis) | **Get** /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis | Retrieves all APIs within a particular flex gateway target +[**GetFlexGatewayTargetById**](DefaultApi.md#GetFlexGatewayTargetById) | **Get** /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId} | Retrieves a particular flex gateway by Id +[**GetFlexGatewayTargets**](DefaultApi.md#GetFlexGatewayTargets) | **Get** /organizations/{orgId}/environments/{envId}/flex-gateway-targets | Retrieves all flex gateways + + + +## GetFlexGatewayTargetApis + +> FlexGatewayTargetApis GetFlexGatewayTargetApis(ctx, orgId, envId, flexGatewayTargetId).Execute() + +Retrieves all APIs within a particular flex gateway target + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment Id + flexGatewayTargetId := "flexGatewayTargetId_example" // string | The flex gateway target Id + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetFlexGatewayTargetApis(context.Background(), orgId, envId, flexGatewayTargetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetFlexGatewayTargetApis``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFlexGatewayTargetApis`: FlexGatewayTargetApis + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetFlexGatewayTargetApis`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment Id | +**flexGatewayTargetId** | **string** | The flex gateway target Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetFlexGatewayTargetApisRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**FlexGatewayTargetApis**](FlexGatewayTargetApis.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## GetFlexGatewayTargetById + +> FlexGatewayTargetDetails GetFlexGatewayTargetById(ctx, orgId, envId, flexGatewayTargetId).Execute() + +Retrieves a particular flex gateway by Id + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment Id + flexGatewayTargetId := "flexGatewayTargetId_example" // string | The flex gateway target Id + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetFlexGatewayTargetById(context.Background(), orgId, envId, flexGatewayTargetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetFlexGatewayTargetById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFlexGatewayTargetById`: FlexGatewayTargetDetails + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetFlexGatewayTargetById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment Id | +**flexGatewayTargetId** | **string** | The flex gateway target Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetFlexGatewayTargetByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**FlexGatewayTargetDetails**](FlexGatewayTargetDetails.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## GetFlexGatewayTargets + +> []FlexGatewayTargetSummary GetFlexGatewayTargets(ctx, orgId, envId).Execute() + +Retrieves all flex gateways + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment Id + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetFlexGatewayTargets(context.Background(), orgId, envId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetFlexGatewayTargets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFlexGatewayTargets`: []FlexGatewayTargetSummary + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetFlexGatewayTargets`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetFlexGatewayTargetsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**[]FlexGatewayTargetSummary**](FlexGatewayTargetSummary.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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/flex_gateway/docs/FlexGatewayTargetApis.md b/flex_gateway/docs/FlexGatewayTargetApis.md new file mode 100644 index 0000000..a634670 --- /dev/null +++ b/flex_gateway/docs/FlexGatewayTargetApis.md @@ -0,0 +1,82 @@ +# FlexGatewayTargetApis + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Instances** | Pointer to [**[]FlexGatewayTargetApisInstances**](FlexGatewayTargetApisInstances.md) | | [optional] +**TargetAllowsPortSharing** | Pointer to **bool** | | [optional] + +## Methods + +### NewFlexGatewayTargetApis + +`func NewFlexGatewayTargetApis() *FlexGatewayTargetApis` + +NewFlexGatewayTargetApis instantiates a new FlexGatewayTargetApis 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 + +### NewFlexGatewayTargetApisWithDefaults + +`func NewFlexGatewayTargetApisWithDefaults() *FlexGatewayTargetApis` + +NewFlexGatewayTargetApisWithDefaults instantiates a new FlexGatewayTargetApis 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 + +### GetInstances + +`func (o *FlexGatewayTargetApis) GetInstances() []FlexGatewayTargetApisInstances` + +GetInstances returns the Instances field if non-nil, zero value otherwise. + +### GetInstancesOk + +`func (o *FlexGatewayTargetApis) GetInstancesOk() (*[]FlexGatewayTargetApisInstances, bool)` + +GetInstancesOk returns a tuple with the Instances field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstances + +`func (o *FlexGatewayTargetApis) SetInstances(v []FlexGatewayTargetApisInstances)` + +SetInstances sets Instances field to given value. + +### HasInstances + +`func (o *FlexGatewayTargetApis) HasInstances() bool` + +HasInstances returns a boolean if a field has been set. + +### GetTargetAllowsPortSharing + +`func (o *FlexGatewayTargetApis) GetTargetAllowsPortSharing() bool` + +GetTargetAllowsPortSharing returns the TargetAllowsPortSharing field if non-nil, zero value otherwise. + +### GetTargetAllowsPortSharingOk + +`func (o *FlexGatewayTargetApis) GetTargetAllowsPortSharingOk() (*bool, bool)` + +GetTargetAllowsPortSharingOk returns a tuple with the TargetAllowsPortSharing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetAllowsPortSharing + +`func (o *FlexGatewayTargetApis) SetTargetAllowsPortSharing(v bool)` + +SetTargetAllowsPortSharing sets TargetAllowsPortSharing field to given value. + +### HasTargetAllowsPortSharing + +`func (o *FlexGatewayTargetApis) HasTargetAllowsPortSharing() bool` + +HasTargetAllowsPortSharing returns a boolean if a field has been set. + + +[[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/flex_gateway/docs/FlexGatewayTargetApisInstances.md b/flex_gateway/docs/FlexGatewayTargetApisInstances.md new file mode 100644 index 0000000..1b602a2 --- /dev/null +++ b/flex_gateway/docs/FlexGatewayTargetApisInstances.md @@ -0,0 +1,108 @@ +# FlexGatewayTargetApisInstances + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Port** | Pointer to **string** | | [optional] +**Path** | Pointer to **string** | | [optional] + +## Methods + +### NewFlexGatewayTargetApisInstances + +`func NewFlexGatewayTargetApisInstances() *FlexGatewayTargetApisInstances` + +NewFlexGatewayTargetApisInstances instantiates a new FlexGatewayTargetApisInstances 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 + +### NewFlexGatewayTargetApisInstancesWithDefaults + +`func NewFlexGatewayTargetApisInstancesWithDefaults() *FlexGatewayTargetApisInstances` + +NewFlexGatewayTargetApisInstancesWithDefaults instantiates a new FlexGatewayTargetApisInstances 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 + +### GetId + +`func (o *FlexGatewayTargetApisInstances) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FlexGatewayTargetApisInstances) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FlexGatewayTargetApisInstances) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FlexGatewayTargetApisInstances) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetPort + +`func (o *FlexGatewayTargetApisInstances) GetPort() string` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *FlexGatewayTargetApisInstances) GetPortOk() (*string, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *FlexGatewayTargetApisInstances) SetPort(v string)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *FlexGatewayTargetApisInstances) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetPath + +`func (o *FlexGatewayTargetApisInstances) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *FlexGatewayTargetApisInstances) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *FlexGatewayTargetApisInstances) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *FlexGatewayTargetApisInstances) HasPath() bool` + +HasPath returns a boolean if a field has been set. + + +[[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/flex_gateway/docs/FlexGatewayTargetDetails.md b/flex_gateway/docs/FlexGatewayTargetDetails.md new file mode 100644 index 0000000..c9230e7 --- /dev/null +++ b/flex_gateway/docs/FlexGatewayTargetDetails.md @@ -0,0 +1,264 @@ +# FlexGatewayTargetDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Replicas** | Pointer to [**[]FlexGatewayTargetDetailsReplicas**](FlexGatewayTargetDetailsReplicas.md) | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**LastUpdate** | Pointer to **time.Time** | | [optional] +**Versions** | Pointer to **[]string** | | [optional] +**Version** | Pointer to **string** | | [optional] + +## Methods + +### NewFlexGatewayTargetDetails + +`func NewFlexGatewayTargetDetails() *FlexGatewayTargetDetails` + +NewFlexGatewayTargetDetails instantiates a new FlexGatewayTargetDetails 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 + +### NewFlexGatewayTargetDetailsWithDefaults + +`func NewFlexGatewayTargetDetailsWithDefaults() *FlexGatewayTargetDetails` + +NewFlexGatewayTargetDetailsWithDefaults instantiates a new FlexGatewayTargetDetails 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 + +### GetOrganizationId + +`func (o *FlexGatewayTargetDetails) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *FlexGatewayTargetDetails) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *FlexGatewayTargetDetails) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *FlexGatewayTargetDetails) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *FlexGatewayTargetDetails) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FlexGatewayTargetDetails) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FlexGatewayTargetDetails) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FlexGatewayTargetDetails) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *FlexGatewayTargetDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FlexGatewayTargetDetails) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FlexGatewayTargetDetails) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FlexGatewayTargetDetails) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetStatus + +`func (o *FlexGatewayTargetDetails) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *FlexGatewayTargetDetails) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *FlexGatewayTargetDetails) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *FlexGatewayTargetDetails) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetReplicas + +`func (o *FlexGatewayTargetDetails) GetReplicas() []FlexGatewayTargetDetailsReplicas` + +GetReplicas returns the Replicas field if non-nil, zero value otherwise. + +### GetReplicasOk + +`func (o *FlexGatewayTargetDetails) GetReplicasOk() (*[]FlexGatewayTargetDetailsReplicas, bool)` + +GetReplicasOk returns a tuple with the Replicas field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplicas + +`func (o *FlexGatewayTargetDetails) SetReplicas(v []FlexGatewayTargetDetailsReplicas)` + +SetReplicas sets Replicas field to given value. + +### HasReplicas + +`func (o *FlexGatewayTargetDetails) HasReplicas() bool` + +HasReplicas returns a boolean if a field has been set. + +### GetTags + +`func (o *FlexGatewayTargetDetails) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *FlexGatewayTargetDetails) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *FlexGatewayTargetDetails) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *FlexGatewayTargetDetails) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetLastUpdate + +`func (o *FlexGatewayTargetDetails) GetLastUpdate() time.Time` + +GetLastUpdate returns the LastUpdate field if non-nil, zero value otherwise. + +### GetLastUpdateOk + +`func (o *FlexGatewayTargetDetails) GetLastUpdateOk() (*time.Time, bool)` + +GetLastUpdateOk returns a tuple with the LastUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdate + +`func (o *FlexGatewayTargetDetails) SetLastUpdate(v time.Time)` + +SetLastUpdate sets LastUpdate field to given value. + +### HasLastUpdate + +`func (o *FlexGatewayTargetDetails) HasLastUpdate() bool` + +HasLastUpdate returns a boolean if a field has been set. + +### GetVersions + +`func (o *FlexGatewayTargetDetails) GetVersions() []string` + +GetVersions returns the Versions field if non-nil, zero value otherwise. + +### GetVersionsOk + +`func (o *FlexGatewayTargetDetails) GetVersionsOk() (*[]string, bool)` + +GetVersionsOk returns a tuple with the Versions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersions + +`func (o *FlexGatewayTargetDetails) SetVersions(v []string)` + +SetVersions sets Versions field to given value. + +### HasVersions + +`func (o *FlexGatewayTargetDetails) HasVersions() bool` + +HasVersions returns a boolean if a field has been set. + +### GetVersion + +`func (o *FlexGatewayTargetDetails) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *FlexGatewayTargetDetails) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *FlexGatewayTargetDetails) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *FlexGatewayTargetDetails) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + + +[[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/flex_gateway/docs/FlexGatewayTargetDetailsReplicas.md b/flex_gateway/docs/FlexGatewayTargetDetailsReplicas.md new file mode 100644 index 0000000..1ad8088 --- /dev/null +++ b/flex_gateway/docs/FlexGatewayTargetDetailsReplicas.md @@ -0,0 +1,108 @@ +# FlexGatewayTargetDetailsReplicas + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] +**Count** | Pointer to **int32** | | [optional] +**CertificateExpirationDates** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] + +## Methods + +### NewFlexGatewayTargetDetailsReplicas + +`func NewFlexGatewayTargetDetailsReplicas() *FlexGatewayTargetDetailsReplicas` + +NewFlexGatewayTargetDetailsReplicas instantiates a new FlexGatewayTargetDetailsReplicas 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 + +### NewFlexGatewayTargetDetailsReplicasWithDefaults + +`func NewFlexGatewayTargetDetailsReplicasWithDefaults() *FlexGatewayTargetDetailsReplicas` + +NewFlexGatewayTargetDetailsReplicasWithDefaults instantiates a new FlexGatewayTargetDetailsReplicas 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 + +### GetStatus + +`func (o *FlexGatewayTargetDetailsReplicas) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *FlexGatewayTargetDetailsReplicas) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *FlexGatewayTargetDetailsReplicas) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *FlexGatewayTargetDetailsReplicas) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetCount + +`func (o *FlexGatewayTargetDetailsReplicas) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *FlexGatewayTargetDetailsReplicas) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *FlexGatewayTargetDetailsReplicas) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *FlexGatewayTargetDetailsReplicas) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetCertificateExpirationDates + +`func (o *FlexGatewayTargetDetailsReplicas) GetCertificateExpirationDates() []time.Time` + +GetCertificateExpirationDates returns the CertificateExpirationDates field if non-nil, zero value otherwise. + +### GetCertificateExpirationDatesOk + +`func (o *FlexGatewayTargetDetailsReplicas) GetCertificateExpirationDatesOk() (*[]time.Time, bool)` + +GetCertificateExpirationDatesOk returns a tuple with the CertificateExpirationDates field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateExpirationDates + +`func (o *FlexGatewayTargetDetailsReplicas) SetCertificateExpirationDates(v []time.Time)` + +SetCertificateExpirationDates sets CertificateExpirationDates field to given value. + +### HasCertificateExpirationDates + +`func (o *FlexGatewayTargetDetailsReplicas) HasCertificateExpirationDates() bool` + +HasCertificateExpirationDates returns a boolean if a field has been set. + + +[[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/flex_gateway/docs/FlexGatewayTargetSummary.md b/flex_gateway/docs/FlexGatewayTargetSummary.md new file mode 100644 index 0000000..ea2cb1d --- /dev/null +++ b/flex_gateway/docs/FlexGatewayTargetSummary.md @@ -0,0 +1,212 @@ +# FlexGatewayTargetSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrganizationId** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Replicas** | Pointer to [**FlexGatewayTargetSummaryReplicas**](FlexGatewayTargetSummaryReplicas.md) | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**LastUpdate** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewFlexGatewayTargetSummary + +`func NewFlexGatewayTargetSummary() *FlexGatewayTargetSummary` + +NewFlexGatewayTargetSummary instantiates a new FlexGatewayTargetSummary 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 + +### NewFlexGatewayTargetSummaryWithDefaults + +`func NewFlexGatewayTargetSummaryWithDefaults() *FlexGatewayTargetSummary` + +NewFlexGatewayTargetSummaryWithDefaults instantiates a new FlexGatewayTargetSummary 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 + +### GetOrganizationId + +`func (o *FlexGatewayTargetSummary) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *FlexGatewayTargetSummary) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *FlexGatewayTargetSummary) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *FlexGatewayTargetSummary) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetId + +`func (o *FlexGatewayTargetSummary) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FlexGatewayTargetSummary) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FlexGatewayTargetSummary) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FlexGatewayTargetSummary) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *FlexGatewayTargetSummary) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FlexGatewayTargetSummary) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FlexGatewayTargetSummary) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FlexGatewayTargetSummary) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetStatus + +`func (o *FlexGatewayTargetSummary) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *FlexGatewayTargetSummary) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *FlexGatewayTargetSummary) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *FlexGatewayTargetSummary) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetReplicas + +`func (o *FlexGatewayTargetSummary) GetReplicas() FlexGatewayTargetSummaryReplicas` + +GetReplicas returns the Replicas field if non-nil, zero value otherwise. + +### GetReplicasOk + +`func (o *FlexGatewayTargetSummary) GetReplicasOk() (*FlexGatewayTargetSummaryReplicas, bool)` + +GetReplicasOk returns a tuple with the Replicas field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplicas + +`func (o *FlexGatewayTargetSummary) SetReplicas(v FlexGatewayTargetSummaryReplicas)` + +SetReplicas sets Replicas field to given value. + +### HasReplicas + +`func (o *FlexGatewayTargetSummary) HasReplicas() bool` + +HasReplicas returns a boolean if a field has been set. + +### GetTags + +`func (o *FlexGatewayTargetSummary) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *FlexGatewayTargetSummary) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *FlexGatewayTargetSummary) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *FlexGatewayTargetSummary) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetLastUpdate + +`func (o *FlexGatewayTargetSummary) GetLastUpdate() time.Time` + +GetLastUpdate returns the LastUpdate field if non-nil, zero value otherwise. + +### GetLastUpdateOk + +`func (o *FlexGatewayTargetSummary) GetLastUpdateOk() (*time.Time, bool)` + +GetLastUpdateOk returns a tuple with the LastUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdate + +`func (o *FlexGatewayTargetSummary) SetLastUpdate(v time.Time)` + +SetLastUpdate sets LastUpdate field to given value. + +### HasLastUpdate + +`func (o *FlexGatewayTargetSummary) HasLastUpdate() bool` + +HasLastUpdate returns a boolean if a field has been set. + + +[[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/flex_gateway/docs/FlexGatewayTargetSummaryReplicas.md b/flex_gateway/docs/FlexGatewayTargetSummaryReplicas.md new file mode 100644 index 0000000..068668d --- /dev/null +++ b/flex_gateway/docs/FlexGatewayTargetSummaryReplicas.md @@ -0,0 +1,82 @@ +# FlexGatewayTargetSummaryReplicas + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CONNECTED** | Pointer to **int32** | | [optional] +**DISCONNECTED** | Pointer to **int32** | | [optional] + +## Methods + +### NewFlexGatewayTargetSummaryReplicas + +`func NewFlexGatewayTargetSummaryReplicas() *FlexGatewayTargetSummaryReplicas` + +NewFlexGatewayTargetSummaryReplicas instantiates a new FlexGatewayTargetSummaryReplicas 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 + +### NewFlexGatewayTargetSummaryReplicasWithDefaults + +`func NewFlexGatewayTargetSummaryReplicasWithDefaults() *FlexGatewayTargetSummaryReplicas` + +NewFlexGatewayTargetSummaryReplicasWithDefaults instantiates a new FlexGatewayTargetSummaryReplicas 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 + +### GetCONNECTED + +`func (o *FlexGatewayTargetSummaryReplicas) GetCONNECTED() int32` + +GetCONNECTED returns the CONNECTED field if non-nil, zero value otherwise. + +### GetCONNECTEDOk + +`func (o *FlexGatewayTargetSummaryReplicas) GetCONNECTEDOk() (*int32, bool)` + +GetCONNECTEDOk returns a tuple with the CONNECTED field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCONNECTED + +`func (o *FlexGatewayTargetSummaryReplicas) SetCONNECTED(v int32)` + +SetCONNECTED sets CONNECTED field to given value. + +### HasCONNECTED + +`func (o *FlexGatewayTargetSummaryReplicas) HasCONNECTED() bool` + +HasCONNECTED returns a boolean if a field has been set. + +### GetDISCONNECTED + +`func (o *FlexGatewayTargetSummaryReplicas) GetDISCONNECTED() int32` + +GetDISCONNECTED returns the DISCONNECTED field if non-nil, zero value otherwise. + +### GetDISCONNECTEDOk + +`func (o *FlexGatewayTargetSummaryReplicas) GetDISCONNECTEDOk() (*int32, bool)` + +GetDISCONNECTEDOk returns a tuple with the DISCONNECTED field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDISCONNECTED + +`func (o *FlexGatewayTargetSummaryReplicas) SetDISCONNECTED(v int32)` + +SetDISCONNECTED sets DISCONNECTED field to given value. + +### HasDISCONNECTED + +`func (o *FlexGatewayTargetSummaryReplicas) HasDISCONNECTED() bool` + +HasDISCONNECTED returns a boolean if a field has been set. + + +[[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/flex_gateway/git_push.sh b/flex_gateway/git_push.sh new file mode 100644 index 0000000..7b7f8fb --- /dev/null +++ b/flex_gateway/git_push.sh @@ -0,0 +1,58 @@ +#!/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 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="mulesoft-anypoint" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="anypoint-client-go" + 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://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${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://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/flex_gateway/go.mod b/flex_gateway/go.mod new file mode 100644 index 0000000..b154f53 --- /dev/null +++ b/flex_gateway/go.mod @@ -0,0 +1,7 @@ +module github.com/mulesoft-anypoint/anypoint-client-go/flex_gateway + +go 1.13 + +require ( + golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 +) diff --git a/flex_gateway/go.sum b/flex_gateway/go.sum new file mode 100644 index 0000000..734252e --- /dev/null +++ b/flex_gateway/go.sum @@ -0,0 +1,13 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/flex_gateway/model_flex_gateway_target_apis.go b/flex_gateway/model_flex_gateway_target_apis.go new file mode 100644 index 0000000..9e6442c --- /dev/null +++ b/flex_gateway/model_flex_gateway_target_apis.go @@ -0,0 +1,151 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" +) + +// FlexGatewayTargetApis struct for FlexGatewayTargetApis +type FlexGatewayTargetApis struct { + Instances *[]FlexGatewayTargetApisInstances `json:"instances,omitempty"` + TargetAllowsPortSharing *bool `json:"targetAllowsPortSharing,omitempty"` +} + +// NewFlexGatewayTargetApis instantiates a new FlexGatewayTargetApis 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 NewFlexGatewayTargetApis() *FlexGatewayTargetApis { + this := FlexGatewayTargetApis{} + return &this +} + +// NewFlexGatewayTargetApisWithDefaults instantiates a new FlexGatewayTargetApis 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 NewFlexGatewayTargetApisWithDefaults() *FlexGatewayTargetApis { + this := FlexGatewayTargetApis{} + return &this +} + +// GetInstances returns the Instances field value if set, zero value otherwise. +func (o *FlexGatewayTargetApis) GetInstances() []FlexGatewayTargetApisInstances { + if o == nil || o.Instances == nil { + var ret []FlexGatewayTargetApisInstances + return ret + } + return *o.Instances +} + +// GetInstancesOk returns a tuple with the Instances field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetApis) GetInstancesOk() (*[]FlexGatewayTargetApisInstances, bool) { + if o == nil || o.Instances == nil { + return nil, false + } + return o.Instances, true +} + +// HasInstances returns a boolean if a field has been set. +func (o *FlexGatewayTargetApis) HasInstances() bool { + if o != nil && o.Instances != nil { + return true + } + + return false +} + +// SetInstances gets a reference to the given []FlexGatewayTargetApisInstances and assigns it to the Instances field. +func (o *FlexGatewayTargetApis) SetInstances(v []FlexGatewayTargetApisInstances) { + o.Instances = &v +} + +// GetTargetAllowsPortSharing returns the TargetAllowsPortSharing field value if set, zero value otherwise. +func (o *FlexGatewayTargetApis) GetTargetAllowsPortSharing() bool { + if o == nil || o.TargetAllowsPortSharing == nil { + var ret bool + return ret + } + return *o.TargetAllowsPortSharing +} + +// GetTargetAllowsPortSharingOk returns a tuple with the TargetAllowsPortSharing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetApis) GetTargetAllowsPortSharingOk() (*bool, bool) { + if o == nil || o.TargetAllowsPortSharing == nil { + return nil, false + } + return o.TargetAllowsPortSharing, true +} + +// HasTargetAllowsPortSharing returns a boolean if a field has been set. +func (o *FlexGatewayTargetApis) HasTargetAllowsPortSharing() bool { + if o != nil && o.TargetAllowsPortSharing != nil { + return true + } + + return false +} + +// SetTargetAllowsPortSharing gets a reference to the given bool and assigns it to the TargetAllowsPortSharing field. +func (o *FlexGatewayTargetApis) SetTargetAllowsPortSharing(v bool) { + o.TargetAllowsPortSharing = &v +} + +func (o FlexGatewayTargetApis) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Instances != nil { + toSerialize["instances"] = o.Instances + } + if o.TargetAllowsPortSharing != nil { + toSerialize["targetAllowsPortSharing"] = o.TargetAllowsPortSharing + } + return json.Marshal(toSerialize) +} + +type NullableFlexGatewayTargetApis struct { + value *FlexGatewayTargetApis + isSet bool +} + +func (v NullableFlexGatewayTargetApis) Get() *FlexGatewayTargetApis { + return v.value +} + +func (v *NullableFlexGatewayTargetApis) Set(val *FlexGatewayTargetApis) { + v.value = val + v.isSet = true +} + +func (v NullableFlexGatewayTargetApis) IsSet() bool { + return v.isSet +} + +func (v *NullableFlexGatewayTargetApis) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlexGatewayTargetApis(val *FlexGatewayTargetApis) *NullableFlexGatewayTargetApis { + return &NullableFlexGatewayTargetApis{value: val, isSet: true} +} + +func (v NullableFlexGatewayTargetApis) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlexGatewayTargetApis) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/flex_gateway/model_flex_gateway_target_apis_instances.go b/flex_gateway/model_flex_gateway_target_apis_instances.go new file mode 100644 index 0000000..d0e0325 --- /dev/null +++ b/flex_gateway/model_flex_gateway_target_apis_instances.go @@ -0,0 +1,187 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" +) + +// FlexGatewayTargetApisInstances struct for FlexGatewayTargetApisInstances +type FlexGatewayTargetApisInstances struct { + Id *int32 `json:"id,omitempty"` + Port *string `json:"port,omitempty"` + Path *string `json:"path,omitempty"` +} + +// NewFlexGatewayTargetApisInstances instantiates a new FlexGatewayTargetApisInstances 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 NewFlexGatewayTargetApisInstances() *FlexGatewayTargetApisInstances { + this := FlexGatewayTargetApisInstances{} + return &this +} + +// NewFlexGatewayTargetApisInstancesWithDefaults instantiates a new FlexGatewayTargetApisInstances 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 NewFlexGatewayTargetApisInstancesWithDefaults() *FlexGatewayTargetApisInstances { + this := FlexGatewayTargetApisInstances{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FlexGatewayTargetApisInstances) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetApisInstances) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FlexGatewayTargetApisInstances) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *FlexGatewayTargetApisInstances) SetId(v int32) { + o.Id = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *FlexGatewayTargetApisInstances) GetPort() string { + if o == nil || o.Port == nil { + var ret string + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetApisInstances) GetPortOk() (*string, bool) { + if o == nil || o.Port == nil { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *FlexGatewayTargetApisInstances) HasPort() bool { + if o != nil && o.Port != nil { + return true + } + + return false +} + +// SetPort gets a reference to the given string and assigns it to the Port field. +func (o *FlexGatewayTargetApisInstances) SetPort(v string) { + o.Port = &v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *FlexGatewayTargetApisInstances) GetPath() string { + if o == nil || o.Path == nil { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetApisInstances) GetPathOk() (*string, bool) { + if o == nil || o.Path == nil { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *FlexGatewayTargetApisInstances) HasPath() bool { + if o != nil && o.Path != nil { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *FlexGatewayTargetApisInstances) SetPath(v string) { + o.Path = &v +} + +func (o FlexGatewayTargetApisInstances) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Port != nil { + toSerialize["port"] = o.Port + } + if o.Path != nil { + toSerialize["path"] = o.Path + } + return json.Marshal(toSerialize) +} + +type NullableFlexGatewayTargetApisInstances struct { + value *FlexGatewayTargetApisInstances + isSet bool +} + +func (v NullableFlexGatewayTargetApisInstances) Get() *FlexGatewayTargetApisInstances { + return v.value +} + +func (v *NullableFlexGatewayTargetApisInstances) Set(val *FlexGatewayTargetApisInstances) { + v.value = val + v.isSet = true +} + +func (v NullableFlexGatewayTargetApisInstances) IsSet() bool { + return v.isSet +} + +func (v *NullableFlexGatewayTargetApisInstances) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlexGatewayTargetApisInstances(val *FlexGatewayTargetApisInstances) *NullableFlexGatewayTargetApisInstances { + return &NullableFlexGatewayTargetApisInstances{value: val, isSet: true} +} + +func (v NullableFlexGatewayTargetApisInstances) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlexGatewayTargetApisInstances) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/flex_gateway/model_flex_gateway_target_details.go b/flex_gateway/model_flex_gateway_target_details.go new file mode 100644 index 0000000..d85aea3 --- /dev/null +++ b/flex_gateway/model_flex_gateway_target_details.go @@ -0,0 +1,404 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" + "time" +) + +// FlexGatewayTargetDetails struct for FlexGatewayTargetDetails +type FlexGatewayTargetDetails struct { + OrganizationId *string `json:"organizationId,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` + Replicas *[]FlexGatewayTargetDetailsReplicas `json:"replicas,omitempty"` + Tags *[]string `json:"tags,omitempty"` + LastUpdate *time.Time `json:"lastUpdate,omitempty"` + Versions *[]string `json:"versions,omitempty"` + Version *string `json:"version,omitempty"` +} + +// NewFlexGatewayTargetDetails instantiates a new FlexGatewayTargetDetails 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 NewFlexGatewayTargetDetails() *FlexGatewayTargetDetails { + this := FlexGatewayTargetDetails{} + return &this +} + +// NewFlexGatewayTargetDetailsWithDefaults instantiates a new FlexGatewayTargetDetails 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 NewFlexGatewayTargetDetailsWithDefaults() *FlexGatewayTargetDetails { + this := FlexGatewayTargetDetails{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *FlexGatewayTargetDetails) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FlexGatewayTargetDetails) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *FlexGatewayTargetDetails) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *FlexGatewayTargetDetails) SetStatus(v string) { + o.Status = &v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetReplicas() []FlexGatewayTargetDetailsReplicas { + if o == nil || o.Replicas == nil { + var ret []FlexGatewayTargetDetailsReplicas + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetReplicasOk() (*[]FlexGatewayTargetDetailsReplicas, bool) { + if o == nil || o.Replicas == nil { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasReplicas() bool { + if o != nil && o.Replicas != nil { + return true + } + + return false +} + +// SetReplicas gets a reference to the given []FlexGatewayTargetDetailsReplicas and assigns it to the Replicas field. +func (o *FlexGatewayTargetDetails) SetReplicas(v []FlexGatewayTargetDetailsReplicas) { + o.Replicas = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *FlexGatewayTargetDetails) SetTags(v []string) { + o.Tags = &v +} + +// GetLastUpdate returns the LastUpdate field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetLastUpdate() time.Time { + if o == nil || o.LastUpdate == nil { + var ret time.Time + return ret + } + return *o.LastUpdate +} + +// GetLastUpdateOk returns a tuple with the LastUpdate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetLastUpdateOk() (*time.Time, bool) { + if o == nil || o.LastUpdate == nil { + return nil, false + } + return o.LastUpdate, true +} + +// HasLastUpdate returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasLastUpdate() bool { + if o != nil && o.LastUpdate != nil { + return true + } + + return false +} + +// SetLastUpdate gets a reference to the given time.Time and assigns it to the LastUpdate field. +func (o *FlexGatewayTargetDetails) SetLastUpdate(v time.Time) { + o.LastUpdate = &v +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetVersions() []string { + if o == nil || o.Versions == nil { + var ret []string + return ret + } + return *o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetVersionsOk() (*[]string, bool) { + if o == nil || o.Versions == nil { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasVersions() bool { + if o != nil && o.Versions != nil { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *FlexGatewayTargetDetails) SetVersions(v []string) { + o.Versions = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetails) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetails) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetails) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *FlexGatewayTargetDetails) SetVersion(v string) { + o.Version = &v +} + +func (o FlexGatewayTargetDetails) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Replicas != nil { + toSerialize["replicas"] = o.Replicas + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.LastUpdate != nil { + toSerialize["lastUpdate"] = o.LastUpdate + } + if o.Versions != nil { + toSerialize["versions"] = o.Versions + } + if o.Version != nil { + toSerialize["version"] = o.Version + } + return json.Marshal(toSerialize) +} + +type NullableFlexGatewayTargetDetails struct { + value *FlexGatewayTargetDetails + isSet bool +} + +func (v NullableFlexGatewayTargetDetails) Get() *FlexGatewayTargetDetails { + return v.value +} + +func (v *NullableFlexGatewayTargetDetails) Set(val *FlexGatewayTargetDetails) { + v.value = val + v.isSet = true +} + +func (v NullableFlexGatewayTargetDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableFlexGatewayTargetDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlexGatewayTargetDetails(val *FlexGatewayTargetDetails) *NullableFlexGatewayTargetDetails { + return &NullableFlexGatewayTargetDetails{value: val, isSet: true} +} + +func (v NullableFlexGatewayTargetDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlexGatewayTargetDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/flex_gateway/model_flex_gateway_target_details_replicas.go b/flex_gateway/model_flex_gateway_target_details_replicas.go new file mode 100644 index 0000000..df0f5d7 --- /dev/null +++ b/flex_gateway/model_flex_gateway_target_details_replicas.go @@ -0,0 +1,188 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" + "time" +) + +// FlexGatewayTargetDetailsReplicas struct for FlexGatewayTargetDetailsReplicas +type FlexGatewayTargetDetailsReplicas struct { + Status *string `json:"status,omitempty"` + Count *int32 `json:"count,omitempty"` + CertificateExpirationDates *[]time.Time `json:"certificateExpirationDates,omitempty"` +} + +// NewFlexGatewayTargetDetailsReplicas instantiates a new FlexGatewayTargetDetailsReplicas 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 NewFlexGatewayTargetDetailsReplicas() *FlexGatewayTargetDetailsReplicas { + this := FlexGatewayTargetDetailsReplicas{} + return &this +} + +// NewFlexGatewayTargetDetailsReplicasWithDefaults instantiates a new FlexGatewayTargetDetailsReplicas 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 NewFlexGatewayTargetDetailsReplicasWithDefaults() *FlexGatewayTargetDetailsReplicas { + this := FlexGatewayTargetDetailsReplicas{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetailsReplicas) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetailsReplicas) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetailsReplicas) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *FlexGatewayTargetDetailsReplicas) SetStatus(v string) { + o.Status = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetailsReplicas) GetCount() int32 { + if o == nil || o.Count == nil { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetailsReplicas) GetCountOk() (*int32, bool) { + if o == nil || o.Count == nil { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetailsReplicas) HasCount() bool { + if o != nil && o.Count != nil { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *FlexGatewayTargetDetailsReplicas) SetCount(v int32) { + o.Count = &v +} + +// GetCertificateExpirationDates returns the CertificateExpirationDates field value if set, zero value otherwise. +func (o *FlexGatewayTargetDetailsReplicas) GetCertificateExpirationDates() []time.Time { + if o == nil || o.CertificateExpirationDates == nil { + var ret []time.Time + return ret + } + return *o.CertificateExpirationDates +} + +// GetCertificateExpirationDatesOk returns a tuple with the CertificateExpirationDates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetDetailsReplicas) GetCertificateExpirationDatesOk() (*[]time.Time, bool) { + if o == nil || o.CertificateExpirationDates == nil { + return nil, false + } + return o.CertificateExpirationDates, true +} + +// HasCertificateExpirationDates returns a boolean if a field has been set. +func (o *FlexGatewayTargetDetailsReplicas) HasCertificateExpirationDates() bool { + if o != nil && o.CertificateExpirationDates != nil { + return true + } + + return false +} + +// SetCertificateExpirationDates gets a reference to the given []time.Time and assigns it to the CertificateExpirationDates field. +func (o *FlexGatewayTargetDetailsReplicas) SetCertificateExpirationDates(v []time.Time) { + o.CertificateExpirationDates = &v +} + +func (o FlexGatewayTargetDetailsReplicas) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Count != nil { + toSerialize["count"] = o.Count + } + if o.CertificateExpirationDates != nil { + toSerialize["certificateExpirationDates"] = o.CertificateExpirationDates + } + return json.Marshal(toSerialize) +} + +type NullableFlexGatewayTargetDetailsReplicas struct { + value *FlexGatewayTargetDetailsReplicas + isSet bool +} + +func (v NullableFlexGatewayTargetDetailsReplicas) Get() *FlexGatewayTargetDetailsReplicas { + return v.value +} + +func (v *NullableFlexGatewayTargetDetailsReplicas) Set(val *FlexGatewayTargetDetailsReplicas) { + v.value = val + v.isSet = true +} + +func (v NullableFlexGatewayTargetDetailsReplicas) IsSet() bool { + return v.isSet +} + +func (v *NullableFlexGatewayTargetDetailsReplicas) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlexGatewayTargetDetailsReplicas(val *FlexGatewayTargetDetailsReplicas) *NullableFlexGatewayTargetDetailsReplicas { + return &NullableFlexGatewayTargetDetailsReplicas{value: val, isSet: true} +} + +func (v NullableFlexGatewayTargetDetailsReplicas) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlexGatewayTargetDetailsReplicas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/flex_gateway/model_flex_gateway_target_summary.go b/flex_gateway/model_flex_gateway_target_summary.go new file mode 100644 index 0000000..41bf774 --- /dev/null +++ b/flex_gateway/model_flex_gateway_target_summary.go @@ -0,0 +1,332 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" + "time" +) + +// FlexGatewayTargetSummary struct for FlexGatewayTargetSummary +type FlexGatewayTargetSummary struct { + OrganizationId *string `json:"organizationId,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` + Replicas *FlexGatewayTargetSummaryReplicas `json:"replicas,omitempty"` + Tags *[]string `json:"tags,omitempty"` + LastUpdate *time.Time `json:"lastUpdate,omitempty"` +} + +// NewFlexGatewayTargetSummary instantiates a new FlexGatewayTargetSummary 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 NewFlexGatewayTargetSummary() *FlexGatewayTargetSummary { + this := FlexGatewayTargetSummary{} + return &this +} + +// NewFlexGatewayTargetSummaryWithDefaults instantiates a new FlexGatewayTargetSummary 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 NewFlexGatewayTargetSummaryWithDefaults() *FlexGatewayTargetSummary { + this := FlexGatewayTargetSummary{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetOrganizationId() string { + if o == nil || o.OrganizationId == nil { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetOrganizationIdOk() (*string, bool) { + if o == nil || o.OrganizationId == nil { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasOrganizationId() bool { + if o != nil && o.OrganizationId != nil { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *FlexGatewayTargetSummary) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FlexGatewayTargetSummary) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *FlexGatewayTargetSummary) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *FlexGatewayTargetSummary) SetStatus(v string) { + o.Status = &v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetReplicas() FlexGatewayTargetSummaryReplicas { + if o == nil || o.Replicas == nil { + var ret FlexGatewayTargetSummaryReplicas + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetReplicasOk() (*FlexGatewayTargetSummaryReplicas, bool) { + if o == nil || o.Replicas == nil { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasReplicas() bool { + if o != nil && o.Replicas != nil { + return true + } + + return false +} + +// SetReplicas gets a reference to the given FlexGatewayTargetSummaryReplicas and assigns it to the Replicas field. +func (o *FlexGatewayTargetSummary) SetReplicas(v FlexGatewayTargetSummaryReplicas) { + o.Replicas = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *FlexGatewayTargetSummary) SetTags(v []string) { + o.Tags = &v +} + +// GetLastUpdate returns the LastUpdate field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummary) GetLastUpdate() time.Time { + if o == nil || o.LastUpdate == nil { + var ret time.Time + return ret + } + return *o.LastUpdate +} + +// GetLastUpdateOk returns a tuple with the LastUpdate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummary) GetLastUpdateOk() (*time.Time, bool) { + if o == nil || o.LastUpdate == nil { + return nil, false + } + return o.LastUpdate, true +} + +// HasLastUpdate returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummary) HasLastUpdate() bool { + if o != nil && o.LastUpdate != nil { + return true + } + + return false +} + +// SetLastUpdate gets a reference to the given time.Time and assigns it to the LastUpdate field. +func (o *FlexGatewayTargetSummary) SetLastUpdate(v time.Time) { + o.LastUpdate = &v +} + +func (o FlexGatewayTargetSummary) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.OrganizationId != nil { + toSerialize["organizationId"] = o.OrganizationId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Replicas != nil { + toSerialize["replicas"] = o.Replicas + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.LastUpdate != nil { + toSerialize["lastUpdate"] = o.LastUpdate + } + return json.Marshal(toSerialize) +} + +type NullableFlexGatewayTargetSummary struct { + value *FlexGatewayTargetSummary + isSet bool +} + +func (v NullableFlexGatewayTargetSummary) Get() *FlexGatewayTargetSummary { + return v.value +} + +func (v *NullableFlexGatewayTargetSummary) Set(val *FlexGatewayTargetSummary) { + v.value = val + v.isSet = true +} + +func (v NullableFlexGatewayTargetSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableFlexGatewayTargetSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlexGatewayTargetSummary(val *FlexGatewayTargetSummary) *NullableFlexGatewayTargetSummary { + return &NullableFlexGatewayTargetSummary{value: val, isSet: true} +} + +func (v NullableFlexGatewayTargetSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlexGatewayTargetSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/flex_gateway/model_flex_gateway_target_summary_replicas.go b/flex_gateway/model_flex_gateway_target_summary_replicas.go new file mode 100644 index 0000000..f8c137f --- /dev/null +++ b/flex_gateway/model_flex_gateway_target_summary_replicas.go @@ -0,0 +1,151 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" +) + +// FlexGatewayTargetSummaryReplicas struct for FlexGatewayTargetSummaryReplicas +type FlexGatewayTargetSummaryReplicas struct { + CONNECTED *int32 `json:"CONNECTED,omitempty"` + DISCONNECTED *int32 `json:"DISCONNECTED,omitempty"` +} + +// NewFlexGatewayTargetSummaryReplicas instantiates a new FlexGatewayTargetSummaryReplicas 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 NewFlexGatewayTargetSummaryReplicas() *FlexGatewayTargetSummaryReplicas { + this := FlexGatewayTargetSummaryReplicas{} + return &this +} + +// NewFlexGatewayTargetSummaryReplicasWithDefaults instantiates a new FlexGatewayTargetSummaryReplicas 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 NewFlexGatewayTargetSummaryReplicasWithDefaults() *FlexGatewayTargetSummaryReplicas { + this := FlexGatewayTargetSummaryReplicas{} + return &this +} + +// GetCONNECTED returns the CONNECTED field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummaryReplicas) GetCONNECTED() int32 { + if o == nil || o.CONNECTED == nil { + var ret int32 + return ret + } + return *o.CONNECTED +} + +// GetCONNECTEDOk returns a tuple with the CONNECTED field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummaryReplicas) GetCONNECTEDOk() (*int32, bool) { + if o == nil || o.CONNECTED == nil { + return nil, false + } + return o.CONNECTED, true +} + +// HasCONNECTED returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummaryReplicas) HasCONNECTED() bool { + if o != nil && o.CONNECTED != nil { + return true + } + + return false +} + +// SetCONNECTED gets a reference to the given int32 and assigns it to the CONNECTED field. +func (o *FlexGatewayTargetSummaryReplicas) SetCONNECTED(v int32) { + o.CONNECTED = &v +} + +// GetDISCONNECTED returns the DISCONNECTED field value if set, zero value otherwise. +func (o *FlexGatewayTargetSummaryReplicas) GetDISCONNECTED() int32 { + if o == nil || o.DISCONNECTED == nil { + var ret int32 + return ret + } + return *o.DISCONNECTED +} + +// GetDISCONNECTEDOk returns a tuple with the DISCONNECTED field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlexGatewayTargetSummaryReplicas) GetDISCONNECTEDOk() (*int32, bool) { + if o == nil || o.DISCONNECTED == nil { + return nil, false + } + return o.DISCONNECTED, true +} + +// HasDISCONNECTED returns a boolean if a field has been set. +func (o *FlexGatewayTargetSummaryReplicas) HasDISCONNECTED() bool { + if o != nil && o.DISCONNECTED != nil { + return true + } + + return false +} + +// SetDISCONNECTED gets a reference to the given int32 and assigns it to the DISCONNECTED field. +func (o *FlexGatewayTargetSummaryReplicas) SetDISCONNECTED(v int32) { + o.DISCONNECTED = &v +} + +func (o FlexGatewayTargetSummaryReplicas) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CONNECTED != nil { + toSerialize["CONNECTED"] = o.CONNECTED + } + if o.DISCONNECTED != nil { + toSerialize["DISCONNECTED"] = o.DISCONNECTED + } + return json.Marshal(toSerialize) +} + +type NullableFlexGatewayTargetSummaryReplicas struct { + value *FlexGatewayTargetSummaryReplicas + isSet bool +} + +func (v NullableFlexGatewayTargetSummaryReplicas) Get() *FlexGatewayTargetSummaryReplicas { + return v.value +} + +func (v *NullableFlexGatewayTargetSummaryReplicas) Set(val *FlexGatewayTargetSummaryReplicas) { + v.value = val + v.isSet = true +} + +func (v NullableFlexGatewayTargetSummaryReplicas) IsSet() bool { + return v.isSet +} + +func (v *NullableFlexGatewayTargetSummaryReplicas) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlexGatewayTargetSummaryReplicas(val *FlexGatewayTargetSummaryReplicas) *NullableFlexGatewayTargetSummaryReplicas { + return &NullableFlexGatewayTargetSummaryReplicas{value: val, isSet: true} +} + +func (v NullableFlexGatewayTargetSummaryReplicas) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlexGatewayTargetSummaryReplicas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/flex_gateway/response.go b/flex_gateway/response.go new file mode 100644 index 0000000..8dcd572 --- /dev/null +++ b/flex_gateway/response.go @@ -0,0 +1,47 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +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:"-"` +} + +// NewAPIResponse returns a new APIResonse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/flex_gateway/utils.go b/flex_gateway/utils.go new file mode 100644 index 0000000..8cc671c --- /dev/null +++ b/flex_gateway/utils.go @@ -0,0 +1,328 @@ +/* + * Flex Gateway API + * + * Description of the Flex Gateway API + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package flex_gateway + +import ( + "encoding/json" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}