From aff95437ad5fa80e1ae2f894ce6eebc60fe6db5b Mon Sep 17 00:00:00 2001 From: Adam Robinson Date: Tue, 10 May 2022 17:42:10 -0400 Subject: [PATCH 1/4] Add 1.264.0 API spec --- RHSM-API_v1.264.0.json | 3907 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3907 insertions(+) create mode 100644 RHSM-API_v1.264.0.json diff --git a/RHSM-API_v1.264.0.json b/RHSM-API_v1.264.0.json new file mode 100644 index 0000000..ec000f4 --- /dev/null +++ b/RHSM-API_v1.264.0.json @@ -0,0 +1,3907 @@ +{ + "basePath": "/management/v1", + "consumes": [ + "application/json" + ], + "definitions": { + "APIPageParam": { + "description": "APIPageParam details the pagination parameters in APIResponse", + "properties": { + "count": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "type": "object" + }, + "AddProviderAccount": { + "description": "An account to be added", + "properties": { + "id": { + "type": "string" + }, + "nickname": { + "type": "string" + } + }, + "type": "object" + }, + "Allocation": { + "properties": { + "entitlementQuantity": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "simpleContentAccess": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "title": "Allocation is an entity that consumes entitlements. Also referred as a Distributor.", + "type": "object" + }, + "AllocationDetails": { + "description": "details of a subscription allocation", + "properties": { + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/definitions/Date" + }, + "entitlementsAttached": { + "$ref": "#/definitions/EntitlementsAttachedResponse" + }, + "entitlementsAttachedQuantity": { + "type": "integer" + }, + "lastModified": { + "$ref": "#/definitions/Date" + }, + "name": { + "type": "string" + }, + "simpleContentAccess": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "AllocationSummary": { + "description": "details of a subscription allocation", + "properties": { + "contentAccessMode": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/definitions/Date" + }, + "entitlementsAttachedQuantity": { + "type": "integer" + }, + "lastModified": { + "$ref": "#/definitions/Date" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "AllocationVersion": { + "description": "List of satellite version", + "properties": { + "description": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "AttachEntitlement": { + "properties": { + "autoAttachSetting": { + "type": "boolean" + }, + "complianceStatus": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/definitions/Date" + }, + "entitlementStatus": { + "type": "string" + }, + "entitlementsAttached": { + "$ref": "#/definitions/EntitlementsAttachedResponse" + }, + "entitlementsAttachedCount": { + "type": "integer" + }, + "errataApplicabilityCounts": { + "$ref": "#/definitions/ErrataApplicabilityCounts" + }, + "factsCount": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "installedProductsCount": { + "type": "integer" + }, + "lastCheckin": { + "$ref": "#/definitions/Date" + }, + "name": { + "type": "string" + }, + "serviceLevelPreference": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "title": "System is an entity that consumes entitlements. Also referred as a Consumer.", + "type": "object" + }, + "ContentSet": { + "properties": { + "arch": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "title": "ContentSet represent a contentset for the listContentSets API Response.", + "type": "object" + }, + "Date": { + "description": "Date represents the date format used for API returns", + "example": "2006-01-02T15:04:05.000Z", + "type": "string" + }, + "DetailResponse": { + "properties": { + "contractNumber": { + "type": "string" + }, + "endDate": { + "$ref": "#/definitions/Date" + }, + "pools": { + "items": { + "$ref": "#/definitions/Pool" + }, + "type": "array" + }, + "quantity": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "startDate": { + "$ref": "#/definitions/Date" + }, + "status": { + "type": "string" + }, + "subscriptionName": { + "type": "string" + }, + "subscriptionNumber": { + "type": "string" + } + }, + "title": "DetailResponse is the user-friendly response from the service.", + "type": "object" + }, + "DownloadLink": { + "properties": { + "expiration": { + "description": "time at which the download link expires (in UTC)", + "example": "2006-01-02T15:04:05.000Z", + "type": "string" + }, + "filename": { + "description": "filename of the file on the download link", + "example": "filename-1.2.3-1.x86_64.rpm", + "type": "string" + }, + "href": { + "description": "URL to obtain the image", + "example": "https://access.cdn.redhat.com/content/origin/files/sha256/64/643e706cf7db9e93e706637af92d80eb58377dd0c64ac1e9ce6a72700aa04c2a/rhel-8.1-x86_64-boot.iso?_auth_=1582920605_7e8153e1bdc2f46636653e2efb17bc65", + "type": "string" + } + }, + "type": "object" + }, + "EnabledCloudAccessProvider": { + "description": "Enabled Cloud Access Provider details including products and accounts.", + "properties": { + "accounts": { + "items": { + "$ref": "#/definitions/EnabledProviderAccount" + }, + "type": "array" + }, + "name": { + "type": "string" + }, + "products": { + "items": { + "$ref": "#/definitions/EnabledProduct" + }, + "type": "array" + }, + "shortName": { + "type": "string" + } + }, + "type": "object" + }, + "EnabledProduct": { + "description": "Enabled Product represents a cloud access provider product", + "properties": { + "enabledQuantity": { + "type": "integer" + }, + "imageGroups": { + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "type": "string" + }, + "nextRenewal": { + "$ref": "#/definitions/ShortDate" + }, + "sku": { + "type": "string" + }, + "totalQuantity": { + "type": "integer" + } + }, + "type": "object" + }, + "EnabledProviderAccount": { + "description": "Enabled Provider Account represents a cloud access provider account", + "properties": { + "dateAdded": { + "$ref": "#/definitions/Date" + }, + "goldImageStatus": { + "items": { + "$ref": "#/definitions/GoldImageStatus" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "sourceId": { + "description": "Source ID of linked account (only for accounts created via Sources on cloud.redhat.com)", + "type": "string" + }, + "verified": { + "description": "verification status for RHSM Auto Registration (only displayed for supported cloud providers)", + "type": "boolean" + } + }, + "required": [ + "id", + "nickname", + "dateAdded" + ], + "type": "object" + }, + "EntitlementsAttachedResponse": { + "description": "EntitlementsAttachedResponse wraps data obtained for EntitlementsAttached and sends metadata about it using helpers.OptionalResult", + "properties": { + "reason": { + "type": "string" + }, + "valid": { + "type": "boolean" + }, + "value": { + "items": { + "$ref": "#/definitions/EntitlementsAttachedResponseValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "EntitlementsAttachedResponseValue": { + "description": "EntitlementsAttachedResponseValue represents the Value field in the EntitlementsAttachedResponse", + "properties": { + "contractNumber": { + "type": "string" + }, + "endDate": { + "$ref": "#/definitions/Date" + }, + "entitlementQuantity": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "startDate": { + "$ref": "#/definitions/Date" + }, + "subscriptionName": { + "type": "string" + } + }, + "type": "object" + }, + "ErrataApplicabilityCounts": { + "description": "Applicable errata details", + "properties": { + "reason": { + "type": "string" + }, + "valid": { + "type": "boolean" + }, + "value": { + "$ref": "#/definitions/ErrataCount" + } + }, + "type": "object" + }, + "ErrataCount": { + "description": "ErrataCount is the errata information for a System", + "properties": { + "bugfixCount": { + "type": "integer" + }, + "enhancementCount": { + "type": "integer" + }, + "securityCount": { + "type": "integer" + } + }, + "type": "object" + }, + "ErratumDetails": { + "properties": { + "affectedProducts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bugzillas": { + "items": { + "$ref": "#/definitions/Reference" + }, + "type": "array" + }, + "copyrightYear": { + "type": "string" + }, + "cves": { + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "issued": { + "$ref": "#/definitions/Date" + }, + "lastUpdated": { + "$ref": "#/definitions/Date" + }, + "references": { + "items": { + "$ref": "#/definitions/Reference" + }, + "type": "array" + }, + "severity": { + "type": "string" + }, + "solution": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "synopsis": { + "type": "string" + }, + "type": { + "type": "string" + }, + "typeSeverity": { + "type": "string" + } + }, + "type": "object" + }, + "ErratumForSystem": { + "description": "an erratum listed for a system", + "properties": { + "href": { + "type": "string" + }, + "id": { + "type": "string" + }, + "published": { + "$ref": "#/definitions/Date" + }, + "severity": { + "type": "string" + }, + "synopsis": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "ErratumInContentSet": { + "description": "ErratumInContentSet contains information on an erratum listed in a content set", + "properties": { + "advisoryId": { + "type": "string" + }, + "href": { + "type": "string" + }, + "publishDate": { + "$ref": "#/definitions/Date" + }, + "severity": { + "type": "string" + }, + "synopsis": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "ErrorDetails": { + "description": "ErrorDetails details the Error in ErrorResponse", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + } + }, + "type": "object" + }, + "Facts": { + "description": "facts give additional details about the system", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "GoldImageStatus": { + "description": "Gold Image Status Details of a cloud access provider account for an image provider.", + "properties": { + "description": { + "description": "Description of the provider image group", + "example": "Red Hat Enterprise Linux", + "type": "string" + }, + "name": { + "description": "Name of the requested provider image group", + "example": "RHEL", + "type": "string" + }, + "status": { + "description": "Status of Gold Image Request", + "example": "Requested", + "type": "string" + } + }, + "type": "object" + }, + "ImageForVersionArch": { + "description": "Image Details for provided version and architecture.", + "properties": { + "arch": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "datePublished": { + "$ref": "#/definitions/Date" + }, + "downloadHref": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "imageName": { + "type": "string" + } + }, + "type": "object" + }, + "ImageInContentSet": { + "description": "Image Details in a content set image listing.", + "properties": { + "arch": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "datePublished": { + "$ref": "#/definitions/Date" + }, + "downloadHref": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "imageName": { + "type": "string" + } + }, + "type": "object" + }, + "InstalledProducts": { + "description": "details of installed products on the system", + "properties": { + "arch": { + "type": "string" + }, + "productID": { + "type": "string" + }, + "productName": { + "type": "string" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "ListResponse": { + "description": "ListResponse is the actual collection of subscription details that gets\nrendered", + "items": { + "$ref": "#/definitions/DetailResponse" + }, + "type": "array" + }, + "MyErratum": { + "description": "MyErratum contains erratum information that affects at least one system", + "properties": { + "advisoryId": { + "type": "string" + }, + "affectedSystemCount": { + "type": "integer" + }, + "details": { + "type": "string" + }, + "publishDate": { + "$ref": "#/definitions/Date" + }, + "synopsis": { + "type": "string" + }, + "systems": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "OrgSimpleContentAccess": { + "properties": { + "id": { + "type": "string" + }, + "simpleContentAccess": { + "type": "string" + }, + "simpleContentAccessCapable": { + "type": "boolean" + }, + "systemPurposeAttributes": { + "$ref": "#/definitions/SystemPurposeAttributes" + } + }, + "title": "Organization Simple Content Access details.", + "type": "object" + }, + "PackageDetail": { + "description": "PackageDetail wraps an errata package and adds a RefURL", + "properties": { + "arch": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "contentSets": { + "items": { + "type": "string" + }, + "type": "array" + }, + "details_url": { + "type": "string" + }, + "epoch": { + "type": "integer" + }, + "filename": { + "type": "string" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "repoTags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "PackageForSystem": { + "description": "package installed on a system", + "properties": { + "advisories": { + "items": { + "properties": { + "advisory": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "arch": { + "type": "string" + }, + "epoch": { + "type": "integer" + }, + "errataCount": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "Pool": { + "description": "Pool represents pool information that matter for the detail list", + "properties": { + "consumed": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "PoolDetail": { + "description": "PoolDetail is an entry in the system/allocation pools listing", + "properties": { + "contractNumber": { + "type": "string" + }, + "endDate": { + "$ref": "#/definitions/Date" + }, + "entitlementsAvailable": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "serviceLevel": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "startDate": { + "$ref": "#/definitions/Date" + }, + "subscriptionName": { + "type": "string" + }, + "subscriptionNumber": { + "type": "string" + } + }, + "type": "object" + }, + "Reference": { + "description": "Reference contains a reference to an external item", + "properties": { + "href": { + "type": "string" + }, + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "ShortDate": { + "description": "ShortDate represents the short date format used for API returns where time precision is not needed", + "example": "2006-01-02", + "type": "string" + }, + "ShowSystem": { + "properties": { + "autoAttachSetting": { + "type": "boolean" + }, + "complianceStatus": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/definitions/Date" + }, + "entitlementStatus": { + "type": "string" + }, + "entitlementsAttached": { + "$ref": "#/definitions/EntitlementsAttachedResponse" + }, + "entitlementsAttachedCount": { + "type": "integer" + }, + "errataApplicabilityCounts": { + "$ref": "#/definitions/ErrataApplicabilityCounts" + }, + "facts": { + "$ref": "#/definitions/Facts" + }, + "factsCount": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "installedProducts": { + "$ref": "#/definitions/InstalledProducts" + }, + "installedProductsCount": { + "type": "integer" + }, + "lastCheckin": { + "$ref": "#/definitions/Date" + }, + "name": { + "type": "string" + }, + "serviceLevelPreference": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "title": "System is an entity that consumes entitlements. Also referred as a Consumer.", + "type": "object" + }, + "System": { + "properties": { + "entitlementCount": { + "type": "integer" + }, + "entitlementStatus": { + "type": "string" + }, + "errataCounts": { + "$ref": "#/definitions/ErrataCount" + }, + "hostname": { + "type": "string" + }, + "href": { + "type": "string" + }, + "lastCheckin": { + "$ref": "#/definitions/Date" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "title": "System is an entity that consumes entitlements. Also referred as a Consumer.", + "type": "object" + }, + "SystemList": { + "description": "SystemList is the result of the get system list API", + "properties": { + "complianceStatus": { + "type": "string" + }, + "details": { + "type": "string" + }, + "entitlementQuantity": { + "type": "integer" + }, + "lastCheckin": { + "$ref": "#/definitions/Date" + }, + "systemName": { + "type": "string" + }, + "totalEntitlementQuantity": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "type": "object" + }, + "SystemPurposeAttributes": { + "description": "System purpose settings available to an organization", + "properties": { + "roles": { + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceLevel": { + "items": { + "type": "string" + }, + "type": "array" + }, + "usage": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "contentSetArchMock": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/ErratumInContentSet" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + }, + "exportJobResponse": { + "properties": { + "exportID": { + "type": "string" + }, + "href": { + "type": "string" + } + }, + "type": "object" + }, + "exportResponse": { + "properties": { + "exportJobID": { + "type": "string" + }, + "href": { + "type": "string" + } + }, + "type": "object" + }, + "myErrataListMock": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/MyErratum" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + }, + "ongoingExportJobResponse": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + }, + "pkgContentSetArch": { + "properties": { + "arch": { + "type": "string" + }, + "buildDate": { + "$ref": "#/definitions/Date" + }, + "buildHost": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "contentSets": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "downloadHref": { + "type": "string" + }, + "epoch": { + "type": "string" + }, + "group": { + "type": "string" + }, + "href": { + "type": "string" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "pkgDetails": { + "properties": { + "arch": { + "type": "string" + }, + "buildDate": { + "$ref": "#/definitions/Date" + }, + "buildHost": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "contentSets": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "epoch": { + "type": "string" + }, + "group": { + "type": "string" + }, + "href": { + "type": "string" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "pkgListMock": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/PackageDetail" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + }, + "poolsListMock": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/PoolDetail" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + }, + "systemList": { + "description": "systemList is a System Slice", + "items": { + "$ref": "#/definitions/System" + }, + "type": "array" + }, + "systemListMock": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/System" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "host": "api.access.redhat.com", + "info": { + "contact": { + "url": "https://access.redhat.com/support/cases/" + }, + "description": "API for Red Hat Subscription Management", + "title": "RHSM-API", + "version": "1.264.0" + }, + "paths": { + "/allocations": { + "get": { + "description": "The default and max number of results in a response are 100.", + "operationId": "listAllocations", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "enum": [ + "SAM", + "Satellite" + ], + "in": "query", + "name": "type", + "type": "string" + } + ], + "responses": { + "200": { + "description": "list of allocations", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/Allocation" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all allocations for a user", + "tags": [ + "allocation" + ] + }, + "post": { + "description": "Create Satellite by name and version(optional).\nCustomers can use any version listed in the `/v1/allocations/versions` endpoint (use attribute `value`).\nIf no version is specified, it will take the latest available version for Satellite.", + "operationId": "createSatellite", + "parameters": [ + { + "description": "must be less than 100 characters and use only numbers, letters, underscores, hyphens, and periods", + "in": "query", + "name": "Name", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "version", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/AllocationSummary" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Create Satellite", + "tags": [ + "allocation" + ] + } + }, + "/allocations/versions": { + "get": { + "description": "Returns list of Satellite version 6.0 and above", + "operationId": "listVersionsAllocation", + "responses": { + "200": { + "description": "list of Satellite version", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/AllocationVersion" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List Satellite versions", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}": { + "delete": { + "description": "The default success response will be 204\n\nSystem, RHUI, Hypervisor are unsupported allocation types", + "operationId": "removeAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "description": "Deleting a subscription allocation can have significant impacts on your hosts and activation keys.\nWe require a force parameter to make sure the delete operation is intentional.", + "enum": [ + true + ], + "in": "query", + "name": "force", + "required": true, + "type": "boolean" + } + ], + "responses": { + "204": { + "description": "Successfully removed" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + }, + "504": { + "$ref": "#/responses/GatewayTimeout" + } + }, + "summary": "Remove allocation profile", + "tags": [ + "allocation" + ] + }, + "get": { + "description": "System, RHUI, Hypervisor are unsupported allocation types", + "operationId": "showAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "description": "Show more details about a allocation", + "enum": [ + "entitlements" + ], + "in": "query", + "maxItems": 1, + "name": "include", + "type": "string" + } + ], + "responses": { + "200": { + "description": "ShowAllocation200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/AllocationDetails" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get an allocation by UUID", + "tags": [ + "allocation" + ] + }, + "put": { + "description": "Allows to update simpleContentAccess for Satellite of version 6.3 and above\nPossible value for simpleContentAccess are:\n\n- enabled\n- disabled", + "operationId": "updateAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "allocation", + "schema": { + "properties": { + "simpleContentAccess": { + "type": "string" + } + }, + "required": [ + "simpleContentAccess" + ], + "type": "object" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/NoContent" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Update an allocation", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/entitlements": { + "post": { + "description": "The default success response will be 200.\n\nSystem, RHUI, Hypervisor are unsupported allocation types.\nSAM 1.3 or higher, and Satellite 5.6 versions are supported.", + "operationId": "attachEntitlementAllocation", + "parameters": [ + { + "in": "query", + "maxItems": 1, + "minItems": 1, + "name": "pool", + "required": true, + "type": "string" + }, + { + "description": "quantity you want to attach", + "in": "query", + "name": "quantity", + "type": "integer" + }, + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "AttachEntitlement200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/AllocationDetails" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Attach entitlement to allocation", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/entitlements/{EntitlementID}": { + "delete": { + "description": "The default success response will be 204.", + "operationId": "removeAllocationEntitlement", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "description": "Remove an entitlement from an allocation", + "in": "path", + "name": "EntitlementID", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "Successfully removed" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Remove entitlement from the allocation", + "tags": [ + "allocation" + ] + }, + "put": { + "description": "The default success response will be 200.\nSystem, RHUI, Hypervisor are unsupported allocation types", + "operationId": "updateEntitlementAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "EntitlementID", + "required": true, + "type": "string" + }, + { + "description": "maxItem: quantity must be less than or equal to the maximum number of allowed entitlements in the entitlement pool\nminItem: 1", + "in": "query", + "name": "quantity", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "Success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/AllocationDetails" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Update attached entitlement to allocation", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/export": { + "get": { + "description": "Starts job to generate export for an allocation. To check the status of the export job visit the href in the response.\n\nSystem, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower and Satellite 5.9 or lower versions are unsupported.", + "operationId": "exportAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ExportAllocation200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/exportResponse" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Trigger allocation manifest export", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/export/{ExportID}": { + "get": { + "description": "Success response contains a zip file. The link is one-time download and expires after one try. Trigger export job to get another download link.\n\nContent-Type: application/zip", + "operationId": "getExportAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "ExportID", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/zip" + ], + "responses": { + "200": { + "description": "GetExportAllocation200 is the success response", + "schema": { + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Download allocation manifest", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/exportJob/{ExportJobID}": { + "get": { + "description": "Returns export download link in response.", + "operationId": "exportJobAllocation", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "ExportJobID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ExportJobAllocation200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/exportJobResponse" + } + }, + "type": "object" + } + }, + "202": { + "description": "AcceptedExportJob202 is a response for accepted and in progress job", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/ongoingExportJobResponse" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "406": { + "$ref": "#/responses/NotAcceptable" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Check status of allocation manifest export", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/pools": { + "get": { + "description": "System, RHUI, Hypervisor are unsupported allocation types. SAM 1.3 or higher, and Satellite 5.6 versions are supported.", + "operationId": "listAllocationPools", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "description": "include future dated pools for satellite 6.3 or higher", + "enum": [ + true + ], + "in": "query", + "name": "future", + "type": "boolean" + }, + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ListAllocationPools200 is the success response", + "schema": { + "$ref": "#/definitions/poolsListMock" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all pools for an allocation", + "tags": [ + "allocation" + ] + } + }, + "/allocations/{uuid}/{EntitlementID}": { + "delete": { + "deprecated": true, + "description": "The default success response will be 204.", + "operationId": "removeAllocationEntitlementDeprecated", + "parameters": [ + { + "in": "path", + "name": "uuid", + "required": true, + "type": "string" + }, + { + "description": "Remove an entitlement from an allocation", + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "EntitlementID", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "Successfully removed" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Remove entitlement from the allocation", + "tags": [ + "allocation" + ] + } + }, + "/cloud_access_providers/enabled": { + "get": { + "description": "Returns the full list of all enabled Red Hat products and Cloud Access provider accounts/subscriptions associated with the user’s Red Hat account.\n- For Products that are expired `nextRenewal` field would be omitted and `totalQuantity` would be `0`.\n- Product objects can have `totalQuantity` field as `-1` indicating `Unlimited` quantity available.\n- The `nextRenewalDate` field of a Product has the format `YYYY-MM-DD`.\n- The `goldImageStatus` details are available for an account when the Provider is a certified Gold Image Provider and the account has been requested for gold image access. The `status` field of a goldImageStatus object could be `\"Requested\"`, `\"Granted\"` or `\"Failed\"`.\n- The `imageGroups` field is available for a product when the Provider is a certified Gold Image Provider, and the product has a gold image group available for it.\n", + "operationId": "listEnabledCloudAccessProviders", + "responses": { + "200": { + "description": "A JSON response object listing cloud access providers and their accounts and products.", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/EnabledCloudAccessProvider" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all enabled cloud access providers for a user", + "tags": [ + "cloudaccess" + ] + } + }, + "/cloud_access_providers/{ProviderShortName}/account": { + "put": { + "consumes": [ + "application/json" + ], + "deprecated": true, + "description": "Updates the account nickname for a currently-enabled provider account. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "UpdateProviderAccountDeprecated", + "parameters": [ + { + "in": "path", + "name": "ProviderShortName", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "account", + "schema": { + "properties": { + "id": { + "type": "string" + }, + "newNickname": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/NoContent" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Update provider account", + "tags": [ + "cloudaccess" + ] + } + }, + "/cloud_access_providers/{ProviderShortName}/accounts": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "Removes a currently-enabled provider account, including removing access to Gold Images, where applicable. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "RemoveProviderAccount", + "parameters": [ + { + "in": "path", + "name": "ProviderShortName", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "account", + "schema": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/NoContent" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Remove a provider account", + "tags": [ + "cloudaccess" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "description": "Add up to `100` new provider accounts, with optional nicknames, to a currently-enabled provider for Red Hat Cloud Access. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "AddProviderAccounts", + "parameters": [ + { + "in": "path", + "name": "ProviderShortName", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "account", + "schema": { + "items": { + "$ref": "#/definitions/AddProviderAccount" + }, + "type": "array" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/NoContent" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Add accounts for a provider", + "tags": [ + "cloudaccess" + ] + } + }, + "/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}": { + "put": { + "consumes": [ + "application/json" + ], + "description": "Updates the nickname for a currently-enabled provider account. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "UpdateProviderAccount", + "parameters": [ + { + "in": "path", + "name": "ProviderShortName", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "AccountID", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "account", + "schema": { + "properties": { + "nickname": { + "type": "string" + } + }, + "required": [ + "nickname" + ], + "type": "object" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/NoContent" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Update provider account", + "tags": [ + "cloudaccess" + ] + } + }, + "/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}/verification": { + "put": { + "consumes": [ + "application/json" + ], + "description": "Verifies a cloud provider account for use with RHSM Auto Registration, which allows for cloud instances to automatically register with RHSM upon provisioning.\n\nAuto Registration is currently only available for the following cloud providers:\n - AWS\n - AWS GovCloud\n - ACS China\n - Microsoft Azure\n - Google Cloud Provider\n\n\nThis endpoint accepts a cloud instance \"identity\" document and \"signature\" from the cloud provider's metadata service. Use the following links for more info on how to obtain these:\n - For AWS: [EC2 Instance Identity Document](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) and [Signature](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-rsa2048.html)\n - For Azure: [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) and [Signature](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux#attested-data)\n - For GCP: [Compute Engine Instance Identity JWT token](https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature). Note: Please use \"https://subscription.rhsm.redhat.com:443/subscription\" as value for \"audience\" query parameter and \"full\" as value for \"format\" query parameter while generating the token\n\n\nAn HTTP 400 response will be returned if the cloud provider does not support automatic registration, the signature of the document cannot be verified, the cloud provider account has already been verified for a different Red Hat account, or if the account in the instance metadata does not match the provided account ID.\n\nAn HTTP 204 response will be returned if the account has been successfully verified. Attempts to verify an account that is already verified will return an HTTP 204 response with no changes being made.\n", + "operationId": "VerifyProviderAccount", + "parameters": [ + { + "enum": [ + "AWS", + "AGOV", + "ACN", + "MSAZ", + "GCE" + ], + "in": "path", + "name": "ProviderShortName", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "AccountID", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "account", + "schema": { + "properties": { + "identity": { + "description": "base64-encoded cloud instance metadata. For GCE, please use the instance identity token (JWT) as it is.", + "type": "string" + }, + "signature": { + "description": "base64-encoded cloud instance metadata signature. For GCE, please omit this field.", + "type": "string" + } + }, + "required": [ + "identity", + "signature" + ], + "type": "object" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/NoContent" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Verify a provider account", + "tags": [ + "cloudaccess" + ] + } + }, + "/cloud_access_providers/{ProviderShortName}/goldimage": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Requests access to Red Hat Gold Images, where available, for currently-enabled products and provider accounts. Customers can request Red Hat Gold Images for account IDs and product image groups listed in the `/v1/cloud_access_providers/enabled` endpoint using the provider short name listed in the same response. After the request has been accepted for processing, gold image status for accounts can be checked in the `/v1/cloud_access_providers/enabled` endpoint response.\n", + "operationId": "EnableGoldImages", + "parameters": [ + { + "in": "path", + "name": "ProviderShortName", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "goldImages", + "schema": { + "properties": { + "accounts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "images", + "accounts" + ], + "type": "object" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Accepted" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Enable Gold image access", + "tags": [ + "cloudaccess" + ] + } + }, + "/errata": { + "get": { + "description": "The default and max results in a response are 1000.", + "operationId": "listErrata", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ListErrata200 is the success response", + "schema": { + "$ref": "#/definitions/myErrataListMock" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all errata for a user's systems", + "tags": [ + "errata" + ] + } + }, + "/errata/cset/{ContentSet}/arch/{Arch}": { + "get": { + "description": "Limit is the number of results in a response. The default limit is 50 and max limit is 100.", + "operationId": "listErrataByContentSetArch", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "ContentSet", + "required": true, + "type": "string" + }, + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "Arch", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ListErrataByContentSetArch200 is the success response", + "schema": { + "$ref": "#/definitions/contentSetArchMock" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get all the errata for the specified content set and arch", + "tags": [ + "errata" + ] + } + }, + "/errata/{AdvisoryID}": { + "get": { + "description": "This will get the details of an advisory specified by its advisoryID.", + "operationId": "showErratum", + "parameters": [ + { + "description": "unique identifier for a Red Hat advisory", + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "AdvisoryID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ShowErratum200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/ErratumDetails" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get the details of an advisory", + "tags": [ + "errata" + ] + } + }, + "/errata/{AdvisoryID}/packages": { + "get": { + "description": "The default and max results in a response are 50.", + "operationId": "listErratumPackages", + "parameters": [ + { + "description": "unique identifier for a Red Hat advisory", + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "AdvisoryID", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ListErratumPackages200 is the success response", + "schema": { + "$ref": "#/definitions/pkgListMock" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all packages for an advisory", + "tags": [ + "errata" + ] + } + }, + "/errata/{AdvisoryID}/systems": { + "get": { + "description": "The default and max results in a response are 1000.", + "operationId": "listErratumSystems", + "parameters": [ + { + "description": "unique identifier for a Red Hat advisory", + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "AdvisoryID", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ListErratumSystems200 is the success response", + "schema": { + "$ref": "#/definitions/systemListMock" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all systems for an advisory", + "tags": [ + "errata" + ] + } + }, + "/images/cset/{ContentSet}": { + "get": { + "description": "List all the available images in a given content set. The content set parameter is expected to be\n properly formatted (for example rhel-8-for-x86_64-baseos-isos). And the user requesting the endpoint\nis expected to have Download permission (UGC). If the user is entitled to an image, a \"downloadHref\" attribute is added in the image response object which links to image download API. The list is paginated by default to 25 results in a response and goes to maximum 100 results in a response. Use pagination by setting offset and limit url parameters (valid integer values).\n", + "operationId": "listImagesByContentSet", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "ContentSet", + "required": true, + "type": "string" + }, + { + "description": "maximum number of list items in a page", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "A JSON response object containing image listing.", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/ImageInContentSet" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List available images in a content set", + "tags": [ + "images" + ] + } + }, + "/images/rhel/{Version}/{Arch}": { + "get": { + "description": "List all the available images for the given version and architecture. The Version parameter is expected to be a valid RHEL version. Example: 8.1, 8.2 etc.\nThe Arch parameter should be one of the valid RHEL architectures. Example: x86_64, aarch64 etc.\nThe user requesting the endpoint is expected to have Download permission (UGC).\nIf the user is entitled to an image, a \"downloadHref\" attribute is added in the image response object which links to image download API.\n", + "operationId": "listImageDownloadsByVersionArch", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "Version", + "required": true, + "type": "string" + }, + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "Arch", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A JSON response object containing image downloads list.", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/ImageInContentSet" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List RHEL image downloads by version and architecture.", + "tags": [ + "images" + ] + } + }, + "/images/{checksum}/download": { + "get": { + "description": "Find an image by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time an image is downloaded and to not store the link for more than several minutes. If the user has \"Download Software and Updates\" permissions and a valid subscription for the image, they will receive a HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body.\n", + "operationId": "downloadImage", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "checksum", + "pattern": "^[a-f0-9]{64}$", + "required": true, + "type": "string" + } + ], + "responses": { + "307": { + "description": "redirect to download image on the Red Hat CDN", + "headers": { + "Location": { + "description": "URL to obtain the image", + "type": "string" + } + }, + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/DownloadLink" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Download an image by its SHA256 checksum", + "tags": [ + "images" + ] + } + }, + "/organization": { + "get": { + "description": "Show Simple Content Access details of user's organization", + "operationId": "checkOrgSCACapability", + "parameters": [ + { + "description": "Request for system purpose attributes in response", + "example": "system_purpose_attributes", + "in": "query", + "name": "include", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Organization details", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/OrgSimpleContentAccess" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get details of the user's organization", + "tags": [ + "organization" + ] + } + }, + "/packages/cset/{ContentSet}/arch/{Arch}": { + "get": { + "description": "The default and max results in a response are 50 and 100 respectively.", + "operationId": "listPackagesByContentSetArch", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "ContentSet", + "required": true, + "type": "string" + }, + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "Arch", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "collectionFormat": "csv", + "in": "query", + "items": { + "enum": [ + "latest" + ], + "type": "string" + }, + "minItems": 1, + "name": "filter", + "type": "array" + } + ], + "responses": { + "200": { + "description": "ListPackagesByContentSetArch200 is the success response", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/pkgContentSetArch" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get all the packages for the specified content set and arch.", + "tags": [ + "packages" + ] + } + }, + "/packages/{Checksum}": { + "get": { + "description": "This will get the details of a package specified by its checksum.", + "operationId": "showPackage", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "Checksum", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ShowPackage200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/pkgDetails" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get the details of a package", + "tags": [ + "packages" + ] + } + }, + "/packages/{checksum}/download": { + "get": { + "description": "Find a package by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time a package is downloaded and to not store the link for more than several minutes. If the user has \"Download Software and Updates\" permissions and a valid subscription for the package, they will receive an HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body.\n", + "operationId": "downloadPackage", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "checksum", + "pattern": "^[a-f0-9]{64}$", + "required": true, + "type": "string" + } + ], + "responses": { + "307": { + "description": "redirect to download package on the Red Hat CDN", + "headers": { + "Location": { + "description": "URL to obtain the package", + "type": "string" + } + }, + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/DownloadLink" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Download a package by its SHA256 checksum", + "tags": [ + "packages" + ] + } + }, + "/subscriptions": { + "get": { + "description": "The default and max results in a response are 50.", + "operationId": "listSubscriptions", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ListSubscriptions200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/ListResponse" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all subscriptions for a user", + "tags": [ + "subscription" + ] + } + }, + "/subscriptions/{SubscriptionNumber}/contentSets": { + "get": { + "description": "The default and max results in a response are 1000.", + "operationId": "listSubContentSets", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SubscriptionNumber", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ListSubContentSets200 is the success response", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/ContentSet" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all content sets for a subscription", + "tags": [ + "subscription" + ] + } + }, + "/subscriptions/{SubscriptionNumber}/systems": { + "get": { + "description": "The default and max results in a response are 100.", + "operationId": "listSubSystems", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SubscriptionNumber", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ListSubSystems200 is the success response", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/SystemList" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all systems consuming a subscription", + "tags": [ + "subscription" + ] + } + }, + "/systems": { + "get": { + "description": "The default and max number of results in a response are 100.", + "operationId": "listSystems", + "parameters": [ + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "description": "Filter Systems by System Name", + "in": "query", + "maxItems": 1, + "minItems": 1, + "name": "filter", + "type": "string" + }, + { + "description": "Filter Systems by a valid User Name, where User Name is the system owner and wildcard characters are not allowed", + "in": "query", + "name": "username", + "type": "string" + } + ], + "responses": { + "200": { + "description": "ListSystems200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/systemList" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all systems for a user", + "tags": [ + "system" + ] + } + }, + "/systems/{SystemUUID}": { + "delete": { + "description": "The default success response will be 204", + "operationId": "removeSystem", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "Successfully removed" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + }, + "504": { + "$ref": "#/responses/GatewayTimeout" + } + }, + "summary": "Remove system profile", + "tags": [ + "system" + ] + }, + "get": { + "description": "Sam \u0026 Satellite systems are unsupported system types.", + "operationId": "showSystem", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + }, + { + "collectionFormat": "csv", + "description": "Show more details about a system", + "in": "query", + "items": { + "enum": [ + "facts", + "entitlements", + "installedProducts" + ], + "type": "string" + }, + "maxItems": 3, + "minItems": 1, + "name": "include", + "type": "array" + } + ], + "responses": { + "200": { + "description": "ShowSystem200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/ShowSystem" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Get a system specified by UUID.", + "tags": [ + "system" + ] + } + }, + "/systems/{SystemUUID}/entitlements": { + "post": { + "description": "The default success response will be 200.\n\nSam \u0026 Satellite systems are unsupported system types.", + "operationId": "attachEntitlement", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + }, + { + "in": "query", + "maxItems": 1, + "minItems": 1, + "name": "pool", + "required": true, + "type": "string" + }, + { + "description": "quantity you want to attach", + "in": "query", + "name": "quantity", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "AttachedEntitlement200 is the success response", + "schema": { + "properties": { + "body": { + "$ref": "#/definitions/AttachEntitlement" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Attach entitlement to system", + "tags": [ + "system" + ] + } + }, + "/systems/{SystemUUID}/errata": { + "get": { + "description": "The default and max number of results in a response are 100.", + "operationId": "listSystemErrata", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "list of advisories", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/ErratumForSystem" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all applicable errata for a system", + "tags": [ + "system" + ] + } + }, + "/systems/{SystemUUID}/packages": { + "get": { + "description": "The default and max number of results in a response are 1000.", + "operationId": "listSystemPackages", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + }, + { + "description": "Show errata details for packages", + "enum": [ + true, + false + ], + "in": "query", + "name": "errata_detail", + "type": "boolean" + }, + { + "description": "Show upgradable packages only. Also accepts 'upgradable' as valid query.", + "enum": [ + true, + false + ], + "in": "query", + "name": "upgradeable", + "type": "boolean" + }, + { + "description": "Filter packages", + "in": "query", + "name": "filter", + "type": "string" + } + ], + "responses": { + "200": { + "description": "list of packages", + "schema": { + "properties": { + "body": { + "items": { + "$ref": "#/definitions/PackageForSystem" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/definitions/APIPageParam" + } + }, + "type": "object" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all packages for a system", + "tags": [ + "system" + ] + } + }, + "/systems/{SystemUUID}/pools": { + "get": { + "description": "The default and max number of results in a response are 50.", + "operationId": "listSystemPools", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + }, + { + "description": "max number of results you want", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "index from which you want next items", + "in": "query", + "name": "offset", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "ListSystemPools200 is the success response", + "schema": { + "$ref": "#/definitions/poolsListMock" + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "List all pools for a system", + "tags": [ + "system" + ] + } + }, + "/systems/{SystemUUID}/{EntitlementID}": { + "delete": { + "description": "The default success response will be 204.", + "operationId": "removeSystemEntitlement", + "parameters": [ + { + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "SystemUUID", + "required": true, + "type": "string" + }, + { + "description": "Remove an entitlement from a system", + "in": "path", + "maxItems": 1, + "minItems": 1, + "name": "EntitlementID", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "Successfully removed" + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "403": { + "$ref": "#/responses/Forbidden" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/InternalServerError" + } + }, + "summary": "Remove entitlement from the system", + "tags": [ + "system" + ] + } + } + }, + "produces": [ + "application/json" + ], + "responses": { + "Accepted": { + "description": "Accepted: The request has been accepted for processing, but the processing has not been completed." + }, + "BadRequest": { + "description": "BadRequest error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + }, + "Forbidden": { + "description": "Forbidden error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + }, + "GatewayTimeout": { + "description": "GatewayTimeout error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + }, + "InternalServerError": { + "description": "InternalServerError error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + }, + "NoContent": { + "description": "No Content" + }, + "NotAcceptable": { + "description": "NotAcceptable error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + }, + "NotFound": { + "description": "NotFound error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + }, + "Unauthorized": { + "description": "Unauthorized error", + "schema": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "type": "object" + } + } + }, + "schemes": [ + "https" + ], + "security": [ + { + "Bearer": [] + } + ], + "securityDefinitions": { + "Bearer": { + "description": "Bearer token for authorized user", + "in": "header", + "name": "Authorization", + "type": "apiKey" + } + }, + "swagger": "2.0", + "tags": [ + { + "name": "allocation" + }, + { + "name": "cloudaccess" + }, + { + "name": "errata" + }, + { + "name": "images" + }, + { + "name": "packages" + }, + { + "name": "subscription" + }, + { + "name": "system" + } + ] +} \ No newline at end of file From 89f31eb83459b8bfbd5bdbc8d2d88a0dcfea1700 Mon Sep 17 00:00:00 2001 From: Adam Robinson Date: Tue, 10 May 2022 17:43:08 -0400 Subject: [PATCH 2/4] fix name of the name field still broken :facepalm: --- RHSM-API_v1.264.0.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RHSM-API_v1.264.0.json b/RHSM-API_v1.264.0.json index ec000f4..2d5155e 100644 --- a/RHSM-API_v1.264.0.json +++ b/RHSM-API_v1.264.0.json @@ -1315,7 +1315,7 @@ { "description": "must be less than 100 characters and use only numbers, letters, underscores, hyphens, and periods", "in": "query", - "name": "Name", + "name": "name", "required": true, "type": "string" }, From e98fb2af2570feb77163d51507ccb9de511c6328 Mon Sep 17 00:00:00 2001 From: Adam Robinson Date: Tue, 10 May 2022 17:46:59 -0400 Subject: [PATCH 3/4] remove example causing validation error --- RHSM-API_v1.264.0.json | 1 - 1 file changed, 1 deletion(-) diff --git a/RHSM-API_v1.264.0.json b/RHSM-API_v1.264.0.json index 2d5155e..6f6fb73 100644 --- a/RHSM-API_v1.264.0.json +++ b/RHSM-API_v1.264.0.json @@ -2859,7 +2859,6 @@ "parameters": [ { "description": "Request for system purpose attributes in response", - "example": "system_purpose_attributes", "in": "query", "name": "include", "type": "string" From e5561e5e3b507afc6235475c3a96392a40626cc0 Mon Sep 17 00:00:00 2001 From: Adam Robinson Date: Tue, 10 May 2022 17:57:23 -0400 Subject: [PATCH 4/4] regenerate to 1.264.0 openapi-generator generate -i RHSM-API_v1.264.0.json -g go -o . -ppackageName=gorhsm,withGoCodegenComment=true --- .openapi-generator/FILES | 6 + .openapi-generator/VERSION | 2 +- README.md | 39 +- api/openapi.yaml | 324 +++++-- api_allocation.go | 842 ++++++++++-------- api_cloudaccess.go | 264 +++--- api_errata.go | 202 ++--- api_images.go | 258 +++++- api_organization.go | 60 +- api_packages.go | 128 ++- api_subscription.go | 130 ++- api_system.go | 318 ++++--- client.go | 49 +- configuration.go | 2 +- docs/AllocationApi.md | 208 +++-- docs/CloudaccessApi.md | 28 +- docs/ErrataApi.md | 20 +- docs/ImageForVersionArch.md | 186 ++++ docs/ImagesApi.md | 82 +- docs/InlineObject4.md | 4 +- docs/InlineResponse20010.md | 34 +- docs/InlineResponse20011.md | 34 +- docs/InlineResponse20012.md | 34 +- docs/InlineResponse20013.md | 8 +- docs/InlineResponse20014.md | 8 +- docs/InlineResponse20015.md | 8 +- docs/InlineResponse20016.md | 34 +- docs/InlineResponse20017.md | 8 +- docs/InlineResponse20018.md | 34 +- docs/InlineResponse20019.md | 8 +- docs/InlineResponse20020.md | 82 ++ docs/InlineResponse2009.md | 8 +- docs/OrgSimpleContentAccess.md | 26 + docs/OrganizationApi.md | 17 +- docs/PackagesApi.md | 24 +- docs/SubscriptionApi.md | 30 +- docs/SystemApi.md | 62 +- docs/SystemPurposeAttributes.md | 108 +++ git_push.sh | 7 +- go.mod | 11 +- go.sum | 4 +- model_add_provider_account.go | 2 +- model_allocation.go | 2 +- model_allocation_details.go | 2 +- model_allocation_summary.go | 2 +- model_allocation_version.go | 2 +- model_api_page_param.go | 2 +- model_attach_entitlement.go | 2 +- model_content_set.go | 2 +- model_content_set_arch_mock.go | 12 +- model_detail_response.go | 10 +- model_download_link.go | 2 +- model_enabled_cloud_access_provider.go | 22 +- model_enabled_product.go | 14 +- model_enabled_provider_account.go | 16 +- model_entitlements_attached_response.go | 14 +- model_entitlements_attached_response_value.go | 2 +- model_errata_applicability_counts.go | 2 +- model_errata_count.go | 2 +- model_erratum_details.go | 48 +- model_erratum_for_system.go | 2 +- model_erratum_in_content_set.go | 2 +- model_error_details.go | 2 +- model_export_job_response.go | 2 +- model_export_response.go | 2 +- model_facts.go | 2 +- model_gold_image_status.go | 2 +- model_image_for_version_arch.go | 294 ++++++ model_image_in_content_set.go | 2 +- model_inline_object.go | 2 +- model_inline_object_1.go | 2 +- model_inline_object_2.go | 2 +- model_inline_object_3.go | 2 +- model_inline_object_4.go | 6 +- model_inline_object_5.go | 10 +- model_inline_response_200.go | 10 +- model_inline_response_200_1.go | 2 +- model_inline_response_200_10.go | 50 +- model_inline_response_200_11.go | 54 +- model_inline_response_200_12.go | 51 +- model_inline_response_200_13.go | 21 +- model_inline_response_200_14.go | 18 +- model_inline_response_200_15.go | 19 +- model_inline_response_200_16.go | 55 +- model_inline_response_200_17.go | 14 +- model_inline_response_200_18.go | 50 +- model_inline_response_200_19.go | 20 +- model_inline_response_200_2.go | 10 +- model_inline_response_200_20.go | 149 ++++ model_inline_response_200_3.go | 2 +- model_inline_response_200_4.go | 2 +- model_inline_response_200_5.go | 2 +- model_inline_response_200_6.go | 10 +- model_inline_response_200_7.go | 2 +- model_inline_response_200_8.go | 12 +- model_inline_response_200_9.go | 18 +- model_inline_response_202.go | 2 +- model_inline_response_307.go | 2 +- model_inline_response_400.go | 2 +- model_installed_products.go | 2 +- model_my_errata_list_mock.go | 10 +- model_my_erratum.go | 2 +- model_ongoing_export_job_response.go | 2 +- model_org_simple_content_access.go | 44 +- model_package_detail.go | 36 +- model_package_for_system.go | 22 +- model_package_for_system_advisories.go | 2 +- model_pkg_content_set_arch.go | 38 +- model_pkg_details.go | 36 +- model_pkg_list_mock.go | 12 +- model_pool.go | 2 +- model_pool_detail.go | 2 +- model_pools_list_mock.go | 10 +- model_reference.go | 2 +- model_show_system.go | 2 +- model_system.go | 2 +- model_system_list.go | 2 +- model_system_list_mock.go | 10 +- model_system_purpose_attributes.go | 185 ++++ response.go | 2 +- utils.go | 2 +- 121 files changed, 3456 insertions(+), 1783 deletions(-) create mode 100644 docs/ImageForVersionArch.md create mode 100644 docs/InlineResponse20020.md create mode 100644 docs/SystemPurposeAttributes.md create mode 100644 model_image_for_version_arch.go create mode 100644 model_inline_response_200_20.go create mode 100644 model_system_purpose_attributes.go diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 34663ff..5ccc26a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -41,6 +41,7 @@ docs/ExportJobResponse.md docs/ExportResponse.md docs/Facts.md docs/GoldImageStatus.md +docs/ImageForVersionArch.md docs/ImageInContentSet.md docs/ImagesApi.md docs/InlineObject.md @@ -62,6 +63,7 @@ docs/InlineResponse20017.md docs/InlineResponse20018.md docs/InlineResponse20019.md docs/InlineResponse2002.md +docs/InlineResponse20020.md docs/InlineResponse2003.md docs/InlineResponse2004.md docs/InlineResponse2005.md @@ -95,6 +97,7 @@ docs/System.md docs/SystemApi.md docs/SystemList.md docs/SystemListMock.md +docs/SystemPurposeAttributes.md git_push.sh go.mod go.sum @@ -124,6 +127,7 @@ model_export_job_response.go model_export_response.go model_facts.go model_gold_image_status.go +model_image_for_version_arch.go model_image_in_content_set.go model_inline_object.go model_inline_object_1.go @@ -144,6 +148,7 @@ model_inline_response_200_17.go model_inline_response_200_18.go model_inline_response_200_19.go model_inline_response_200_2.go +model_inline_response_200_20.go model_inline_response_200_3.go model_inline_response_200_4.go model_inline_response_200_5.go @@ -173,5 +178,6 @@ model_show_system.go model_system.go model_system_list.go model_system_list_mock.go +model_system_purpose_attributes.go response.go utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 8044406..1e20ec3 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.1 \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/README.md b/README.md index 8e68af2..94a84ed 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ API for Red Hat Subscription Management ## 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.196.0 +- API version: 1.264.0 - Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://access.redhat.com/support/cases/](https://access.redhat.com/support/cases/) @@ -23,7 +23,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import sw "./gorhsm" +import gorhsm "github.com/GIT_USER_ID/GIT_REPO_ID" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -41,7 +41,7 @@ Default configuration comes with `Servers` field that contains server objects as 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) +ctx := context.WithValue(context.Background(), gorhsm.ContextServerIndex, 1) ``` ### Templated Server URL @@ -49,7 +49,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) 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{ +ctx := context.WithValue(context.Background(), gorhsm.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -59,14 +59,14 @@ Note, enum values are always validated and all unused variables are silently ign ### 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. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` -ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ +ctx := context.WithValue(context.Background(), gorhsm.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), gorhsm.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, @@ -79,19 +79,20 @@ All URIs are relative to *https://api.access.redhat.com/management/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AllocationApi* | [**AttachEntitlementAllocation**](docs/AllocationApi.md#attachentitlementallocation) | **Post** /allocations/{AllocationUUID}/entitlements | Attach entitlement to allocation +*AllocationApi* | [**AttachEntitlementAllocation**](docs/AllocationApi.md#attachentitlementallocation) | **Post** /allocations/{uuid}/entitlements | Attach entitlement to allocation *AllocationApi* | [**CreateSatellite**](docs/AllocationApi.md#createsatellite) | **Post** /allocations | Create Satellite -*AllocationApi* | [**ExportAllocation**](docs/AllocationApi.md#exportallocation) | **Get** /allocations/{AllocationUUID}/export | Trigger allocation manifest export -*AllocationApi* | [**ExportJobAllocation**](docs/AllocationApi.md#exportjoballocation) | **Get** /allocations/{AllocationUUID}/exportJob/{ExportJobID} | Check status of allocation manifest export -*AllocationApi* | [**GetExportAllocation**](docs/AllocationApi.md#getexportallocation) | **Get** /allocations/{AllocationUUID}/export/{ExportID} | Download allocation manifest -*AllocationApi* | [**ListAllocationPools**](docs/AllocationApi.md#listallocationpools) | **Get** /allocations/{AllocationUUID}/pools | List all pools for an allocation +*AllocationApi* | [**ExportAllocation**](docs/AllocationApi.md#exportallocation) | **Get** /allocations/{uuid}/export | Trigger allocation manifest export +*AllocationApi* | [**ExportJobAllocation**](docs/AllocationApi.md#exportjoballocation) | **Get** /allocations/{uuid}/exportJob/{ExportJobID} | Check status of allocation manifest export +*AllocationApi* | [**GetExportAllocation**](docs/AllocationApi.md#getexportallocation) | **Get** /allocations/{uuid}/export/{ExportID} | Download allocation manifest +*AllocationApi* | [**ListAllocationPools**](docs/AllocationApi.md#listallocationpools) | **Get** /allocations/{uuid}/pools | List all pools for an allocation *AllocationApi* | [**ListAllocations**](docs/AllocationApi.md#listallocations) | **Get** /allocations | List all allocations for a user *AllocationApi* | [**ListVersionsAllocation**](docs/AllocationApi.md#listversionsallocation) | **Get** /allocations/versions | List Satellite versions -*AllocationApi* | [**RemoveAllocation**](docs/AllocationApi.md#removeallocation) | **Delete** /allocations/{AllocationUUID} | Remove allocation profile -*AllocationApi* | [**RemoveAllocationEntitlement**](docs/AllocationApi.md#removeallocationentitlement) | **Delete** /allocations/{AllocationUUID}/{EntitlementID} | Remove entitlement from the allocation -*AllocationApi* | [**ShowAllocation**](docs/AllocationApi.md#showallocation) | **Get** /allocations/{AllocationUUID} | Get an allocation by UUID -*AllocationApi* | [**UpdateAllocation**](docs/AllocationApi.md#updateallocation) | **Put** /allocations/{AllocationUUID} | Update an allocation -*AllocationApi* | [**UpdateEntitlementAllocation**](docs/AllocationApi.md#updateentitlementallocation) | **Put** /allocations/{AllocationUUID}/entitlements/{EntitlementUUID} | Update attached entitlement to allocation +*AllocationApi* | [**RemoveAllocation**](docs/AllocationApi.md#removeallocation) | **Delete** /allocations/{uuid} | Remove allocation profile +*AllocationApi* | [**RemoveAllocationEntitlement**](docs/AllocationApi.md#removeallocationentitlement) | **Delete** /allocations/{uuid}/entitlements/{EntitlementID} | Remove entitlement from the allocation +*AllocationApi* | [**RemoveAllocationEntitlementDeprecated**](docs/AllocationApi.md#removeallocationentitlementdeprecated) | **Delete** /allocations/{uuid}/{EntitlementID} | Remove entitlement from the allocation +*AllocationApi* | [**ShowAllocation**](docs/AllocationApi.md#showallocation) | **Get** /allocations/{uuid} | Get an allocation by UUID +*AllocationApi* | [**UpdateAllocation**](docs/AllocationApi.md#updateallocation) | **Put** /allocations/{uuid} | Update an allocation +*AllocationApi* | [**UpdateEntitlementAllocation**](docs/AllocationApi.md#updateentitlementallocation) | **Put** /allocations/{uuid}/entitlements/{EntitlementID} | Update attached entitlement to allocation *CloudaccessApi* | [**AddProviderAccounts**](docs/CloudaccessApi.md#addprovideraccounts) | **Post** /cloud_access_providers/{ProviderShortName}/accounts | Add accounts for a provider *CloudaccessApi* | [**EnableGoldImages**](docs/CloudaccessApi.md#enablegoldimages) | **Post** /cloud_access_providers/{ProviderShortName}/goldimage | Enable Gold image access *CloudaccessApi* | [**ListEnabledCloudAccessProviders**](docs/CloudaccessApi.md#listenabledcloudaccessproviders) | **Get** /cloud_access_providers/enabled | List all enabled cloud access providers for a user @@ -105,6 +106,7 @@ Class | Method | HTTP request | Description *ErrataApi* | [**ListErratumSystems**](docs/ErrataApi.md#listerratumsystems) | **Get** /errata/{AdvisoryID}/systems | List all systems for an advisory *ErrataApi* | [**ShowErratum**](docs/ErrataApi.md#showerratum) | **Get** /errata/{AdvisoryID} | Get the details of an advisory *ImagesApi* | [**DownloadImage**](docs/ImagesApi.md#downloadimage) | **Get** /images/{checksum}/download | Download an image by its SHA256 checksum +*ImagesApi* | [**ListImageDownloadsByVersionArch**](docs/ImagesApi.md#listimagedownloadsbyversionarch) | **Get** /images/rhel/{Version}/{Arch} | List RHEL image downloads by version and architecture. *ImagesApi* | [**ListImagesByContentSet**](docs/ImagesApi.md#listimagesbycontentset) | **Get** /images/cset/{ContentSet} | List available images in a content set *OrganizationApi* | [**CheckOrgSCACapability**](docs/OrganizationApi.md#checkorgscacapability) | **Get** /organization | Get details of the user's organization *PackagesApi* | [**DownloadPackage**](docs/PackagesApi.md#downloadpackage) | **Get** /packages/{checksum}/download | Download a package by its SHA256 checksum @@ -151,6 +153,7 @@ Class | Method | HTTP request | Description - [ExportResponse](docs/ExportResponse.md) - [Facts](docs/Facts.md) - [GoldImageStatus](docs/GoldImageStatus.md) + - [ImageForVersionArch](docs/ImageForVersionArch.md) - [ImageInContentSet](docs/ImageInContentSet.md) - [InlineObject](docs/InlineObject.md) - [InlineObject1](docs/InlineObject1.md) @@ -171,6 +174,7 @@ Class | Method | HTTP request | Description - [InlineResponse20018](docs/InlineResponse20018.md) - [InlineResponse20019](docs/InlineResponse20019.md) - [InlineResponse2002](docs/InlineResponse2002.md) + - [InlineResponse20020](docs/InlineResponse20020.md) - [InlineResponse2003](docs/InlineResponse2003.md) - [InlineResponse2004](docs/InlineResponse2004.md) - [InlineResponse2005](docs/InlineResponse2005.md) @@ -200,6 +204,7 @@ Class | Method | HTTP request | Description - [System](docs/System.md) - [SystemList](docs/SystemList.md) - [SystemListMock](docs/SystemListMock.md) + - [SystemPurposeAttributes](docs/SystemPurposeAttributes.md) ## Documentation For Authorization diff --git a/api/openapi.yaml b/api/openapi.yaml index 8038b77..68fb358 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4,7 +4,7 @@ info: url: https://access.redhat.com/support/cases/ description: API for Red Hat Subscription Management title: RHSM-API - version: 1.196.0 + version: 1.264.0 servers: - url: https://api.access.redhat.com/management/v1 security: @@ -182,7 +182,7 @@ paths: summary: List Satellite versions tags: - allocation - /allocations/{AllocationUUID}: + /allocations/{uuid}: delete: description: |- The default success response will be 204 @@ -191,7 +191,7 @@ paths: operationId: removeAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -253,7 +253,7 @@ paths: operationId: showAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -314,7 +314,7 @@ paths: operationId: updateAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -368,12 +368,13 @@ paths: tags: - allocation x-codegen-request-body-name: allocation - /allocations/{AllocationUUID}/entitlements: + /allocations/{uuid}/entitlements: post: description: |- The default success response will be 200. - System, RHUI, Hypervisor are unsupported allocation types + System, RHUI, Hypervisor are unsupported allocation types. + SAM 1.3 or higher, and Satellite 5.6 versions are supported. operationId: attachEntitlementAllocation parameters: - in: query @@ -387,7 +388,7 @@ paths: schema: type: integer - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -431,21 +432,72 @@ paths: summary: Attach entitlement to allocation tags: - allocation - /allocations/{AllocationUUID}/entitlements/{EntitlementUUID}: + /allocations/{uuid}/entitlements/{EntitlementID}: + delete: + description: The default success response will be 204. + operationId: removeAllocationEntitlement + parameters: + - in: path + name: uuid + required: true + schema: + type: string + - description: Remove an entitlement from an allocation + in: path + name: EntitlementID + required: true + schema: + type: string + responses: + "204": + content: {} + description: Successfully removed + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: BadRequest error + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: Unauthorized error + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: Forbidden error + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: NotFound error + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: InternalServerError error + summary: Remove entitlement from the allocation + tags: + - allocation put: description: |- The default success response will be 200. - System, RHUI, Hypervisor are unsupported allocation types operationId: updateEntitlementAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string - in: path - name: EntitlementUUID + name: EntitlementID required: true schema: type: string @@ -462,7 +514,7 @@ paths: application/json: schema: $ref: '#/components/schemas/inline_response_200_3' - description: UpdateEntitlement200 is the success response + description: Success response "400": content: application/json: @@ -496,16 +548,16 @@ paths: summary: Update attached entitlement to allocation tags: - allocation - /allocations/{AllocationUUID}/export: + /allocations/{uuid}/export: get: description: |- Starts job to generate export for an allocation. To check the status of the export job visit the href in the response. - System, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower, and Satellite 5 versions are unsupported. + System, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower and Satellite 5.9 or lower versions are unsupported. operationId: exportAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -549,7 +601,7 @@ paths: summary: Trigger allocation manifest export tags: - allocation - /allocations/{AllocationUUID}/export/{ExportID}: + /allocations/{uuid}/export/{ExportID}: get: description: |- Success response contains a zip file. The link is one-time download and expires after one try. Trigger export job to get another download link. @@ -558,7 +610,7 @@ paths: operationId: getExportAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -609,13 +661,13 @@ paths: summary: Download allocation manifest tags: - allocation - /allocations/{AllocationUUID}/exportJob/{ExportJobID}: + /allocations/{uuid}/exportJob/{ExportJobID}: get: description: Returns export download link in response. operationId: exportJobAllocation parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -677,9 +729,10 @@ paths: summary: Check status of allocation manifest export tags: - allocation - /allocations/{AllocationUUID}/pools: + /allocations/{uuid}/pools: get: - description: System, RHUI, Hypervisor are unsupported allocation types + description: System, RHUI, Hypervisor are unsupported allocation types. SAM + 1.3 or higher, and Satellite 5.6 versions are supported. operationId: listAllocationPools parameters: - description: max number of results you want @@ -700,7 +753,7 @@ paths: - true type: boolean - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -744,13 +797,14 @@ paths: summary: List all pools for an allocation tags: - allocation - /allocations/{AllocationUUID}/{EntitlementID}: + /allocations/{uuid}/{EntitlementID}: delete: + deprecated: true description: The default success response will be 204. - operationId: removeAllocationEntitlement + operationId: removeAllocationEntitlementDeprecated parameters: - in: path - name: AllocationUUID + name: uuid required: true schema: type: string @@ -1104,9 +1158,15 @@ paths: - AWS - AWS GovCloud - ACS China + - Microsoft Azure + - Google Cloud Provider + + This endpoint accepts a cloud instance "identity" document and "signature" from the cloud provider's metadata service. Use the following links for more info on how to obtain these: + - For AWS: [EC2 Instance Identity Document](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) and [Signature](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-rsa2048.html) + - For Azure: [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) and [Signature](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux#attested-data) + - For GCP: [Compute Engine Instance Identity JWT token](https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature). Note: Please use "https://subscription.rhsm.redhat.com:443/subscription" as value for "audience" query parameter and "full" as value for "format" query parameter while generating the token - This endpoint accepts a cloud instance identity document and signature from the cloud provider's metadata service, such as the [EC2 Metadata Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) int the case of AWS. An HTTP 400 response will be returned if the cloud provider does not support automatic registration, the signature of the document cannot be verified, the cloud provider account has already been verified for a different Red Hat account, or if the account in the instance metadata does not match the provided account ID. @@ -1121,6 +1181,8 @@ paths: - AWS - AGOV - ACN + - MSAZ + - GCE type: string - in: path name: AccountID @@ -1134,10 +1196,12 @@ paths: schema: properties: identity: - description: base64-encoded cloud instance metadata + description: base64-encoded cloud instance metadata. For GCE, please + use the instance identity token (JWT) as it is. type: string signature: - description: base64-encoded cloud instance metadata signature + description: base64-encoded cloud instance metadata signature. For + GCE, please omit this field. type: string required: - identity @@ -1608,6 +1672,65 @@ paths: summary: List available images in a content set tags: - images + /images/rhel/{Version}/{Arch}: + get: + description: | + List all the available images for the given version and architecture. The Version parameter is expected to be a valid RHEL version. Example: 8.1, 8.2 etc. + The Arch parameter should be one of the valid RHEL architectures. Example: x86_64, aarch64 etc. + The user requesting the endpoint is expected to have Download permission (UGC). + If the user is entitled to an image, a "downloadHref" attribute is added in the image response object which links to image download API. + operationId: listImageDownloadsByVersionArch + parameters: + - in: path + name: Version + required: true + schema: + type: string + - in: path + name: Arch + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_9' + description: A JSON response object containing image downloads list. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: BadRequest error + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: Unauthorized error + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: Forbidden error + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: NotFound error + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400' + description: InternalServerError error + summary: List RHEL image downloads by version and architecture. + tags: + - images /images/{checksum}/download: get: description: | @@ -1669,12 +1792,18 @@ paths: get: description: Show Simple Content Access details of user's organization operationId: checkOrgSCACapability + parameters: + - description: Request for system purpose attributes in response + in: query + name: include + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_9' + $ref: '#/components/schemas/inline_response_200_10' description: Organization details "400": content: @@ -1750,7 +1879,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_10' + $ref: '#/components/schemas/inline_response_200_11' description: ListPackagesByContentSetArch200 is the success response "400": content: @@ -1800,7 +1929,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_11' + $ref: '#/components/schemas/inline_response_200_12' description: ShowPackage200 is the success response "400": content: @@ -1912,7 +2041,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_12' + $ref: '#/components/schemas/inline_response_200_13' description: ListSubscriptions200 is the success response "400": content: @@ -1972,7 +2101,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_13' + $ref: '#/components/schemas/inline_response_200_14' description: ListSubContentSets200 is the success response "400": content: @@ -2032,7 +2161,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_14' + $ref: '#/components/schemas/inline_response_200_15' description: ListSubSystems200 is the success response "400": content: @@ -2098,7 +2227,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_15' + $ref: '#/components/schemas/inline_response_200_16' description: ListSystems200 is the success response "400": content: @@ -2215,7 +2344,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_16' + $ref: '#/components/schemas/inline_response_200_17' description: ShowSystem200 is the success response "400": content: @@ -2278,7 +2407,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_17' + $ref: '#/components/schemas/inline_response_200_18' description: AttachedEntitlement200 is the success response "400": content: @@ -2338,7 +2467,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_18' + $ref: '#/components/schemas/inline_response_200_19' description: list of advisories "400": content: @@ -2420,7 +2549,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_19' + $ref: '#/components/schemas/inline_response_200_20' description: list of packages "400": content: @@ -3391,6 +3520,24 @@ components: example: Requested type: string type: object + ImageForVersionArch: + description: Image Details for provided version and architecture. + properties: + arch: + type: string + checksum: + type: string + datePublished: + description: Date represents the date format used for API returns + example: 2006-01-02T15:04:05.000Z + type: string + downloadHref: + type: string + filename: + type: string + imageName: + type: string + type: object ImageInContentSet: description: Image Details in a content set image listing. example: @@ -3474,6 +3621,16 @@ components: type: object OrgSimpleContentAccess: example: + systemPurposeAttributes: + roles: + - roles + - roles + usage: + - usage + - usage + serviceLevel: + - serviceLevel + - serviceLevel simpleContentAccess: simpleContentAccess id: id simpleContentAccessCapable: true @@ -3484,6 +3641,8 @@ components: type: string simpleContentAccessCapable: type: boolean + systemPurposeAttributes: + $ref: '#/components/schemas/SystemPurposeAttributes' title: Organization Simple Content Access details. type: object PackageDetail: @@ -3803,6 +3962,32 @@ components: uuid: type: string type: object + SystemPurposeAttributes: + description: System purpose settings available to an organization + example: + roles: + - roles + - roles + usage: + - usage + - usage + serviceLevel: + - serviceLevel + - serviceLevel + properties: + roles: + items: + type: string + type: array + serviceLevel: + items: + type: string + type: array + usage: + items: + type: string + type: array + type: object contentSetArchMock: example: pagination: @@ -4371,10 +4556,12 @@ components: inline_object_4: properties: identity: - description: base64-encoded cloud instance metadata + description: base64-encoded cloud instance metadata. For GCE, please use + the instance identity token (JWT) as it is. type: string signature: - description: base64-encoded cloud instance metadata signature + description: base64-encoded cloud instance metadata signature. For GCE, + please omit this field. type: string required: - identity @@ -4461,14 +4648,45 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object + inline_response_200_9: + example: + body: + - datePublished: 2006-01-02T15:04:05.000Z + filename: filename + imageName: imageName + downloadHref: downloadHref + checksum: checksum + arch: arch + - datePublished: 2006-01-02T15:04:05.000Z + filename: filename + imageName: imageName + downloadHref: downloadHref + checksum: checksum + arch: arch + properties: + body: + items: + $ref: '#/components/schemas/ImageInContentSet' + type: array + type: object inline_response_307: properties: body: $ref: '#/components/schemas/DownloadLink' type: object - inline_response_200_9: + inline_response_200_10: example: body: + systemPurposeAttributes: + roles: + - roles + - roles + usage: + - usage + - usage + serviceLevel: + - serviceLevel + - serviceLevel simpleContentAccess: simpleContentAccess id: id simpleContentAccessCapable: true @@ -4476,7 +4694,7 @@ components: body: $ref: '#/components/schemas/OrgSimpleContentAccess' type: object - inline_response_200_10: + inline_response_200_11: example: pagination: offset: 5 @@ -4527,7 +4745,7 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object - inline_response_200_11: + inline_response_200_12: example: body: summary: summary @@ -4551,7 +4769,7 @@ components: body: $ref: '#/components/schemas/pkgDetails' type: object - inline_response_200_12: + inline_response_200_13: example: pagination: offset: 5 @@ -4603,7 +4821,7 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object - inline_response_200_13: + inline_response_200_14: example: pagination: offset: 5 @@ -4628,7 +4846,7 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object - inline_response_200_14: + inline_response_200_15: example: pagination: offset: 5 @@ -4659,7 +4877,7 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object - inline_response_200_15: + inline_response_200_16: example: pagination: offset: 5 @@ -4701,7 +4919,7 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object - inline_response_200_16: + inline_response_200_17: example: body: autoAttachSetting: true @@ -4756,7 +4974,7 @@ components: body: $ref: '#/components/schemas/ShowSystem' type: object - inline_response_200_17: + inline_response_200_18: example: body: autoAttachSetting: true @@ -4802,7 +5020,7 @@ components: body: $ref: '#/components/schemas/AttachEntitlement' type: object - inline_response_200_18: + inline_response_200_19: example: pagination: offset: 5 @@ -4829,7 +5047,7 @@ components: pagination: $ref: '#/components/schemas/APIPageParam' type: object - inline_response_200_19: + inline_response_200_20: example: pagination: offset: 5 diff --git a/api_allocation.go b/api_allocation.go index 5ac20d1..aefbea0 100644 --- a/api_allocation.go +++ b/api_allocation.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,27 +12,27 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // AllocationApiService AllocationApi service type AllocationApiService service type ApiAttachEntitlementAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - pool *string - allocationUUID string - quantity *int32 + ctx context.Context + ApiService *AllocationApiService + pool *string + uuid string + quantity *int32 } func (r ApiAttachEntitlementAllocationRequest) Pool(pool string) ApiAttachEntitlementAllocationRequest { @@ -46,7 +46,7 @@ func (r ApiAttachEntitlementAllocationRequest) Quantity(quantity int32) ApiAttac return r } -func (r ApiAttachEntitlementAllocationRequest) Execute() (InlineResponse2003, *_nethttp.Response, error) { +func (r ApiAttachEntitlementAllocationRequest) Execute() (*InlineResponse2003, *http.Response, error) { return r.ApiService.AttachEntitlementAllocationExecute(r) } @@ -55,43 +55,42 @@ AttachEntitlementAllocation Attach entitlement to allocation The default success response will be 200. -System, RHUI, Hypervisor are unsupported allocation types +System, RHUI, Hypervisor are unsupported allocation types. +SAM 1.3 or higher, and Satellite 5.6 versions are supported. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @return ApiAttachEntitlementAllocationRequest */ -func (a *AllocationApiService) AttachEntitlementAllocation(ctx _context.Context, allocationUUID string) ApiAttachEntitlementAllocationRequest { +func (a *AllocationApiService) AttachEntitlementAllocation(ctx context.Context, uuid string) ApiAttachEntitlementAllocationRequest { return ApiAttachEntitlementAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, } } // Execute executes the request // @return InlineResponse2003 -func (a *AllocationApiService) AttachEntitlementAllocationExecute(r ApiAttachEntitlementAllocationRequest) (InlineResponse2003, *_nethttp.Response, error) { +func (a *AllocationApiService) AttachEntitlementAllocationExecute(r ApiAttachEntitlementAllocationRequest) (*InlineResponse2003, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2003 + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2003 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.AttachEntitlementAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/entitlements" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/entitlements" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.pool == nil { return localVarReturnValue, nil, reportError("pool is required and must be specified") } @@ -131,7 +130,7 @@ func (a *AllocationApiService) AttachEntitlementAllocationExecute(r ApiAttachEnt } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -141,15 +140,15 @@ func (a *AllocationApiService) AttachEntitlementAllocationExecute(r ApiAttachEnt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -207,7 +206,7 @@ func (a *AllocationApiService) AttachEntitlementAllocationExecute(r ApiAttachEnt err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -218,7 +217,7 @@ func (a *AllocationApiService) AttachEntitlementAllocationExecute(r ApiAttachEnt } type ApiCreateSatelliteRequest struct { - ctx _context.Context + ctx context.Context ApiService *AllocationApiService name *string version *string @@ -234,7 +233,7 @@ func (r ApiCreateSatelliteRequest) Version(version string) ApiCreateSatelliteReq return r } -func (r ApiCreateSatelliteRequest) Execute() (InlineResponse2001, *_nethttp.Response, error) { +func (r ApiCreateSatelliteRequest) Execute() (*InlineResponse2001, *http.Response, error) { return r.ApiService.CreateSatelliteExecute(r) } @@ -245,10 +244,10 @@ Create Satellite by name and version(optional). Customers can use any version listed in the `/v1/allocations/versions` endpoint (use attribute `value`). If no version is specified, it will take the latest available version for Satellite. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateSatelliteRequest */ -func (a *AllocationApiService) CreateSatellite(ctx _context.Context) ApiCreateSatelliteRequest { +func (a *AllocationApiService) CreateSatellite(ctx context.Context) ApiCreateSatelliteRequest { return ApiCreateSatelliteRequest{ ApiService: a, ctx: ctx, @@ -257,26 +256,24 @@ func (a *AllocationApiService) CreateSatellite(ctx _context.Context) ApiCreateSa // Execute executes the request // @return InlineResponse2001 -func (a *AllocationApiService) CreateSatelliteExecute(r ApiCreateSatelliteRequest) (InlineResponse2001, *_nethttp.Response, error) { +func (a *AllocationApiService) CreateSatelliteExecute(r ApiCreateSatelliteRequest) (*InlineResponse2001, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2001 + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2001 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.CreateSatellite") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/allocations" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.name == nil { return localVarReturnValue, nil, reportError("name is required and must be specified") } @@ -316,7 +313,7 @@ func (a *AllocationApiService) CreateSatelliteExecute(r ApiCreateSatelliteReques } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -326,15 +323,15 @@ func (a *AllocationApiService) CreateSatelliteExecute(r ApiCreateSatelliteReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -392,7 +389,7 @@ func (a *AllocationApiService) CreateSatelliteExecute(r ApiCreateSatelliteReques err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -403,12 +400,12 @@ func (a *AllocationApiService) CreateSatelliteExecute(r ApiCreateSatelliteReques } type ApiExportAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string + ctx context.Context + ApiService *AllocationApiService + uuid string } -func (r ApiExportAllocationRequest) Execute() (InlineResponse2004, *_nethttp.Response, error) { +func (r ApiExportAllocationRequest) Execute() (*InlineResponse2004, *http.Response, error) { return r.ApiService.ExportAllocationExecute(r) } @@ -417,43 +414,41 @@ ExportAllocation Trigger allocation manifest export Starts job to generate export for an allocation. To check the status of the export job visit the href in the response. -System, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower, and Satellite 5 versions are unsupported. +System, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower and Satellite 5.9 or lower versions are unsupported. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @return ApiExportAllocationRequest */ -func (a *AllocationApiService) ExportAllocation(ctx _context.Context, allocationUUID string) ApiExportAllocationRequest { +func (a *AllocationApiService) ExportAllocation(ctx context.Context, uuid string) ApiExportAllocationRequest { return ApiExportAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, } } // Execute executes the request // @return InlineResponse2004 -func (a *AllocationApiService) ExportAllocationExecute(r ApiExportAllocationRequest) (InlineResponse2004, *_nethttp.Response, error) { +func (a *AllocationApiService) ExportAllocationExecute(r ApiExportAllocationRequest) (*InlineResponse2004, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2004 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2004 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.ExportAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/export" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/export" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -486,7 +481,7 @@ func (a *AllocationApiService) ExportAllocationExecute(r ApiExportAllocationRequ } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -496,15 +491,15 @@ func (a *AllocationApiService) ExportAllocationExecute(r ApiExportAllocationRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -562,7 +557,7 @@ func (a *AllocationApiService) ExportAllocationExecute(r ApiExportAllocationRequ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -573,13 +568,13 @@ func (a *AllocationApiService) ExportAllocationExecute(r ApiExportAllocationRequ } type ApiExportJobAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - exportJobID string + ctx context.Context + ApiService *AllocationApiService + uuid string + exportJobID string } -func (r ApiExportJobAllocationRequest) Execute() (InlineResponse2005, *_nethttp.Response, error) { +func (r ApiExportJobAllocationRequest) Execute() (*InlineResponse2005, *http.Response, error) { return r.ApiService.ExportJobAllocationExecute(r) } @@ -588,44 +583,42 @@ ExportJobAllocation Check status of allocation manifest export Returns export download link in response. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @param exportJobID @return ApiExportJobAllocationRequest */ -func (a *AllocationApiService) ExportJobAllocation(ctx _context.Context, allocationUUID string, exportJobID string) ApiExportJobAllocationRequest { +func (a *AllocationApiService) ExportJobAllocation(ctx context.Context, uuid string, exportJobID string) ApiExportJobAllocationRequest { return ApiExportJobAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, - exportJobID: exportJobID, + ApiService: a, + ctx: ctx, + uuid: uuid, + exportJobID: exportJobID, } } // Execute executes the request // @return InlineResponse2005 -func (a *AllocationApiService) ExportJobAllocationExecute(r ApiExportJobAllocationRequest) (InlineResponse2005, *_nethttp.Response, error) { +func (a *AllocationApiService) ExportJobAllocationExecute(r ApiExportJobAllocationRequest) (*InlineResponse2005, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2005 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2005 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.ExportJobAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/exportJob/{ExportJobID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"ExportJobID"+"}", _neturl.PathEscape(parameterToString(r.exportJobID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/exportJob/{ExportJobID}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ExportJobID"+"}", url.PathEscape(parameterToString(r.exportJobID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -658,7 +651,7 @@ func (a *AllocationApiService) ExportJobAllocationExecute(r ApiExportJobAllocati } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -668,15 +661,15 @@ func (a *AllocationApiService) ExportJobAllocationExecute(r ApiExportJobAllocati return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -744,7 +737,7 @@ func (a *AllocationApiService) ExportJobAllocationExecute(r ApiExportJobAllocati err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -755,13 +748,13 @@ func (a *AllocationApiService) ExportJobAllocationExecute(r ApiExportJobAllocati } type ApiGetExportAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - exportID string + ctx context.Context + ApiService *AllocationApiService + uuid string + exportID string } -func (r ApiGetExportAllocationRequest) Execute() ([]int32, *_nethttp.Response, error) { +func (r ApiGetExportAllocationRequest) Execute() ([]int32, *http.Response, error) { return r.ApiService.GetExportAllocationExecute(r) } @@ -772,44 +765,42 @@ Success response contains a zip file. The link is one-time download and expires Content-Type: application/zip - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @param exportID @return ApiGetExportAllocationRequest */ -func (a *AllocationApiService) GetExportAllocation(ctx _context.Context, allocationUUID string, exportID string) ApiGetExportAllocationRequest { +func (a *AllocationApiService) GetExportAllocation(ctx context.Context, uuid string, exportID string) ApiGetExportAllocationRequest { return ApiGetExportAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, - exportID: exportID, + ApiService: a, + ctx: ctx, + uuid: uuid, + exportID: exportID, } } // Execute executes the request // @return []int32 -func (a *AllocationApiService) GetExportAllocationExecute(r ApiGetExportAllocationRequest) ([]int32, *_nethttp.Response, error) { +func (a *AllocationApiService) GetExportAllocationExecute(r ApiGetExportAllocationRequest) ([]int32, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []int32 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []int32 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.GetExportAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/export/{ExportID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"ExportID"+"}", _neturl.PathEscape(parameterToString(r.exportID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/export/{ExportID}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ExportID"+"}", url.PathEscape(parameterToString(r.exportID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -842,7 +833,7 @@ func (a *AllocationApiService) GetExportAllocationExecute(r ApiGetExportAllocati } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -852,15 +843,15 @@ func (a *AllocationApiService) GetExportAllocationExecute(r ApiGetExportAllocati return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -918,7 +909,7 @@ func (a *AllocationApiService) GetExportAllocationExecute(r ApiGetExportAllocati err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -929,12 +920,12 @@ func (a *AllocationApiService) GetExportAllocationExecute(r ApiGetExportAllocati } type ApiListAllocationPoolsRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - limit *int32 - offset *int32 - future *bool + ctx context.Context + ApiService *AllocationApiService + uuid string + limit *int32 + offset *int32 + future *bool } // max number of results you want @@ -955,50 +946,48 @@ func (r ApiListAllocationPoolsRequest) Future(future bool) ApiListAllocationPool return r } -func (r ApiListAllocationPoolsRequest) Execute() (PoolsListMock, *_nethttp.Response, error) { +func (r ApiListAllocationPoolsRequest) Execute() (*PoolsListMock, *http.Response, error) { return r.ApiService.ListAllocationPoolsExecute(r) } /* ListAllocationPools List all pools for an allocation -System, RHUI, Hypervisor are unsupported allocation types +System, RHUI, Hypervisor are unsupported allocation types. SAM 1.3 or higher, and Satellite 5.6 versions are supported. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @return ApiListAllocationPoolsRequest */ -func (a *AllocationApiService) ListAllocationPools(ctx _context.Context, allocationUUID string) ApiListAllocationPoolsRequest { +func (a *AllocationApiService) ListAllocationPools(ctx context.Context, uuid string) ApiListAllocationPoolsRequest { return ApiListAllocationPoolsRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, } } // Execute executes the request // @return PoolsListMock -func (a *AllocationApiService) ListAllocationPoolsExecute(r ApiListAllocationPoolsRequest) (PoolsListMock, *_nethttp.Response, error) { +func (a *AllocationApiService) ListAllocationPoolsExecute(r ApiListAllocationPoolsRequest) (*PoolsListMock, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue PoolsListMock + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PoolsListMock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.ListAllocationPools") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/pools" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/pools" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -1040,7 +1029,7 @@ func (a *AllocationApiService) ListAllocationPoolsExecute(r ApiListAllocationPoo } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -1050,15 +1039,15 @@ func (a *AllocationApiService) ListAllocationPoolsExecute(r ApiListAllocationPoo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1116,7 +1105,7 @@ func (a *AllocationApiService) ListAllocationPoolsExecute(r ApiListAllocationPoo err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1127,7 +1116,7 @@ func (a *AllocationApiService) ListAllocationPoolsExecute(r ApiListAllocationPoo } type ApiListAllocationsRequest struct { - ctx _context.Context + ctx context.Context ApiService *AllocationApiService limit *int32 offset *int32 @@ -1150,7 +1139,7 @@ func (r ApiListAllocationsRequest) Type_(type_ string) ApiListAllocationsRequest return r } -func (r ApiListAllocationsRequest) Execute() (InlineResponse200, *_nethttp.Response, error) { +func (r ApiListAllocationsRequest) Execute() (*InlineResponse200, *http.Response, error) { return r.ApiService.ListAllocationsExecute(r) } @@ -1159,10 +1148,10 @@ ListAllocations List all allocations for a user The default and max number of results in a response are 100. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListAllocationsRequest */ -func (a *AllocationApiService) ListAllocations(ctx _context.Context) ApiListAllocationsRequest { +func (a *AllocationApiService) ListAllocations(ctx context.Context) ApiListAllocationsRequest { return ApiListAllocationsRequest{ ApiService: a, ctx: ctx, @@ -1171,26 +1160,24 @@ func (a *AllocationApiService) ListAllocations(ctx _context.Context) ApiListAllo // Execute executes the request // @return InlineResponse200 -func (a *AllocationApiService) ListAllocationsExecute(r ApiListAllocationsRequest) (InlineResponse200, *_nethttp.Response, error) { +func (a *AllocationApiService) ListAllocationsExecute(r ApiListAllocationsRequest) (*InlineResponse200, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse200 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse200 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.ListAllocations") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/allocations" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -1232,7 +1219,7 @@ func (a *AllocationApiService) ListAllocationsExecute(r ApiListAllocationsReques } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -1242,15 +1229,15 @@ func (a *AllocationApiService) ListAllocationsExecute(r ApiListAllocationsReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1308,7 +1295,7 @@ func (a *AllocationApiService) ListAllocationsExecute(r ApiListAllocationsReques err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1319,11 +1306,11 @@ func (a *AllocationApiService) ListAllocationsExecute(r ApiListAllocationsReques } type ApiListVersionsAllocationRequest struct { - ctx _context.Context + ctx context.Context ApiService *AllocationApiService } -func (r ApiListVersionsAllocationRequest) Execute() (InlineResponse2002, *_nethttp.Response, error) { +func (r ApiListVersionsAllocationRequest) Execute() (*InlineResponse2002, *http.Response, error) { return r.ApiService.ListVersionsAllocationExecute(r) } @@ -1332,10 +1319,10 @@ ListVersionsAllocation List Satellite versions Returns list of Satellite version 6.0 and above - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListVersionsAllocationRequest */ -func (a *AllocationApiService) ListVersionsAllocation(ctx _context.Context) ApiListVersionsAllocationRequest { +func (a *AllocationApiService) ListVersionsAllocation(ctx context.Context) ApiListVersionsAllocationRequest { return ApiListVersionsAllocationRequest{ ApiService: a, ctx: ctx, @@ -1344,26 +1331,24 @@ func (a *AllocationApiService) ListVersionsAllocation(ctx _context.Context) ApiL // Execute executes the request // @return InlineResponse2002 -func (a *AllocationApiService) ListVersionsAllocationExecute(r ApiListVersionsAllocationRequest) (InlineResponse2002, *_nethttp.Response, error) { +func (a *AllocationApiService) ListVersionsAllocationExecute(r ApiListVersionsAllocationRequest) (*InlineResponse2002, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2002 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2002 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.ListVersionsAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/allocations/versions" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1396,7 +1381,7 @@ func (a *AllocationApiService) ListVersionsAllocationExecute(r ApiListVersionsAl } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -1406,15 +1391,15 @@ func (a *AllocationApiService) ListVersionsAllocationExecute(r ApiListVersionsAl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1472,7 +1457,7 @@ func (a *AllocationApiService) ListVersionsAllocationExecute(r ApiListVersionsAl err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1483,10 +1468,10 @@ func (a *AllocationApiService) ListVersionsAllocationExecute(r ApiListVersionsAl } type ApiRemoveAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - force *bool + ctx context.Context + ApiService *AllocationApiService + uuid string + force *bool } // Deleting a subscription allocation can have significant impacts on your hosts and activation keys. We require a force parameter to make sure the delete operation is intentional. @@ -1495,7 +1480,7 @@ func (r ApiRemoveAllocationRequest) Force(force bool) ApiRemoveAllocationRequest return r } -func (r ApiRemoveAllocationRequest) Execute() (*_nethttp.Response, error) { +func (r ApiRemoveAllocationRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveAllocationExecute(r) } @@ -1506,39 +1491,37 @@ The default success response will be 204 System, RHUI, Hypervisor are unsupported allocation types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @return ApiRemoveAllocationRequest */ -func (a *AllocationApiService) RemoveAllocation(ctx _context.Context, allocationUUID string) ApiRemoveAllocationRequest { +func (a *AllocationApiService) RemoveAllocation(ctx context.Context, uuid string) ApiRemoveAllocationRequest { return ApiRemoveAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, } } // Execute executes the request -func (a *AllocationApiService) RemoveAllocationExecute(r ApiRemoveAllocationRequest) (*_nethttp.Response, error) { +func (a *AllocationApiService) RemoveAllocationExecute(r ApiRemoveAllocationRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.RemoveAllocation") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.force == nil { return nil, reportError("force is required and must be specified") } @@ -1575,7 +1558,7 @@ func (a *AllocationApiService) RemoveAllocationExecute(r ApiRemoveAllocationRequ } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -1585,15 +1568,15 @@ func (a *AllocationApiService) RemoveAllocationExecute(r ApiRemoveAllocationRequ return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1663,13 +1646,13 @@ func (a *AllocationApiService) RemoveAllocationExecute(r ApiRemoveAllocationRequ } type ApiRemoveAllocationEntitlementRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - entitlementID string + ctx context.Context + ApiService *AllocationApiService + uuid string + entitlementID string } -func (r ApiRemoveAllocationEntitlementRequest) Execute() (*_nethttp.Response, error) { +func (r ApiRemoveAllocationEntitlementRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveAllocationEntitlementExecute(r) } @@ -1678,42 +1661,202 @@ RemoveAllocationEntitlement Remove entitlement from the allocation The default success response will be 204. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @param entitlementID Remove an entitlement from an allocation @return ApiRemoveAllocationEntitlementRequest */ -func (a *AllocationApiService) RemoveAllocationEntitlement(ctx _context.Context, allocationUUID string, entitlementID string) ApiRemoveAllocationEntitlementRequest { +func (a *AllocationApiService) RemoveAllocationEntitlement(ctx context.Context, uuid string, entitlementID string) ApiRemoveAllocationEntitlementRequest { return ApiRemoveAllocationEntitlementRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, - entitlementID: entitlementID, + ApiService: a, + ctx: ctx, + uuid: uuid, + entitlementID: entitlementID, } } // Execute executes the request -func (a *AllocationApiService) RemoveAllocationEntitlementExecute(r ApiRemoveAllocationEntitlementRequest) (*_nethttp.Response, error) { +func (a *AllocationApiService) RemoveAllocationEntitlementExecute(r ApiRemoveAllocationEntitlementRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.RemoveAllocationEntitlement") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/allocations/{uuid}/entitlements/{EntitlementID}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"EntitlementID"+"}", url.PathEscape(parameterToString(r.entitlementID, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Bearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + 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 == 400 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v InlineResponse400 + 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, nil +} + +type ApiRemoveAllocationEntitlementDeprecatedRequest struct { + ctx context.Context + ApiService *AllocationApiService + uuid string + entitlementID string +} + +func (r ApiRemoveAllocationEntitlementDeprecatedRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAllocationEntitlementDeprecatedExecute(r) +} + +/* +RemoveAllocationEntitlementDeprecated Remove entitlement from the allocation + +The default success response will be 204. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid + @param entitlementID Remove an entitlement from an allocation + @return ApiRemoveAllocationEntitlementDeprecatedRequest + +Deprecated +*/ +func (a *AllocationApiService) RemoveAllocationEntitlementDeprecated(ctx context.Context, uuid string, entitlementID string) ApiRemoveAllocationEntitlementDeprecatedRequest { + return ApiRemoveAllocationEntitlementDeprecatedRequest{ + ApiService: a, + ctx: ctx, + uuid: uuid, + entitlementID: entitlementID, + } +} + +// Execute executes the request +// Deprecated +func (a *AllocationApiService) RemoveAllocationEntitlementDeprecatedExecute(r ApiRemoveAllocationEntitlementDeprecatedRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.RemoveAllocationEntitlementDeprecated") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/{EntitlementID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"EntitlementID"+"}", _neturl.PathEscape(parameterToString(r.entitlementID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/{EntitlementID}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"EntitlementID"+"}", url.PathEscape(parameterToString(r.entitlementID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1746,7 +1889,7 @@ func (a *AllocationApiService) RemoveAllocationEntitlementExecute(r ApiRemoveAll } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -1756,15 +1899,15 @@ func (a *AllocationApiService) RemoveAllocationEntitlementExecute(r ApiRemoveAll return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1824,10 +1967,10 @@ func (a *AllocationApiService) RemoveAllocationEntitlementExecute(r ApiRemoveAll } type ApiShowAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - include *string + ctx context.Context + ApiService *AllocationApiService + uuid string + include *string } // Show more details about a allocation @@ -1836,7 +1979,7 @@ func (r ApiShowAllocationRequest) Include(include string) ApiShowAllocationReque return r } -func (r ApiShowAllocationRequest) Execute() (InlineResponse2003, *_nethttp.Response, error) { +func (r ApiShowAllocationRequest) Execute() (*InlineResponse2003, *http.Response, error) { return r.ApiService.ShowAllocationExecute(r) } @@ -1845,41 +1988,39 @@ ShowAllocation Get an allocation by UUID System, RHUI, Hypervisor are unsupported allocation types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @return ApiShowAllocationRequest */ -func (a *AllocationApiService) ShowAllocation(ctx _context.Context, allocationUUID string) ApiShowAllocationRequest { +func (a *AllocationApiService) ShowAllocation(ctx context.Context, uuid string) ApiShowAllocationRequest { return ApiShowAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, } } // Execute executes the request // @return InlineResponse2003 -func (a *AllocationApiService) ShowAllocationExecute(r ApiShowAllocationRequest) (InlineResponse2003, *_nethttp.Response, error) { +func (a *AllocationApiService) ShowAllocationExecute(r ApiShowAllocationRequest) (*InlineResponse2003, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2003 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2003 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.ShowAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.include != nil { localVarQueryParams.Add("include", parameterToString(*r.include, "")) @@ -1915,7 +2056,7 @@ func (a *AllocationApiService) ShowAllocationExecute(r ApiShowAllocationRequest) } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -1925,15 +2066,15 @@ func (a *AllocationApiService) ShowAllocationExecute(r ApiShowAllocationRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1991,7 +2132,7 @@ func (a *AllocationApiService) ShowAllocationExecute(r ApiShowAllocationRequest) err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -2002,10 +2143,10 @@ func (a *AllocationApiService) ShowAllocationExecute(r ApiShowAllocationRequest) } type ApiUpdateAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - allocation *InlineObject + ctx context.Context + ApiService *AllocationApiService + uuid string + allocation *InlineObject } func (r ApiUpdateAllocationRequest) Allocation(allocation InlineObject) ApiUpdateAllocationRequest { @@ -2013,7 +2154,7 @@ func (r ApiUpdateAllocationRequest) Allocation(allocation InlineObject) ApiUpdat return r } -func (r ApiUpdateAllocationRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdateAllocationRequest) Execute() (*http.Response, error) { return r.ApiService.UpdateAllocationExecute(r) } @@ -2026,39 +2167,37 @@ Possible value for simpleContentAccess are: - enabled - disabled - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid @return ApiUpdateAllocationRequest */ -func (a *AllocationApiService) UpdateAllocation(ctx _context.Context, allocationUUID string) ApiUpdateAllocationRequest { +func (a *AllocationApiService) UpdateAllocation(ctx context.Context, uuid string) ApiUpdateAllocationRequest { return ApiUpdateAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, } } // Execute executes the request -func (a *AllocationApiService) UpdateAllocationExecute(r ApiUpdateAllocationRequest) (*_nethttp.Response, error) { +func (a *AllocationApiService) UpdateAllocationExecute(r ApiUpdateAllocationRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.UpdateAllocation") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -2093,7 +2232,7 @@ func (a *AllocationApiService) UpdateAllocationExecute(r ApiUpdateAllocationRequ } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -2103,15 +2242,15 @@ func (a *AllocationApiService) UpdateAllocationExecute(r ApiUpdateAllocationRequ return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -2171,11 +2310,11 @@ func (a *AllocationApiService) UpdateAllocationExecute(r ApiUpdateAllocationRequ } type ApiUpdateEntitlementAllocationRequest struct { - ctx _context.Context - ApiService *AllocationApiService - allocationUUID string - entitlementUUID string - quantity *int32 + ctx context.Context + ApiService *AllocationApiService + uuid string + entitlementID string + quantity *int32 } // maxItem: quantity must be less than or equal to the maximum number of allowed entitlements in the entitlement pool minItem: 1 @@ -2184,7 +2323,7 @@ func (r ApiUpdateEntitlementAllocationRequest) Quantity(quantity int32) ApiUpdat return r } -func (r ApiUpdateEntitlementAllocationRequest) Execute() (InlineResponse2003, *_nethttp.Response, error) { +func (r ApiUpdateEntitlementAllocationRequest) Execute() (*InlineResponse2003, *http.Response, error) { return r.ApiService.UpdateEntitlementAllocationExecute(r) } @@ -2192,47 +2331,44 @@ func (r ApiUpdateEntitlementAllocationRequest) Execute() (InlineResponse2003, *_ UpdateEntitlementAllocation Update attached entitlement to allocation The default success response will be 200. - System, RHUI, Hypervisor are unsupported allocation types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param allocationUUID - @param entitlementUUID + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid + @param entitlementID @return ApiUpdateEntitlementAllocationRequest */ -func (a *AllocationApiService) UpdateEntitlementAllocation(ctx _context.Context, allocationUUID string, entitlementUUID string) ApiUpdateEntitlementAllocationRequest { +func (a *AllocationApiService) UpdateEntitlementAllocation(ctx context.Context, uuid string, entitlementID string) ApiUpdateEntitlementAllocationRequest { return ApiUpdateEntitlementAllocationRequest{ - ApiService: a, - ctx: ctx, - allocationUUID: allocationUUID, - entitlementUUID: entitlementUUID, + ApiService: a, + ctx: ctx, + uuid: uuid, + entitlementID: entitlementID, } } // Execute executes the request // @return InlineResponse2003 -func (a *AllocationApiService) UpdateEntitlementAllocationExecute(r ApiUpdateEntitlementAllocationRequest) (InlineResponse2003, *_nethttp.Response, error) { +func (a *AllocationApiService) UpdateEntitlementAllocationExecute(r ApiUpdateEntitlementAllocationRequest) (*InlineResponse2003, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2003 + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2003 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AllocationApiService.UpdateEntitlementAllocation") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/allocations/{AllocationUUID}/entitlements/{EntitlementUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"AllocationUUID"+"}", _neturl.PathEscape(parameterToString(r.allocationUUID, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"EntitlementUUID"+"}", _neturl.PathEscape(parameterToString(r.entitlementUUID, "")), -1) + localVarPath := localBasePath + "/allocations/{uuid}/entitlements/{EntitlementID}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"EntitlementID"+"}", url.PathEscape(parameterToString(r.entitlementID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.quantity != nil { localVarQueryParams.Add("quantity", parameterToString(*r.quantity, "")) @@ -2268,7 +2404,7 @@ func (a *AllocationApiService) UpdateEntitlementAllocationExecute(r ApiUpdateEnt } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -2278,15 +2414,15 @@ func (a *AllocationApiService) UpdateEntitlementAllocationExecute(r ApiUpdateEnt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -2344,7 +2480,7 @@ func (a *AllocationApiService) UpdateEntitlementAllocationExecute(r ApiUpdateEnt err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/api_cloudaccess.go b/api_cloudaccess.go index 7d074b0..962fe43 100644 --- a/api_cloudaccess.go +++ b/api_cloudaccess.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,23 +12,23 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // CloudaccessApiService CloudaccessApi service type CloudaccessApiService service type ApiAddProviderAccountsRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService providerShortName string account *[]AddProviderAccount @@ -39,7 +39,7 @@ func (r ApiAddProviderAccountsRequest) Account(account []AddProviderAccount) Api return r } -func (r ApiAddProviderAccountsRequest) Execute() (*_nethttp.Response, error) { +func (r ApiAddProviderAccountsRequest) Execute() (*http.Response, error) { return r.ApiService.AddProviderAccountsExecute(r) } @@ -49,11 +49,11 @@ AddProviderAccounts Add accounts for a provider Add up to `100` new provider accounts, with optional nicknames, to a currently-enabled provider for Red Hat Cloud Access. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param providerShortName @return ApiAddProviderAccountsRequest */ -func (a *CloudaccessApiService) AddProviderAccounts(ctx _context.Context, providerShortName string) ApiAddProviderAccountsRequest { +func (a *CloudaccessApiService) AddProviderAccounts(ctx context.Context, providerShortName string) ApiAddProviderAccountsRequest { return ApiAddProviderAccountsRequest{ ApiService: a, ctx: ctx, @@ -62,26 +62,24 @@ func (a *CloudaccessApiService) AddProviderAccounts(ctx _context.Context, provid } // Execute executes the request -func (a *CloudaccessApiService) AddProviderAccountsExecute(r ApiAddProviderAccountsRequest) (*_nethttp.Response, error) { +func (a *CloudaccessApiService) AddProviderAccountsExecute(r ApiAddProviderAccountsRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.AddProviderAccounts") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/{ProviderShortName}/accounts" - localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", _neturl.PathEscape(parameterToString(r.providerShortName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", url.PathEscape(parameterToString(r.providerShortName, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -116,7 +114,7 @@ func (a *CloudaccessApiService) AddProviderAccountsExecute(r ApiAddProviderAccou } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -126,15 +124,15 @@ func (a *CloudaccessApiService) AddProviderAccountsExecute(r ApiAddProviderAccou return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -194,7 +192,7 @@ func (a *CloudaccessApiService) AddProviderAccountsExecute(r ApiAddProviderAccou } type ApiEnableGoldImagesRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService providerShortName string goldImages *InlineObject5 @@ -205,7 +203,7 @@ func (r ApiEnableGoldImagesRequest) GoldImages(goldImages InlineObject5) ApiEnab return r } -func (r ApiEnableGoldImagesRequest) Execute() (*_nethttp.Response, error) { +func (r ApiEnableGoldImagesRequest) Execute() (*http.Response, error) { return r.ApiService.EnableGoldImagesExecute(r) } @@ -215,11 +213,11 @@ EnableGoldImages Enable Gold image access Requests access to Red Hat Gold Images, where available, for currently-enabled products and provider accounts. Customers can request Red Hat Gold Images for account IDs and product image groups listed in the `/v1/cloud_access_providers/enabled` endpoint using the provider short name listed in the same response. After the request has been accepted for processing, gold image status for accounts can be checked in the `/v1/cloud_access_providers/enabled` endpoint response. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param providerShortName @return ApiEnableGoldImagesRequest */ -func (a *CloudaccessApiService) EnableGoldImages(ctx _context.Context, providerShortName string) ApiEnableGoldImagesRequest { +func (a *CloudaccessApiService) EnableGoldImages(ctx context.Context, providerShortName string) ApiEnableGoldImagesRequest { return ApiEnableGoldImagesRequest{ ApiService: a, ctx: ctx, @@ -228,26 +226,24 @@ func (a *CloudaccessApiService) EnableGoldImages(ctx _context.Context, providerS } // Execute executes the request -func (a *CloudaccessApiService) EnableGoldImagesExecute(r ApiEnableGoldImagesRequest) (*_nethttp.Response, error) { +func (a *CloudaccessApiService) EnableGoldImagesExecute(r ApiEnableGoldImagesRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.EnableGoldImages") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/{ProviderShortName}/goldimage" - localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", _neturl.PathEscape(parameterToString(r.providerShortName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", url.PathEscape(parameterToString(r.providerShortName, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -282,7 +278,7 @@ func (a *CloudaccessApiService) EnableGoldImagesExecute(r ApiEnableGoldImagesReq } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -292,15 +288,15 @@ func (a *CloudaccessApiService) EnableGoldImagesExecute(r ApiEnableGoldImagesReq return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -360,11 +356,11 @@ func (a *CloudaccessApiService) EnableGoldImagesExecute(r ApiEnableGoldImagesReq } type ApiListEnabledCloudAccessProvidersRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService } -func (r ApiListEnabledCloudAccessProvidersRequest) Execute() (InlineResponse2006, *_nethttp.Response, error) { +func (r ApiListEnabledCloudAccessProvidersRequest) Execute() (*InlineResponse2006, *http.Response, error) { return r.ApiService.ListEnabledCloudAccessProvidersExecute(r) } @@ -379,10 +375,10 @@ Returns the full list of all enabled Red Hat products and Cloud Access provider - The `imageGroups` field is available for a product when the Provider is a certified Gold Image Provider, and the product has a gold image group available for it. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListEnabledCloudAccessProvidersRequest */ -func (a *CloudaccessApiService) ListEnabledCloudAccessProviders(ctx _context.Context) ApiListEnabledCloudAccessProvidersRequest { +func (a *CloudaccessApiService) ListEnabledCloudAccessProviders(ctx context.Context) ApiListEnabledCloudAccessProvidersRequest { return ApiListEnabledCloudAccessProvidersRequest{ ApiService: a, ctx: ctx, @@ -391,26 +387,24 @@ func (a *CloudaccessApiService) ListEnabledCloudAccessProviders(ctx _context.Con // Execute executes the request // @return InlineResponse2006 -func (a *CloudaccessApiService) ListEnabledCloudAccessProvidersExecute(r ApiListEnabledCloudAccessProvidersRequest) (InlineResponse2006, *_nethttp.Response, error) { +func (a *CloudaccessApiService) ListEnabledCloudAccessProvidersExecute(r ApiListEnabledCloudAccessProvidersRequest) (*InlineResponse2006, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2006 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2006 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.ListEnabledCloudAccessProviders") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/enabled" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -443,7 +437,7 @@ func (a *CloudaccessApiService) ListEnabledCloudAccessProvidersExecute(r ApiList } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -453,15 +447,15 @@ func (a *CloudaccessApiService) ListEnabledCloudAccessProvidersExecute(r ApiList return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -519,7 +513,7 @@ func (a *CloudaccessApiService) ListEnabledCloudAccessProvidersExecute(r ApiList err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -530,7 +524,7 @@ func (a *CloudaccessApiService) ListEnabledCloudAccessProvidersExecute(r ApiList } type ApiRemoveProviderAccountRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService providerShortName string account *InlineObject2 @@ -541,7 +535,7 @@ func (r ApiRemoveProviderAccountRequest) Account(account InlineObject2) ApiRemov return r } -func (r ApiRemoveProviderAccountRequest) Execute() (*_nethttp.Response, error) { +func (r ApiRemoveProviderAccountRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveProviderAccountExecute(r) } @@ -551,11 +545,11 @@ RemoveProviderAccount Remove a provider account Removes a currently-enabled provider account, including removing access to Gold Images, where applicable. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param providerShortName @return ApiRemoveProviderAccountRequest */ -func (a *CloudaccessApiService) RemoveProviderAccount(ctx _context.Context, providerShortName string) ApiRemoveProviderAccountRequest { +func (a *CloudaccessApiService) RemoveProviderAccount(ctx context.Context, providerShortName string) ApiRemoveProviderAccountRequest { return ApiRemoveProviderAccountRequest{ ApiService: a, ctx: ctx, @@ -564,26 +558,24 @@ func (a *CloudaccessApiService) RemoveProviderAccount(ctx _context.Context, prov } // Execute executes the request -func (a *CloudaccessApiService) RemoveProviderAccountExecute(r ApiRemoveProviderAccountRequest) (*_nethttp.Response, error) { +func (a *CloudaccessApiService) RemoveProviderAccountExecute(r ApiRemoveProviderAccountRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.RemoveProviderAccount") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/{ProviderShortName}/accounts" - localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", _neturl.PathEscape(parameterToString(r.providerShortName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", url.PathEscape(parameterToString(r.providerShortName, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -618,7 +610,7 @@ func (a *CloudaccessApiService) RemoveProviderAccountExecute(r ApiRemoveProvider } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -628,15 +620,15 @@ func (a *CloudaccessApiService) RemoveProviderAccountExecute(r ApiRemoveProvider return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -696,7 +688,7 @@ func (a *CloudaccessApiService) RemoveProviderAccountExecute(r ApiRemoveProvider } type ApiUpdateProviderAccountRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService providerShortName string accountID string @@ -708,7 +700,7 @@ func (r ApiUpdateProviderAccountRequest) Account(account InlineObject3) ApiUpdat return r } -func (r ApiUpdateProviderAccountRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdateProviderAccountRequest) Execute() (*http.Response, error) { return r.ApiService.UpdateProviderAccountExecute(r) } @@ -718,12 +710,12 @@ UpdateProviderAccount Update provider account Updates the nickname for a currently-enabled provider account. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param providerShortName @param accountID @return ApiUpdateProviderAccountRequest */ -func (a *CloudaccessApiService) UpdateProviderAccount(ctx _context.Context, providerShortName string, accountID string) ApiUpdateProviderAccountRequest { +func (a *CloudaccessApiService) UpdateProviderAccount(ctx context.Context, providerShortName string, accountID string) ApiUpdateProviderAccountRequest { return ApiUpdateProviderAccountRequest{ ApiService: a, ctx: ctx, @@ -733,27 +725,25 @@ func (a *CloudaccessApiService) UpdateProviderAccount(ctx _context.Context, prov } // Execute executes the request -func (a *CloudaccessApiService) UpdateProviderAccountExecute(r ApiUpdateProviderAccountRequest) (*_nethttp.Response, error) { +func (a *CloudaccessApiService) UpdateProviderAccountExecute(r ApiUpdateProviderAccountRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.UpdateProviderAccount") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}" - localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", _neturl.PathEscape(parameterToString(r.providerShortName, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"AccountID"+"}", _neturl.PathEscape(parameterToString(r.accountID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", url.PathEscape(parameterToString(r.providerShortName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"AccountID"+"}", url.PathEscape(parameterToString(r.accountID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -788,7 +778,7 @@ func (a *CloudaccessApiService) UpdateProviderAccountExecute(r ApiUpdateProvider } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -798,15 +788,15 @@ func (a *CloudaccessApiService) UpdateProviderAccountExecute(r ApiUpdateProvider return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -866,7 +856,7 @@ func (a *CloudaccessApiService) UpdateProviderAccountExecute(r ApiUpdateProvider } type ApiUpdateProviderAccountDeprecatedRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService providerShortName string account *InlineObject1 @@ -877,7 +867,7 @@ func (r ApiUpdateProviderAccountDeprecatedRequest) Account(account InlineObject1 return r } -func (r ApiUpdateProviderAccountDeprecatedRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdateProviderAccountDeprecatedRequest) Execute() (*http.Response, error) { return r.ApiService.UpdateProviderAccountDeprecatedExecute(r) } @@ -887,13 +877,13 @@ UpdateProviderAccountDeprecated Update provider account Updates the account nickname for a currently-enabled provider account. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param providerShortName @return ApiUpdateProviderAccountDeprecatedRequest Deprecated */ -func (a *CloudaccessApiService) UpdateProviderAccountDeprecated(ctx _context.Context, providerShortName string) ApiUpdateProviderAccountDeprecatedRequest { +func (a *CloudaccessApiService) UpdateProviderAccountDeprecated(ctx context.Context, providerShortName string) ApiUpdateProviderAccountDeprecatedRequest { return ApiUpdateProviderAccountDeprecatedRequest{ ApiService: a, ctx: ctx, @@ -903,26 +893,24 @@ func (a *CloudaccessApiService) UpdateProviderAccountDeprecated(ctx _context.Con // Execute executes the request // Deprecated -func (a *CloudaccessApiService) UpdateProviderAccountDeprecatedExecute(r ApiUpdateProviderAccountDeprecatedRequest) (*_nethttp.Response, error) { +func (a *CloudaccessApiService) UpdateProviderAccountDeprecatedExecute(r ApiUpdateProviderAccountDeprecatedRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.UpdateProviderAccountDeprecated") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/{ProviderShortName}/account" - localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", _neturl.PathEscape(parameterToString(r.providerShortName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", url.PathEscape(parameterToString(r.providerShortName, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -957,7 +945,7 @@ func (a *CloudaccessApiService) UpdateProviderAccountDeprecatedExecute(r ApiUpda } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -967,15 +955,15 @@ func (a *CloudaccessApiService) UpdateProviderAccountDeprecatedExecute(r ApiUpda return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1035,7 +1023,7 @@ func (a *CloudaccessApiService) UpdateProviderAccountDeprecatedExecute(r ApiUpda } type ApiVerifyProviderAccountRequest struct { - ctx _context.Context + ctx context.Context ApiService *CloudaccessApiService providerShortName string accountID string @@ -1047,7 +1035,7 @@ func (r ApiVerifyProviderAccountRequest) Account(account InlineObject4) ApiVerif return r } -func (r ApiVerifyProviderAccountRequest) Execute() (*_nethttp.Response, error) { +func (r ApiVerifyProviderAccountRequest) Execute() (*http.Response, error) { return r.ApiService.VerifyProviderAccountExecute(r) } @@ -1060,21 +1048,27 @@ Auto Registration is currently only available for the following cloud providers: - AWS - AWS GovCloud - ACS China + - Microsoft Azure + - Google Cloud Provider -This endpoint accepts a cloud instance identity document and signature from the cloud provider's metadata service, such as the [EC2 Metadata Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) int the case of AWS. +This endpoint accepts a cloud instance "identity" document and "signature" from the cloud provider's metadata service. Use the following links for more info on how to obtain these: + - For AWS: [EC2 Instance Identity Document](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) and [Signature](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-rsa2048.html) + - For Azure: [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) and [Signature](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux#attested-data) + - For GCP: [Compute Engine Instance Identity JWT token](https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature). Note: Please use "https://subscription.rhsm.redhat.com:443/subscription" as value for "audience" query parameter and "full" as value for "format" query parameter while generating the token + An HTTP 400 response will be returned if the cloud provider does not support automatic registration, the signature of the document cannot be verified, the cloud provider account has already been verified for a different Red Hat account, or if the account in the instance metadata does not match the provided account ID. An HTTP 204 response will be returned if the account has been successfully verified. Attempts to verify an account that is already verified will return an HTTP 204 response with no changes being made. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param providerShortName @param accountID @return ApiVerifyProviderAccountRequest */ -func (a *CloudaccessApiService) VerifyProviderAccount(ctx _context.Context, providerShortName string, accountID string) ApiVerifyProviderAccountRequest { +func (a *CloudaccessApiService) VerifyProviderAccount(ctx context.Context, providerShortName string, accountID string) ApiVerifyProviderAccountRequest { return ApiVerifyProviderAccountRequest{ ApiService: a, ctx: ctx, @@ -1084,27 +1078,25 @@ func (a *CloudaccessApiService) VerifyProviderAccount(ctx _context.Context, prov } // Execute executes the request -func (a *CloudaccessApiService) VerifyProviderAccountExecute(r ApiVerifyProviderAccountRequest) (*_nethttp.Response, error) { +func (a *CloudaccessApiService) VerifyProviderAccountExecute(r ApiVerifyProviderAccountRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudaccessApiService.VerifyProviderAccount") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}/verification" - localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", _neturl.PathEscape(parameterToString(r.providerShortName, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"AccountID"+"}", _neturl.PathEscape(parameterToString(r.accountID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ProviderShortName"+"}", url.PathEscape(parameterToString(r.providerShortName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"AccountID"+"}", url.PathEscape(parameterToString(r.accountID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1139,7 +1131,7 @@ func (a *CloudaccessApiService) VerifyProviderAccountExecute(r ApiVerifyProvider } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -1149,15 +1141,15 @@ func (a *CloudaccessApiService) VerifyProviderAccountExecute(r ApiVerifyProvider return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } diff --git a/api_errata.go b/api_errata.go index 48fdc52..2d8c714 100644 --- a/api_errata.go +++ b/api_errata.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,23 +12,23 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // ErrataApiService ErrataApi service type ErrataApiService service type ApiListErrataRequest struct { - ctx _context.Context + ctx context.Context ApiService *ErrataApiService limit *int32 offset *int32 @@ -46,7 +46,7 @@ func (r ApiListErrataRequest) Offset(offset int32) ApiListErrataRequest { return r } -func (r ApiListErrataRequest) Execute() (MyErrataListMock, *_nethttp.Response, error) { +func (r ApiListErrataRequest) Execute() (*MyErrataListMock, *http.Response, error) { return r.ApiService.ListErrataExecute(r) } @@ -55,10 +55,10 @@ ListErrata List all errata for a user's systems The default and max results in a response are 1000. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListErrataRequest */ -func (a *ErrataApiService) ListErrata(ctx _context.Context) ApiListErrataRequest { +func (a *ErrataApiService) ListErrata(ctx context.Context) ApiListErrataRequest { return ApiListErrataRequest{ ApiService: a, ctx: ctx, @@ -67,26 +67,24 @@ func (a *ErrataApiService) ListErrata(ctx _context.Context) ApiListErrataRequest // Execute executes the request // @return MyErrataListMock -func (a *ErrataApiService) ListErrataExecute(r ApiListErrataRequest) (MyErrataListMock, *_nethttp.Response, error) { +func (a *ErrataApiService) ListErrataExecute(r ApiListErrataRequest) (*MyErrataListMock, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue MyErrataListMock + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyErrataListMock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrataApiService.ListErrata") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/errata" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -125,7 +123,7 @@ func (a *ErrataApiService) ListErrataExecute(r ApiListErrataRequest) (MyErrataLi } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -135,15 +133,15 @@ func (a *ErrataApiService) ListErrataExecute(r ApiListErrataRequest) (MyErrataLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -201,7 +199,7 @@ func (a *ErrataApiService) ListErrataExecute(r ApiListErrataRequest) (MyErrataLi err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -212,7 +210,7 @@ func (a *ErrataApiService) ListErrataExecute(r ApiListErrataRequest) (MyErrataLi } type ApiListErrataByContentSetArchRequest struct { - ctx _context.Context + ctx context.Context ApiService *ErrataApiService contentSet string arch string @@ -232,7 +230,7 @@ func (r ApiListErrataByContentSetArchRequest) Offset(offset int32) ApiListErrata return r } -func (r ApiListErrataByContentSetArchRequest) Execute() (ContentSetArchMock, *_nethttp.Response, error) { +func (r ApiListErrataByContentSetArchRequest) Execute() (*ContentSetArchMock, *http.Response, error) { return r.ApiService.ListErrataByContentSetArchExecute(r) } @@ -241,12 +239,12 @@ ListErrataByContentSetArch Get all the errata for the specified content set and Limit is the number of results in a response. The default limit is 50 and max limit is 100. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param contentSet @param arch @return ApiListErrataByContentSetArchRequest */ -func (a *ErrataApiService) ListErrataByContentSetArch(ctx _context.Context, contentSet string, arch string) ApiListErrataByContentSetArchRequest { +func (a *ErrataApiService) ListErrataByContentSetArch(ctx context.Context, contentSet string, arch string) ApiListErrataByContentSetArchRequest { return ApiListErrataByContentSetArchRequest{ ApiService: a, ctx: ctx, @@ -257,28 +255,26 @@ func (a *ErrataApiService) ListErrataByContentSetArch(ctx _context.Context, cont // Execute executes the request // @return ContentSetArchMock -func (a *ErrataApiService) ListErrataByContentSetArchExecute(r ApiListErrataByContentSetArchRequest) (ContentSetArchMock, *_nethttp.Response, error) { +func (a *ErrataApiService) ListErrataByContentSetArchExecute(r ApiListErrataByContentSetArchRequest) (*ContentSetArchMock, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ContentSetArchMock + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContentSetArchMock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrataApiService.ListErrataByContentSetArch") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/errata/cset/{ContentSet}/arch/{Arch}" - localVarPath = strings.Replace(localVarPath, "{"+"ContentSet"+"}", _neturl.PathEscape(parameterToString(r.contentSet, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"Arch"+"}", _neturl.PathEscape(parameterToString(r.arch, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ContentSet"+"}", url.PathEscape(parameterToString(r.contentSet, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"Arch"+"}", url.PathEscape(parameterToString(r.arch, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -317,7 +313,7 @@ func (a *ErrataApiService) ListErrataByContentSetArchExecute(r ApiListErrataByCo } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -327,15 +323,15 @@ func (a *ErrataApiService) ListErrataByContentSetArchExecute(r ApiListErrataByCo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -393,7 +389,7 @@ func (a *ErrataApiService) ListErrataByContentSetArchExecute(r ApiListErrataByCo err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -404,7 +400,7 @@ func (a *ErrataApiService) ListErrataByContentSetArchExecute(r ApiListErrataByCo } type ApiListErratumPackagesRequest struct { - ctx _context.Context + ctx context.Context ApiService *ErrataApiService advisoryID string limit *int32 @@ -423,7 +419,7 @@ func (r ApiListErratumPackagesRequest) Offset(offset int32) ApiListErratumPackag return r } -func (r ApiListErratumPackagesRequest) Execute() (PkgListMock, *_nethttp.Response, error) { +func (r ApiListErratumPackagesRequest) Execute() (*PkgListMock, *http.Response, error) { return r.ApiService.ListErratumPackagesExecute(r) } @@ -432,11 +428,11 @@ ListErratumPackages List all packages for an advisory The default and max results in a response are 50. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param advisoryID unique identifier for a Red Hat advisory @return ApiListErratumPackagesRequest */ -func (a *ErrataApiService) ListErratumPackages(ctx _context.Context, advisoryID string) ApiListErratumPackagesRequest { +func (a *ErrataApiService) ListErratumPackages(ctx context.Context, advisoryID string) ApiListErratumPackagesRequest { return ApiListErratumPackagesRequest{ ApiService: a, ctx: ctx, @@ -446,27 +442,25 @@ func (a *ErrataApiService) ListErratumPackages(ctx _context.Context, advisoryID // Execute executes the request // @return PkgListMock -func (a *ErrataApiService) ListErratumPackagesExecute(r ApiListErratumPackagesRequest) (PkgListMock, *_nethttp.Response, error) { +func (a *ErrataApiService) ListErratumPackagesExecute(r ApiListErratumPackagesRequest) (*PkgListMock, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue PkgListMock + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PkgListMock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrataApiService.ListErratumPackages") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/errata/{AdvisoryID}/packages" - localVarPath = strings.Replace(localVarPath, "{"+"AdvisoryID"+"}", _neturl.PathEscape(parameterToString(r.advisoryID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"AdvisoryID"+"}", url.PathEscape(parameterToString(r.advisoryID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -505,7 +499,7 @@ func (a *ErrataApiService) ListErratumPackagesExecute(r ApiListErratumPackagesRe } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -515,15 +509,15 @@ func (a *ErrataApiService) ListErratumPackagesExecute(r ApiListErratumPackagesRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -581,7 +575,7 @@ func (a *ErrataApiService) ListErratumPackagesExecute(r ApiListErratumPackagesRe err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -592,7 +586,7 @@ func (a *ErrataApiService) ListErratumPackagesExecute(r ApiListErratumPackagesRe } type ApiListErratumSystemsRequest struct { - ctx _context.Context + ctx context.Context ApiService *ErrataApiService advisoryID string limit *int32 @@ -611,7 +605,7 @@ func (r ApiListErratumSystemsRequest) Offset(offset int32) ApiListErratumSystems return r } -func (r ApiListErratumSystemsRequest) Execute() (SystemListMock, *_nethttp.Response, error) { +func (r ApiListErratumSystemsRequest) Execute() (*SystemListMock, *http.Response, error) { return r.ApiService.ListErratumSystemsExecute(r) } @@ -620,11 +614,11 @@ ListErratumSystems List all systems for an advisory The default and max results in a response are 1000. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param advisoryID unique identifier for a Red Hat advisory @return ApiListErratumSystemsRequest */ -func (a *ErrataApiService) ListErratumSystems(ctx _context.Context, advisoryID string) ApiListErratumSystemsRequest { +func (a *ErrataApiService) ListErratumSystems(ctx context.Context, advisoryID string) ApiListErratumSystemsRequest { return ApiListErratumSystemsRequest{ ApiService: a, ctx: ctx, @@ -634,27 +628,25 @@ func (a *ErrataApiService) ListErratumSystems(ctx _context.Context, advisoryID s // Execute executes the request // @return SystemListMock -func (a *ErrataApiService) ListErratumSystemsExecute(r ApiListErratumSystemsRequest) (SystemListMock, *_nethttp.Response, error) { +func (a *ErrataApiService) ListErratumSystemsExecute(r ApiListErratumSystemsRequest) (*SystemListMock, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue SystemListMock + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SystemListMock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrataApiService.ListErratumSystems") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/errata/{AdvisoryID}/systems" - localVarPath = strings.Replace(localVarPath, "{"+"AdvisoryID"+"}", _neturl.PathEscape(parameterToString(r.advisoryID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"AdvisoryID"+"}", url.PathEscape(parameterToString(r.advisoryID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -693,7 +685,7 @@ func (a *ErrataApiService) ListErratumSystemsExecute(r ApiListErratumSystemsRequ } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -703,15 +695,15 @@ func (a *ErrataApiService) ListErratumSystemsExecute(r ApiListErratumSystemsRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -769,7 +761,7 @@ func (a *ErrataApiService) ListErratumSystemsExecute(r ApiListErratumSystemsRequ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -780,12 +772,12 @@ func (a *ErrataApiService) ListErratumSystemsExecute(r ApiListErratumSystemsRequ } type ApiShowErratumRequest struct { - ctx _context.Context + ctx context.Context ApiService *ErrataApiService advisoryID string } -func (r ApiShowErratumRequest) Execute() (InlineResponse2007, *_nethttp.Response, error) { +func (r ApiShowErratumRequest) Execute() (*InlineResponse2007, *http.Response, error) { return r.ApiService.ShowErratumExecute(r) } @@ -794,11 +786,11 @@ ShowErratum Get the details of an advisory This will get the details of an advisory specified by its advisoryID. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param advisoryID unique identifier for a Red Hat advisory @return ApiShowErratumRequest */ -func (a *ErrataApiService) ShowErratum(ctx _context.Context, advisoryID string) ApiShowErratumRequest { +func (a *ErrataApiService) ShowErratum(ctx context.Context, advisoryID string) ApiShowErratumRequest { return ApiShowErratumRequest{ ApiService: a, ctx: ctx, @@ -808,27 +800,25 @@ func (a *ErrataApiService) ShowErratum(ctx _context.Context, advisoryID string) // Execute executes the request // @return InlineResponse2007 -func (a *ErrataApiService) ShowErratumExecute(r ApiShowErratumRequest) (InlineResponse2007, *_nethttp.Response, error) { +func (a *ErrataApiService) ShowErratumExecute(r ApiShowErratumRequest) (*InlineResponse2007, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2007 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2007 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrataApiService.ShowErratum") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/errata/{AdvisoryID}" - localVarPath = strings.Replace(localVarPath, "{"+"AdvisoryID"+"}", _neturl.PathEscape(parameterToString(r.advisoryID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"AdvisoryID"+"}", url.PathEscape(parameterToString(r.advisoryID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -861,7 +851,7 @@ func (a *ErrataApiService) ShowErratumExecute(r ApiShowErratumRequest) (InlineRe } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -871,15 +861,15 @@ func (a *ErrataApiService) ShowErratumExecute(r ApiShowErratumRequest) (InlineRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -937,7 +927,7 @@ func (a *ErrataApiService) ShowErratumExecute(r ApiShowErratumRequest) (InlineRe err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/api_images.go b/api_images.go index f5662ea..563b189 100644 --- a/api_images.go +++ b/api_images.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,28 +12,28 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // ImagesApiService ImagesApi service type ImagesApiService service type ApiDownloadImageRequest struct { - ctx _context.Context + ctx context.Context ApiService *ImagesApiService checksum string } -func (r ApiDownloadImageRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDownloadImageRequest) Execute() (*http.Response, error) { return r.ApiService.DownloadImageExecute(r) } @@ -43,11 +43,11 @@ DownloadImage Download an image by its SHA256 checksum Find an image by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time an image is downloaded and to not store the link for more than several minutes. If the user has "Download Software and Updates" permissions and a valid subscription for the image, they will receive a HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param checksum @return ApiDownloadImageRequest */ -func (a *ImagesApiService) DownloadImage(ctx _context.Context, checksum string) ApiDownloadImageRequest { +func (a *ImagesApiService) DownloadImage(ctx context.Context, checksum string) ApiDownloadImageRequest { return ApiDownloadImageRequest{ ApiService: a, ctx: ctx, @@ -56,26 +56,24 @@ func (a *ImagesApiService) DownloadImage(ctx _context.Context, checksum string) } // Execute executes the request -func (a *ImagesApiService) DownloadImageExecute(r ApiDownloadImageRequest) (*_nethttp.Response, error) { +func (a *ImagesApiService) DownloadImageExecute(r ApiDownloadImageRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.DownloadImage") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{checksum}/download" - localVarPath = strings.Replace(localVarPath, "{"+"checksum"+"}", _neturl.PathEscape(parameterToString(r.checksum, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"checksum"+"}", url.PathEscape(parameterToString(r.checksum, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -108,7 +106,7 @@ func (a *ImagesApiService) DownloadImageExecute(r ApiDownloadImageRequest) (*_ne } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -118,15 +116,15 @@ func (a *ImagesApiService) DownloadImageExecute(r ApiDownloadImageRequest) (*_ne return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -195,8 +193,182 @@ func (a *ImagesApiService) DownloadImageExecute(r ApiDownloadImageRequest) (*_ne return localVarHTTPResponse, nil } +type ApiListImageDownloadsByVersionArchRequest struct { + ctx context.Context + ApiService *ImagesApiService + version string + arch string +} + +func (r ApiListImageDownloadsByVersionArchRequest) Execute() (*InlineResponse2009, *http.Response, error) { + return r.ApiService.ListImageDownloadsByVersionArchExecute(r) +} + +/* +ListImageDownloadsByVersionArch List RHEL image downloads by version and architecture. + +List all the available images for the given version and architecture. The Version parameter is expected to be a valid RHEL version. Example: 8.1, 8.2 etc. +The Arch parameter should be one of the valid RHEL architectures. Example: x86_64, aarch64 etc. +The user requesting the endpoint is expected to have Download permission (UGC). +If the user is entitled to an image, a "downloadHref" attribute is added in the image response object which links to image download API. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param version + @param arch + @return ApiListImageDownloadsByVersionArchRequest +*/ +func (a *ImagesApiService) ListImageDownloadsByVersionArch(ctx context.Context, version string, arch string) ApiListImageDownloadsByVersionArchRequest { + return ApiListImageDownloadsByVersionArchRequest{ + ApiService: a, + ctx: ctx, + version: version, + arch: arch, + } +} + +// Execute executes the request +// @return InlineResponse2009 +func (a *ImagesApiService) ListImageDownloadsByVersionArchExecute(r ApiListImageDownloadsByVersionArchRequest) (*InlineResponse2009, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2009 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ListImageDownloadsByVersionArch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/images/rhel/{Version}/{Arch}" + localVarPath = strings.Replace(localVarPath, "{"+"Version"+"}", url.PathEscape(parameterToString(r.version, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"Arch"+"}", url.PathEscape(parameterToString(r.arch, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Bearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + 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 InlineResponse400 + 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 == 401 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v InlineResponse400 + 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 InlineResponse400 + 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 == 500 { + var v InlineResponse400 + 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 + } + + 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 ApiListImagesByContentSetRequest struct { - ctx _context.Context + ctx context.Context ApiService *ImagesApiService contentSet string limit *int32 @@ -215,7 +387,7 @@ func (r ApiListImagesByContentSetRequest) Offset(offset int32) ApiListImagesByCo return r } -func (r ApiListImagesByContentSetRequest) Execute() (InlineResponse2008, *_nethttp.Response, error) { +func (r ApiListImagesByContentSetRequest) Execute() (*InlineResponse2008, *http.Response, error) { return r.ApiService.ListImagesByContentSetExecute(r) } @@ -227,11 +399,11 @@ List all the available images in a given content set. The content set parameter is expected to have Download permission (UGC). If the user is entitled to an image, a "downloadHref" attribute is added in the image response object which links to image download API. The list is paginated by default to 25 results in a response and goes to maximum 100 results in a response. Use pagination by setting offset and limit url parameters (valid integer values). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param contentSet @return ApiListImagesByContentSetRequest */ -func (a *ImagesApiService) ListImagesByContentSet(ctx _context.Context, contentSet string) ApiListImagesByContentSetRequest { +func (a *ImagesApiService) ListImagesByContentSet(ctx context.Context, contentSet string) ApiListImagesByContentSetRequest { return ApiListImagesByContentSetRequest{ ApiService: a, ctx: ctx, @@ -241,27 +413,25 @@ func (a *ImagesApiService) ListImagesByContentSet(ctx _context.Context, contentS // Execute executes the request // @return InlineResponse2008 -func (a *ImagesApiService) ListImagesByContentSetExecute(r ApiListImagesByContentSetRequest) (InlineResponse2008, *_nethttp.Response, error) { +func (a *ImagesApiService) ListImagesByContentSetExecute(r ApiListImagesByContentSetRequest) (*InlineResponse2008, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2008 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse2008 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ListImagesByContentSet") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/cset/{ContentSet}" - localVarPath = strings.Replace(localVarPath, "{"+"ContentSet"+"}", _neturl.PathEscape(parameterToString(r.contentSet, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ContentSet"+"}", url.PathEscape(parameterToString(r.contentSet, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -300,7 +470,7 @@ func (a *ImagesApiService) ListImagesByContentSetExecute(r ApiListImagesByConten } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -310,15 +480,15 @@ func (a *ImagesApiService) ListImagesByContentSetExecute(r ApiListImagesByConten return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -376,7 +546,7 @@ func (a *ImagesApiService) ListImagesByContentSetExecute(r ApiListImagesByConten err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/api_organization.go b/api_organization.go index 5f17538..4a43a7c 100644 --- a/api_organization.go +++ b/api_organization.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,26 +12,33 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) // OrganizationApiService OrganizationApi service type OrganizationApiService service type ApiCheckOrgSCACapabilityRequest struct { - ctx _context.Context + ctx context.Context ApiService *OrganizationApiService + include *string } -func (r ApiCheckOrgSCACapabilityRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { +// Request for system purpose attributes in response +func (r ApiCheckOrgSCACapabilityRequest) Include(include string) ApiCheckOrgSCACapabilityRequest { + r.include = &include + return r +} + +func (r ApiCheckOrgSCACapabilityRequest) Execute() (*InlineResponse20010, *http.Response, error) { return r.ApiService.CheckOrgSCACapabilityExecute(r) } @@ -40,10 +47,10 @@ CheckOrgSCACapability Get details of the user's organization Show Simple Content Access details of user's organization - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCheckOrgSCACapabilityRequest */ -func (a *OrganizationApiService) CheckOrgSCACapability(ctx _context.Context) ApiCheckOrgSCACapabilityRequest { +func (a *OrganizationApiService) CheckOrgSCACapability(ctx context.Context) ApiCheckOrgSCACapabilityRequest { return ApiCheckOrgSCACapabilityRequest{ ApiService: a, ctx: ctx, @@ -51,28 +58,29 @@ func (a *OrganizationApiService) CheckOrgSCACapability(ctx _context.Context) Api } // Execute executes the request -// @return InlineResponse2009 -func (a *OrganizationApiService) CheckOrgSCACapabilityExecute(r ApiCheckOrgSCACapabilityRequest) (InlineResponse2009, *_nethttp.Response, error) { +// @return InlineResponse20010 +func (a *OrganizationApiService) CheckOrgSCACapabilityExecute(r ApiCheckOrgSCACapabilityRequest) (*InlineResponse20010, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2009 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20010 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.CheckOrgSCACapability") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/organization" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.include != nil { + localVarQueryParams.Add("include", parameterToString(*r.include, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -104,7 +112,7 @@ func (a *OrganizationApiService) CheckOrgSCACapabilityExecute(r ApiCheckOrgSCACa } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -114,15 +122,15 @@ func (a *OrganizationApiService) CheckOrgSCACapabilityExecute(r ApiCheckOrgSCACa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -180,7 +188,7 @@ func (a *OrganizationApiService) CheckOrgSCACapabilityExecute(r ApiCheckOrgSCACa err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/api_packages.go b/api_packages.go index 9c23dbf..5b83554 100644 --- a/api_packages.go +++ b/api_packages.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,28 +12,28 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // PackagesApiService PackagesApi service type PackagesApiService service type ApiDownloadPackageRequest struct { - ctx _context.Context + ctx context.Context ApiService *PackagesApiService checksum string } -func (r ApiDownloadPackageRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDownloadPackageRequest) Execute() (*http.Response, error) { return r.ApiService.DownloadPackageExecute(r) } @@ -43,11 +43,11 @@ DownloadPackage Download a package by its SHA256 checksum Find a package by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time a package is downloaded and to not store the link for more than several minutes. If the user has "Download Software and Updates" permissions and a valid subscription for the package, they will receive an HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param checksum @return ApiDownloadPackageRequest */ -func (a *PackagesApiService) DownloadPackage(ctx _context.Context, checksum string) ApiDownloadPackageRequest { +func (a *PackagesApiService) DownloadPackage(ctx context.Context, checksum string) ApiDownloadPackageRequest { return ApiDownloadPackageRequest{ ApiService: a, ctx: ctx, @@ -56,26 +56,24 @@ func (a *PackagesApiService) DownloadPackage(ctx _context.Context, checksum stri } // Execute executes the request -func (a *PackagesApiService) DownloadPackageExecute(r ApiDownloadPackageRequest) (*_nethttp.Response, error) { +func (a *PackagesApiService) DownloadPackageExecute(r ApiDownloadPackageRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PackagesApiService.DownloadPackage") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/packages/{checksum}/download" - localVarPath = strings.Replace(localVarPath, "{"+"checksum"+"}", _neturl.PathEscape(parameterToString(r.checksum, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"checksum"+"}", url.PathEscape(parameterToString(r.checksum, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -108,7 +106,7 @@ func (a *PackagesApiService) DownloadPackageExecute(r ApiDownloadPackageRequest) } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -118,15 +116,15 @@ func (a *PackagesApiService) DownloadPackageExecute(r ApiDownloadPackageRequest) return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -196,7 +194,7 @@ func (a *PackagesApiService) DownloadPackageExecute(r ApiDownloadPackageRequest) } type ApiListPackagesByContentSetArchRequest struct { - ctx _context.Context + ctx context.Context ApiService *PackagesApiService contentSet string arch string @@ -221,7 +219,7 @@ func (r ApiListPackagesByContentSetArchRequest) Filter(filter []string) ApiListP return r } -func (r ApiListPackagesByContentSetArchRequest) Execute() (InlineResponse20010, *_nethttp.Response, error) { +func (r ApiListPackagesByContentSetArchRequest) Execute() (*InlineResponse20011, *http.Response, error) { return r.ApiService.ListPackagesByContentSetArchExecute(r) } @@ -230,12 +228,12 @@ ListPackagesByContentSetArch Get all the packages for the specified content set The default and max results in a response are 50 and 100 respectively. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param contentSet @param arch @return ApiListPackagesByContentSetArchRequest */ -func (a *PackagesApiService) ListPackagesByContentSetArch(ctx _context.Context, contentSet string, arch string) ApiListPackagesByContentSetArchRequest { +func (a *PackagesApiService) ListPackagesByContentSetArch(ctx context.Context, contentSet string, arch string) ApiListPackagesByContentSetArchRequest { return ApiListPackagesByContentSetArchRequest{ ApiService: a, ctx: ctx, @@ -245,29 +243,27 @@ func (a *PackagesApiService) ListPackagesByContentSetArch(ctx _context.Context, } // Execute executes the request -// @return InlineResponse20010 -func (a *PackagesApiService) ListPackagesByContentSetArchExecute(r ApiListPackagesByContentSetArchRequest) (InlineResponse20010, *_nethttp.Response, error) { +// @return InlineResponse20011 +func (a *PackagesApiService) ListPackagesByContentSetArchExecute(r ApiListPackagesByContentSetArchRequest) (*InlineResponse20011, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20010 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20011 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PackagesApiService.ListPackagesByContentSetArch") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/packages/cset/{ContentSet}/arch/{Arch}" - localVarPath = strings.Replace(localVarPath, "{"+"ContentSet"+"}", _neturl.PathEscape(parameterToString(r.contentSet, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"Arch"+"}", _neturl.PathEscape(parameterToString(r.arch, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"ContentSet"+"}", url.PathEscape(parameterToString(r.contentSet, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"Arch"+"}", url.PathEscape(parameterToString(r.arch, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -309,7 +305,7 @@ func (a *PackagesApiService) ListPackagesByContentSetArchExecute(r ApiListPackag } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -319,15 +315,15 @@ func (a *PackagesApiService) ListPackagesByContentSetArchExecute(r ApiListPackag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -385,7 +381,7 @@ func (a *PackagesApiService) ListPackagesByContentSetArchExecute(r ApiListPackag err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -396,12 +392,12 @@ func (a *PackagesApiService) ListPackagesByContentSetArchExecute(r ApiListPackag } type ApiShowPackageRequest struct { - ctx _context.Context + ctx context.Context ApiService *PackagesApiService checksum string } -func (r ApiShowPackageRequest) Execute() (InlineResponse20011, *_nethttp.Response, error) { +func (r ApiShowPackageRequest) Execute() (*InlineResponse20012, *http.Response, error) { return r.ApiService.ShowPackageExecute(r) } @@ -410,11 +406,11 @@ ShowPackage Get the details of a package This will get the details of a package specified by its checksum. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param checksum @return ApiShowPackageRequest */ -func (a *PackagesApiService) ShowPackage(ctx _context.Context, checksum string) ApiShowPackageRequest { +func (a *PackagesApiService) ShowPackage(ctx context.Context, checksum string) ApiShowPackageRequest { return ApiShowPackageRequest{ ApiService: a, ctx: ctx, @@ -423,28 +419,26 @@ func (a *PackagesApiService) ShowPackage(ctx _context.Context, checksum string) } // Execute executes the request -// @return InlineResponse20011 -func (a *PackagesApiService) ShowPackageExecute(r ApiShowPackageRequest) (InlineResponse20011, *_nethttp.Response, error) { +// @return InlineResponse20012 +func (a *PackagesApiService) ShowPackageExecute(r ApiShowPackageRequest) (*InlineResponse20012, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20011 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20012 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PackagesApiService.ShowPackage") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/packages/{Checksum}" - localVarPath = strings.Replace(localVarPath, "{"+"Checksum"+"}", _neturl.PathEscape(parameterToString(r.checksum, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"Checksum"+"}", url.PathEscape(parameterToString(r.checksum, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -477,7 +471,7 @@ func (a *PackagesApiService) ShowPackageExecute(r ApiShowPackageRequest) (Inline } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -487,15 +481,15 @@ func (a *PackagesApiService) ShowPackageExecute(r ApiShowPackageRequest) (Inline return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -553,7 +547,7 @@ func (a *PackagesApiService) ShowPackageExecute(r ApiShowPackageRequest) (Inline err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/api_subscription.go b/api_subscription.go index 2c51a34..0c01025 100644 --- a/api_subscription.go +++ b/api_subscription.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,23 +12,23 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // SubscriptionApiService SubscriptionApi service type SubscriptionApiService service type ApiListSubContentSetsRequest struct { - ctx _context.Context + ctx context.Context ApiService *SubscriptionApiService subscriptionNumber string limit *int32 @@ -47,7 +47,7 @@ func (r ApiListSubContentSetsRequest) Offset(offset int32) ApiListSubContentSets return r } -func (r ApiListSubContentSetsRequest) Execute() (InlineResponse20013, *_nethttp.Response, error) { +func (r ApiListSubContentSetsRequest) Execute() (*InlineResponse20014, *http.Response, error) { return r.ApiService.ListSubContentSetsExecute(r) } @@ -56,11 +56,11 @@ ListSubContentSets List all content sets for a subscription The default and max results in a response are 1000. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param subscriptionNumber @return ApiListSubContentSetsRequest */ -func (a *SubscriptionApiService) ListSubContentSets(ctx _context.Context, subscriptionNumber string) ApiListSubContentSetsRequest { +func (a *SubscriptionApiService) ListSubContentSets(ctx context.Context, subscriptionNumber string) ApiListSubContentSetsRequest { return ApiListSubContentSetsRequest{ ApiService: a, ctx: ctx, @@ -69,28 +69,26 @@ func (a *SubscriptionApiService) ListSubContentSets(ctx _context.Context, subscr } // Execute executes the request -// @return InlineResponse20013 -func (a *SubscriptionApiService) ListSubContentSetsExecute(r ApiListSubContentSetsRequest) (InlineResponse20013, *_nethttp.Response, error) { +// @return InlineResponse20014 +func (a *SubscriptionApiService) ListSubContentSetsExecute(r ApiListSubContentSetsRequest) (*InlineResponse20014, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20013 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20014 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionApiService.ListSubContentSets") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/subscriptions/{SubscriptionNumber}/contentSets" - localVarPath = strings.Replace(localVarPath, "{"+"SubscriptionNumber"+"}", _neturl.PathEscape(parameterToString(r.subscriptionNumber, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SubscriptionNumber"+"}", url.PathEscape(parameterToString(r.subscriptionNumber, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -129,7 +127,7 @@ func (a *SubscriptionApiService) ListSubContentSetsExecute(r ApiListSubContentSe } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -139,15 +137,15 @@ func (a *SubscriptionApiService) ListSubContentSetsExecute(r ApiListSubContentSe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -205,7 +203,7 @@ func (a *SubscriptionApiService) ListSubContentSetsExecute(r ApiListSubContentSe err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -216,7 +214,7 @@ func (a *SubscriptionApiService) ListSubContentSetsExecute(r ApiListSubContentSe } type ApiListSubSystemsRequest struct { - ctx _context.Context + ctx context.Context ApiService *SubscriptionApiService subscriptionNumber string limit *int32 @@ -235,7 +233,7 @@ func (r ApiListSubSystemsRequest) Offset(offset int32) ApiListSubSystemsRequest return r } -func (r ApiListSubSystemsRequest) Execute() (InlineResponse20014, *_nethttp.Response, error) { +func (r ApiListSubSystemsRequest) Execute() (*InlineResponse20015, *http.Response, error) { return r.ApiService.ListSubSystemsExecute(r) } @@ -244,11 +242,11 @@ ListSubSystems List all systems consuming a subscription The default and max results in a response are 100. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param subscriptionNumber @return ApiListSubSystemsRequest */ -func (a *SubscriptionApiService) ListSubSystems(ctx _context.Context, subscriptionNumber string) ApiListSubSystemsRequest { +func (a *SubscriptionApiService) ListSubSystems(ctx context.Context, subscriptionNumber string) ApiListSubSystemsRequest { return ApiListSubSystemsRequest{ ApiService: a, ctx: ctx, @@ -257,28 +255,26 @@ func (a *SubscriptionApiService) ListSubSystems(ctx _context.Context, subscripti } // Execute executes the request -// @return InlineResponse20014 -func (a *SubscriptionApiService) ListSubSystemsExecute(r ApiListSubSystemsRequest) (InlineResponse20014, *_nethttp.Response, error) { +// @return InlineResponse20015 +func (a *SubscriptionApiService) ListSubSystemsExecute(r ApiListSubSystemsRequest) (*InlineResponse20015, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20014 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20015 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionApiService.ListSubSystems") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/subscriptions/{SubscriptionNumber}/systems" - localVarPath = strings.Replace(localVarPath, "{"+"SubscriptionNumber"+"}", _neturl.PathEscape(parameterToString(r.subscriptionNumber, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SubscriptionNumber"+"}", url.PathEscape(parameterToString(r.subscriptionNumber, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -317,7 +313,7 @@ func (a *SubscriptionApiService) ListSubSystemsExecute(r ApiListSubSystemsReques } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -327,15 +323,15 @@ func (a *SubscriptionApiService) ListSubSystemsExecute(r ApiListSubSystemsReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -393,7 +389,7 @@ func (a *SubscriptionApiService) ListSubSystemsExecute(r ApiListSubSystemsReques err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -404,7 +400,7 @@ func (a *SubscriptionApiService) ListSubSystemsExecute(r ApiListSubSystemsReques } type ApiListSubscriptionsRequest struct { - ctx _context.Context + ctx context.Context ApiService *SubscriptionApiService limit *int32 offset *int32 @@ -422,7 +418,7 @@ func (r ApiListSubscriptionsRequest) Offset(offset int32) ApiListSubscriptionsRe return r } -func (r ApiListSubscriptionsRequest) Execute() (InlineResponse20012, *_nethttp.Response, error) { +func (r ApiListSubscriptionsRequest) Execute() (*InlineResponse20013, *http.Response, error) { return r.ApiService.ListSubscriptionsExecute(r) } @@ -431,10 +427,10 @@ ListSubscriptions List all subscriptions for a user The default and max results in a response are 50. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListSubscriptionsRequest */ -func (a *SubscriptionApiService) ListSubscriptions(ctx _context.Context) ApiListSubscriptionsRequest { +func (a *SubscriptionApiService) ListSubscriptions(ctx context.Context) ApiListSubscriptionsRequest { return ApiListSubscriptionsRequest{ ApiService: a, ctx: ctx, @@ -442,27 +438,25 @@ func (a *SubscriptionApiService) ListSubscriptions(ctx _context.Context) ApiList } // Execute executes the request -// @return InlineResponse20012 -func (a *SubscriptionApiService) ListSubscriptionsExecute(r ApiListSubscriptionsRequest) (InlineResponse20012, *_nethttp.Response, error) { +// @return InlineResponse20013 +func (a *SubscriptionApiService) ListSubscriptionsExecute(r ApiListSubscriptionsRequest) (*InlineResponse20013, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20012 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20013 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionApiService.ListSubscriptions") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/subscriptions" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -501,7 +495,7 @@ func (a *SubscriptionApiService) ListSubscriptionsExecute(r ApiListSubscriptions } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -511,15 +505,15 @@ func (a *SubscriptionApiService) ListSubscriptionsExecute(r ApiListSubscriptions return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -577,7 +571,7 @@ func (a *SubscriptionApiService) ListSubscriptionsExecute(r ApiListSubscriptions err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/api_system.go b/api_system.go index f87ac8f..b81bb58 100644 --- a/api_system.go +++ b/api_system.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,23 +12,23 @@ package gorhsm import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) // SystemApiService SystemApi service type SystemApiService service type ApiAttachEntitlementRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string pool *string @@ -46,7 +46,7 @@ func (r ApiAttachEntitlementRequest) Quantity(quantity int32) ApiAttachEntitleme return r } -func (r ApiAttachEntitlementRequest) Execute() (InlineResponse20017, *_nethttp.Response, error) { +func (r ApiAttachEntitlementRequest) Execute() (*InlineResponse20018, *http.Response, error) { return r.ApiService.AttachEntitlementExecute(r) } @@ -57,11 +57,11 @@ The default success response will be 200. Sam & Satellite systems are unsupported system types. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @return ApiAttachEntitlementRequest */ -func (a *SystemApiService) AttachEntitlement(ctx _context.Context, systemUUID string) ApiAttachEntitlementRequest { +func (a *SystemApiService) AttachEntitlement(ctx context.Context, systemUUID string) ApiAttachEntitlementRequest { return ApiAttachEntitlementRequest{ ApiService: a, ctx: ctx, @@ -70,28 +70,26 @@ func (a *SystemApiService) AttachEntitlement(ctx _context.Context, systemUUID st } // Execute executes the request -// @return InlineResponse20017 -func (a *SystemApiService) AttachEntitlementExecute(r ApiAttachEntitlementRequest) (InlineResponse20017, *_nethttp.Response, error) { +// @return InlineResponse20018 +func (a *SystemApiService) AttachEntitlementExecute(r ApiAttachEntitlementRequest) (*InlineResponse20018, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20017 + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20018 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.AttachEntitlement") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}/entitlements" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.pool == nil { return localVarReturnValue, nil, reportError("pool is required and must be specified") } @@ -131,7 +129,7 @@ func (a *SystemApiService) AttachEntitlementExecute(r ApiAttachEntitlementReques } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -141,15 +139,15 @@ func (a *SystemApiService) AttachEntitlementExecute(r ApiAttachEntitlementReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -207,7 +205,7 @@ func (a *SystemApiService) AttachEntitlementExecute(r ApiAttachEntitlementReques err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -218,7 +216,7 @@ func (a *SystemApiService) AttachEntitlementExecute(r ApiAttachEntitlementReques } type ApiListSystemErrataRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string limit *int32 @@ -237,7 +235,7 @@ func (r ApiListSystemErrataRequest) Offset(offset int32) ApiListSystemErrataRequ return r } -func (r ApiListSystemErrataRequest) Execute() (InlineResponse20018, *_nethttp.Response, error) { +func (r ApiListSystemErrataRequest) Execute() (*InlineResponse20019, *http.Response, error) { return r.ApiService.ListSystemErrataExecute(r) } @@ -246,11 +244,11 @@ ListSystemErrata List all applicable errata for a system The default and max number of results in a response are 100. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @return ApiListSystemErrataRequest */ -func (a *SystemApiService) ListSystemErrata(ctx _context.Context, systemUUID string) ApiListSystemErrataRequest { +func (a *SystemApiService) ListSystemErrata(ctx context.Context, systemUUID string) ApiListSystemErrataRequest { return ApiListSystemErrataRequest{ ApiService: a, ctx: ctx, @@ -259,28 +257,26 @@ func (a *SystemApiService) ListSystemErrata(ctx _context.Context, systemUUID str } // Execute executes the request -// @return InlineResponse20018 -func (a *SystemApiService) ListSystemErrataExecute(r ApiListSystemErrataRequest) (InlineResponse20018, *_nethttp.Response, error) { +// @return InlineResponse20019 +func (a *SystemApiService) ListSystemErrataExecute(r ApiListSystemErrataRequest) (*InlineResponse20019, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20018 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20019 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.ListSystemErrata") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}/errata" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -319,7 +315,7 @@ func (a *SystemApiService) ListSystemErrataExecute(r ApiListSystemErrataRequest) } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -329,15 +325,15 @@ func (a *SystemApiService) ListSystemErrataExecute(r ApiListSystemErrataRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -395,7 +391,7 @@ func (a *SystemApiService) ListSystemErrataExecute(r ApiListSystemErrataRequest) err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -406,7 +402,7 @@ func (a *SystemApiService) ListSystemErrataExecute(r ApiListSystemErrataRequest) } type ApiListSystemPackagesRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string limit *int32 @@ -446,7 +442,7 @@ func (r ApiListSystemPackagesRequest) Filter(filter string) ApiListSystemPackage return r } -func (r ApiListSystemPackagesRequest) Execute() (InlineResponse20019, *_nethttp.Response, error) { +func (r ApiListSystemPackagesRequest) Execute() (*InlineResponse20020, *http.Response, error) { return r.ApiService.ListSystemPackagesExecute(r) } @@ -455,11 +451,11 @@ ListSystemPackages List all packages for a system The default and max number of results in a response are 1000. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @return ApiListSystemPackagesRequest */ -func (a *SystemApiService) ListSystemPackages(ctx _context.Context, systemUUID string) ApiListSystemPackagesRequest { +func (a *SystemApiService) ListSystemPackages(ctx context.Context, systemUUID string) ApiListSystemPackagesRequest { return ApiListSystemPackagesRequest{ ApiService: a, ctx: ctx, @@ -468,28 +464,26 @@ func (a *SystemApiService) ListSystemPackages(ctx _context.Context, systemUUID s } // Execute executes the request -// @return InlineResponse20019 -func (a *SystemApiService) ListSystemPackagesExecute(r ApiListSystemPackagesRequest) (InlineResponse20019, *_nethttp.Response, error) { +// @return InlineResponse20020 +func (a *SystemApiService) ListSystemPackagesExecute(r ApiListSystemPackagesRequest) (*InlineResponse20020, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20019 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20020 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.ListSystemPackages") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}/packages" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -537,7 +531,7 @@ func (a *SystemApiService) ListSystemPackagesExecute(r ApiListSystemPackagesRequ } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -547,15 +541,15 @@ func (a *SystemApiService) ListSystemPackagesExecute(r ApiListSystemPackagesRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -613,7 +607,7 @@ func (a *SystemApiService) ListSystemPackagesExecute(r ApiListSystemPackagesRequ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -624,7 +618,7 @@ func (a *SystemApiService) ListSystemPackagesExecute(r ApiListSystemPackagesRequ } type ApiListSystemPoolsRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string limit *int32 @@ -643,7 +637,7 @@ func (r ApiListSystemPoolsRequest) Offset(offset int32) ApiListSystemPoolsReques return r } -func (r ApiListSystemPoolsRequest) Execute() (PoolsListMock, *_nethttp.Response, error) { +func (r ApiListSystemPoolsRequest) Execute() (*PoolsListMock, *http.Response, error) { return r.ApiService.ListSystemPoolsExecute(r) } @@ -652,11 +646,11 @@ ListSystemPools List all pools for a system The default and max number of results in a response are 50. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @return ApiListSystemPoolsRequest */ -func (a *SystemApiService) ListSystemPools(ctx _context.Context, systemUUID string) ApiListSystemPoolsRequest { +func (a *SystemApiService) ListSystemPools(ctx context.Context, systemUUID string) ApiListSystemPoolsRequest { return ApiListSystemPoolsRequest{ ApiService: a, ctx: ctx, @@ -666,27 +660,25 @@ func (a *SystemApiService) ListSystemPools(ctx _context.Context, systemUUID stri // Execute executes the request // @return PoolsListMock -func (a *SystemApiService) ListSystemPoolsExecute(r ApiListSystemPoolsRequest) (PoolsListMock, *_nethttp.Response, error) { +func (a *SystemApiService) ListSystemPoolsExecute(r ApiListSystemPoolsRequest) (*PoolsListMock, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue PoolsListMock + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PoolsListMock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.ListSystemPools") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}/pools" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -725,7 +717,7 @@ func (a *SystemApiService) ListSystemPoolsExecute(r ApiListSystemPoolsRequest) ( } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -735,15 +727,15 @@ func (a *SystemApiService) ListSystemPoolsExecute(r ApiListSystemPoolsRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -801,7 +793,7 @@ func (a *SystemApiService) ListSystemPoolsExecute(r ApiListSystemPoolsRequest) ( err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -812,7 +804,7 @@ func (a *SystemApiService) ListSystemPoolsExecute(r ApiListSystemPoolsRequest) ( } type ApiListSystemsRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService limit *int32 offset *int32 @@ -844,7 +836,7 @@ func (r ApiListSystemsRequest) Username(username string) ApiListSystemsRequest { return r } -func (r ApiListSystemsRequest) Execute() (InlineResponse20015, *_nethttp.Response, error) { +func (r ApiListSystemsRequest) Execute() (*InlineResponse20016, *http.Response, error) { return r.ApiService.ListSystemsExecute(r) } @@ -853,10 +845,10 @@ ListSystems List all systems for a user The default and max number of results in a response are 100. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListSystemsRequest */ -func (a *SystemApiService) ListSystems(ctx _context.Context) ApiListSystemsRequest { +func (a *SystemApiService) ListSystems(ctx context.Context) ApiListSystemsRequest { return ApiListSystemsRequest{ ApiService: a, ctx: ctx, @@ -864,27 +856,25 @@ func (a *SystemApiService) ListSystems(ctx _context.Context) ApiListSystemsReque } // Execute executes the request -// @return InlineResponse20015 -func (a *SystemApiService) ListSystemsExecute(r ApiListSystemsRequest) (InlineResponse20015, *_nethttp.Response, error) { +// @return InlineResponse20016 +func (a *SystemApiService) ListSystemsExecute(r ApiListSystemsRequest) (*InlineResponse20016, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20015 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20016 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.ListSystems") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) @@ -929,7 +919,7 @@ func (a *SystemApiService) ListSystemsExecute(r ApiListSystemsRequest) (InlineRe } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -939,15 +929,15 @@ func (a *SystemApiService) ListSystemsExecute(r ApiListSystemsRequest) (InlineRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1005,7 +995,7 @@ func (a *SystemApiService) ListSystemsExecute(r ApiListSystemsRequest) (InlineRe err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1016,12 +1006,12 @@ func (a *SystemApiService) ListSystemsExecute(r ApiListSystemsRequest) (InlineRe } type ApiRemoveSystemRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string } -func (r ApiRemoveSystemRequest) Execute() (*_nethttp.Response, error) { +func (r ApiRemoveSystemRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveSystemExecute(r) } @@ -1030,11 +1020,11 @@ RemoveSystem Remove system profile The default success response will be 204 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @return ApiRemoveSystemRequest */ -func (a *SystemApiService) RemoveSystem(ctx _context.Context, systemUUID string) ApiRemoveSystemRequest { +func (a *SystemApiService) RemoveSystem(ctx context.Context, systemUUID string) ApiRemoveSystemRequest { return ApiRemoveSystemRequest{ ApiService: a, ctx: ctx, @@ -1043,26 +1033,24 @@ func (a *SystemApiService) RemoveSystem(ctx _context.Context, systemUUID string) } // Execute executes the request -func (a *SystemApiService) RemoveSystemExecute(r ApiRemoveSystemRequest) (*_nethttp.Response, error) { +func (a *SystemApiService) RemoveSystemExecute(r ApiRemoveSystemRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.RemoveSystem") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1095,7 +1083,7 @@ func (a *SystemApiService) RemoveSystemExecute(r ApiRemoveSystemRequest) (*_neth } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -1105,15 +1093,15 @@ func (a *SystemApiService) RemoveSystemExecute(r ApiRemoveSystemRequest) (*_neth return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1183,13 +1171,13 @@ func (a *SystemApiService) RemoveSystemExecute(r ApiRemoveSystemRequest) (*_neth } type ApiRemoveSystemEntitlementRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string entitlementID string } -func (r ApiRemoveSystemEntitlementRequest) Execute() (*_nethttp.Response, error) { +func (r ApiRemoveSystemEntitlementRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveSystemEntitlementExecute(r) } @@ -1198,12 +1186,12 @@ RemoveSystemEntitlement Remove entitlement from the system The default success response will be 204. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @param entitlementID Remove an entitlement from a system @return ApiRemoveSystemEntitlementRequest */ -func (a *SystemApiService) RemoveSystemEntitlement(ctx _context.Context, systemUUID string, entitlementID string) ApiRemoveSystemEntitlementRequest { +func (a *SystemApiService) RemoveSystemEntitlement(ctx context.Context, systemUUID string, entitlementID string) ApiRemoveSystemEntitlementRequest { return ApiRemoveSystemEntitlementRequest{ ApiService: a, ctx: ctx, @@ -1213,27 +1201,25 @@ func (a *SystemApiService) RemoveSystemEntitlement(ctx _context.Context, systemU } // Execute executes the request -func (a *SystemApiService) RemoveSystemEntitlementExecute(r ApiRemoveSystemEntitlementRequest) (*_nethttp.Response, error) { +func (a *SystemApiService) RemoveSystemEntitlementExecute(r ApiRemoveSystemEntitlementRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.RemoveSystemEntitlement") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}/{EntitlementID}" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"EntitlementID"+"}", _neturl.PathEscape(parameterToString(r.entitlementID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"EntitlementID"+"}", url.PathEscape(parameterToString(r.entitlementID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1266,7 +1252,7 @@ func (a *SystemApiService) RemoveSystemEntitlementExecute(r ApiRemoveSystemEntit } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } @@ -1276,15 +1262,15 @@ func (a *SystemApiService) RemoveSystemEntitlementExecute(r ApiRemoveSystemEntit return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1344,7 +1330,7 @@ func (a *SystemApiService) RemoveSystemEntitlementExecute(r ApiRemoveSystemEntit } type ApiShowSystemRequest struct { - ctx _context.Context + ctx context.Context ApiService *SystemApiService systemUUID string include *[]string @@ -1356,7 +1342,7 @@ func (r ApiShowSystemRequest) Include(include []string) ApiShowSystemRequest { return r } -func (r ApiShowSystemRequest) Execute() (InlineResponse20016, *_nethttp.Response, error) { +func (r ApiShowSystemRequest) Execute() (*InlineResponse20017, *http.Response, error) { return r.ApiService.ShowSystemExecute(r) } @@ -1365,11 +1351,11 @@ ShowSystem Get a system specified by UUID. Sam & Satellite systems are unsupported system types. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param systemUUID @return ApiShowSystemRequest */ -func (a *SystemApiService) ShowSystem(ctx _context.Context, systemUUID string) ApiShowSystemRequest { +func (a *SystemApiService) ShowSystem(ctx context.Context, systemUUID string) ApiShowSystemRequest { return ApiShowSystemRequest{ ApiService: a, ctx: ctx, @@ -1378,28 +1364,26 @@ func (a *SystemApiService) ShowSystem(ctx _context.Context, systemUUID string) A } // Execute executes the request -// @return InlineResponse20016 -func (a *SystemApiService) ShowSystemExecute(r ApiShowSystemRequest) (InlineResponse20016, *_nethttp.Response, error) { +// @return InlineResponse20017 +func (a *SystemApiService) ShowSystemExecute(r ApiShowSystemRequest) (*InlineResponse20017, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20016 + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InlineResponse20017 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemApiService.ShowSystem") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/systems/{SystemUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", _neturl.PathEscape(parameterToString(r.systemUUID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SystemUUID"+"}", url.PathEscape(parameterToString(r.systemUUID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.include != nil { localVarQueryParams.Add("include", parameterToString(*r.include, "csv")) @@ -1435,7 +1419,7 @@ func (a *SystemApiService) ShowSystemExecute(r ApiShowSystemRequest) (InlineResp } } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } @@ -1445,15 +1429,15 @@ func (a *SystemApiService) ShowSystemExecute(r ApiShowSystemRequest) (InlineResp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1511,7 +1495,7 @@ func (a *SystemApiService) ShowSystemExecute(r ApiShowSystemRequest) (InlineResp err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/client.go b/client.go index a1d396c..5657b9c 100644 --- a/client.go +++ b/client.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -41,7 +41,7 @@ var ( xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) -// APIClient manages communication with the RHSM-API API v1.196.0 +// APIClient manages communication with the RHSM-API API v1.264.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -210,6 +210,12 @@ func (c *APIClient) GetConfig() *Configuration { return c.cfg } +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, @@ -218,9 +224,7 @@ func (c *APIClient) prepareRequest( headerParams map[string]string, queryParams url.Values, formParams url.Values, - formFileName string, - fileName string, - fileBytes []byte) (localVarRequest *http.Request, err error) { + formFiles []formFile) (localVarRequest *http.Request, err error) { var body *bytes.Buffer @@ -239,7 +243,7 @@ func (c *APIClient) prepareRequest( } // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -258,16 +262,17 @@ func (c *APIClient) prepareRequest( } } } - 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 + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } } } @@ -330,7 +335,7 @@ func (c *APIClient) prepareRequest( if len(headerParams) > 0 { headers := http.Header{} for h, v := range headerParams { - headers.Set(h, v) + headers[h] = []string{v} } localVarRequest.Header = headers } @@ -387,6 +392,9 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err return } _, err = (*f).Write(b) + if err != nil { + return + } _, err = (*f).Seek(0, io.SeekStart) return } @@ -435,6 +443,13 @@ func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { diff --git a/configuration.go b/configuration.go index a5f679d..705291e 100644 --- a/configuration.go +++ b/configuration.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/docs/AllocationApi.md b/docs/AllocationApi.md index 4307b1a..d43db67 100644 --- a/docs/AllocationApi.md +++ b/docs/AllocationApi.md @@ -4,25 +4,26 @@ All URIs are relative to *https://api.access.redhat.com/management/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AttachEntitlementAllocation**](AllocationApi.md#AttachEntitlementAllocation) | **Post** /allocations/{AllocationUUID}/entitlements | Attach entitlement to allocation +[**AttachEntitlementAllocation**](AllocationApi.md#AttachEntitlementAllocation) | **Post** /allocations/{uuid}/entitlements | Attach entitlement to allocation [**CreateSatellite**](AllocationApi.md#CreateSatellite) | **Post** /allocations | Create Satellite -[**ExportAllocation**](AllocationApi.md#ExportAllocation) | **Get** /allocations/{AllocationUUID}/export | Trigger allocation manifest export -[**ExportJobAllocation**](AllocationApi.md#ExportJobAllocation) | **Get** /allocations/{AllocationUUID}/exportJob/{ExportJobID} | Check status of allocation manifest export -[**GetExportAllocation**](AllocationApi.md#GetExportAllocation) | **Get** /allocations/{AllocationUUID}/export/{ExportID} | Download allocation manifest -[**ListAllocationPools**](AllocationApi.md#ListAllocationPools) | **Get** /allocations/{AllocationUUID}/pools | List all pools for an allocation +[**ExportAllocation**](AllocationApi.md#ExportAllocation) | **Get** /allocations/{uuid}/export | Trigger allocation manifest export +[**ExportJobAllocation**](AllocationApi.md#ExportJobAllocation) | **Get** /allocations/{uuid}/exportJob/{ExportJobID} | Check status of allocation manifest export +[**GetExportAllocation**](AllocationApi.md#GetExportAllocation) | **Get** /allocations/{uuid}/export/{ExportID} | Download allocation manifest +[**ListAllocationPools**](AllocationApi.md#ListAllocationPools) | **Get** /allocations/{uuid}/pools | List all pools for an allocation [**ListAllocations**](AllocationApi.md#ListAllocations) | **Get** /allocations | List all allocations for a user [**ListVersionsAllocation**](AllocationApi.md#ListVersionsAllocation) | **Get** /allocations/versions | List Satellite versions -[**RemoveAllocation**](AllocationApi.md#RemoveAllocation) | **Delete** /allocations/{AllocationUUID} | Remove allocation profile -[**RemoveAllocationEntitlement**](AllocationApi.md#RemoveAllocationEntitlement) | **Delete** /allocations/{AllocationUUID}/{EntitlementID} | Remove entitlement from the allocation -[**ShowAllocation**](AllocationApi.md#ShowAllocation) | **Get** /allocations/{AllocationUUID} | Get an allocation by UUID -[**UpdateAllocation**](AllocationApi.md#UpdateAllocation) | **Put** /allocations/{AllocationUUID} | Update an allocation -[**UpdateEntitlementAllocation**](AllocationApi.md#UpdateEntitlementAllocation) | **Put** /allocations/{AllocationUUID}/entitlements/{EntitlementUUID} | Update attached entitlement to allocation +[**RemoveAllocation**](AllocationApi.md#RemoveAllocation) | **Delete** /allocations/{uuid} | Remove allocation profile +[**RemoveAllocationEntitlement**](AllocationApi.md#RemoveAllocationEntitlement) | **Delete** /allocations/{uuid}/entitlements/{EntitlementID} | Remove entitlement from the allocation +[**RemoveAllocationEntitlementDeprecated**](AllocationApi.md#RemoveAllocationEntitlementDeprecated) | **Delete** /allocations/{uuid}/{EntitlementID} | Remove entitlement from the allocation +[**ShowAllocation**](AllocationApi.md#ShowAllocation) | **Get** /allocations/{uuid} | Get an allocation by UUID +[**UpdateAllocation**](AllocationApi.md#UpdateAllocation) | **Put** /allocations/{uuid} | Update an allocation +[**UpdateEntitlementAllocation**](AllocationApi.md#UpdateEntitlementAllocation) | **Put** /allocations/{uuid}/entitlements/{EntitlementID} | Update attached entitlement to allocation ## AttachEntitlementAllocation -> InlineResponse2003 AttachEntitlementAllocation(ctx, allocationUUID).Pool(pool).Quantity(quantity).Execute() +> InlineResponse2003 AttachEntitlementAllocation(ctx, uuid).Pool(pool).Quantity(quantity).Execute() Attach entitlement to allocation @@ -42,12 +43,12 @@ import ( func main() { pool := "pool_example" // string | - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | quantity := int32(56) // int32 | quantity you want to attach (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.AttachEntitlementAllocation(context.Background(), allocationUUID).Pool(pool).Quantity(quantity).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.AttachEntitlementAllocation(context.Background(), uuid).Pool(pool).Quantity(quantity).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.AttachEntitlementAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -63,7 +64,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | ### Other Parameters @@ -119,8 +120,8 @@ func main() { version := "version_example" // string | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.CreateSatellite(context.Background()).Name(name).Version(version).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.CreateSatellite(context.Background()).Name(name).Version(version).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.CreateSatellite``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -164,7 +165,7 @@ Name | Type | Description | Notes ## ExportAllocation -> InlineResponse2004 ExportAllocation(ctx, allocationUUID).Execute() +> InlineResponse2004 ExportAllocation(ctx, uuid).Execute() Trigger allocation manifest export @@ -183,11 +184,11 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.ExportAllocation(context.Background(), allocationUUID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.ExportAllocation(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.ExportAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -203,7 +204,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | ### Other Parameters @@ -234,7 +235,7 @@ Name | Type | Description | Notes ## ExportJobAllocation -> InlineResponse2005 ExportJobAllocation(ctx, allocationUUID, exportJobID).Execute() +> InlineResponse2005 ExportJobAllocation(ctx, uuid, exportJobID).Execute() Check status of allocation manifest export @@ -253,12 +254,12 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | exportJobID := "exportJobID_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.ExportJobAllocation(context.Background(), allocationUUID, exportJobID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.ExportJobAllocation(context.Background(), uuid, exportJobID).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.ExportJobAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -274,7 +275,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | **exportJobID** | **string** | | ### Other Parameters @@ -307,7 +308,7 @@ Name | Type | Description | Notes ## GetExportAllocation -> []int32 GetExportAllocation(ctx, allocationUUID, exportID).Execute() +> []int32 GetExportAllocation(ctx, uuid, exportID).Execute() Download allocation manifest @@ -326,12 +327,12 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | exportID := "exportID_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.GetExportAllocation(context.Background(), allocationUUID, exportID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.GetExportAllocation(context.Background(), uuid, exportID).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.GetExportAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -347,7 +348,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | **exportID** | **string** | | ### Other Parameters @@ -380,7 +381,7 @@ Name | Type | Description | Notes ## ListAllocationPools -> PoolsListMock ListAllocationPools(ctx, allocationUUID).Limit(limit).Offset(offset).Future(future).Execute() +> PoolsListMock ListAllocationPools(ctx, uuid).Limit(limit).Offset(offset).Future(future).Execute() List all pools for an allocation @@ -399,14 +400,14 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | limit := int32(56) // int32 | max number of results you want (optional) offset := int32(56) // int32 | index from which you want next items (optional) future := true // bool | include future dated pools for satellite 6.3 or higher (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.ListAllocationPools(context.Background(), allocationUUID).Limit(limit).Offset(offset).Future(future).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.ListAllocationPools(context.Background(), uuid).Limit(limit).Offset(offset).Future(future).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.ListAllocationPools``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -422,7 +423,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | ### Other Parameters @@ -480,8 +481,8 @@ func main() { type_ := "type__example" // string | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.ListAllocations(context.Background()).Limit(limit).Offset(offset).Type_(type_).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.ListAllocations(context.Background()).Limit(limit).Offset(offset).Type_(type_).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.ListAllocations``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -547,8 +548,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.ListVersionsAllocation(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.ListVersionsAllocation(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.ListVersionsAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -587,7 +588,7 @@ Other parameters are passed through a pointer to a apiListVersionsAllocationRequ ## RemoveAllocation -> RemoveAllocation(ctx, allocationUUID).Force(force).Execute() +> RemoveAllocation(ctx, uuid).Force(force).Execute() Remove allocation profile @@ -606,12 +607,12 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | force := true // bool | Deleting a subscription allocation can have significant impacts on your hosts and activation keys. We require a force parameter to make sure the delete operation is intentional. configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.RemoveAllocation(context.Background(), allocationUUID).Force(force).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.RemoveAllocation(context.Background(), uuid).Force(force).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.RemoveAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -625,7 +626,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | ### Other Parameters @@ -657,7 +658,7 @@ Name | Type | Description | Notes ## RemoveAllocationEntitlement -> RemoveAllocationEntitlement(ctx, allocationUUID, entitlementID).Execute() +> RemoveAllocationEntitlement(ctx, uuid, entitlementID).Execute() Remove entitlement from the allocation @@ -676,12 +677,12 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | entitlementID := "entitlementID_example" // string | Remove an entitlement from an allocation configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.RemoveAllocationEntitlement(context.Background(), allocationUUID, entitlementID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.RemoveAllocationEntitlement(context.Background(), uuid, entitlementID).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.RemoveAllocationEntitlement``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -695,7 +696,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | **entitlementID** | **string** | Remove an entitlement from an allocation | ### Other Parameters @@ -708,6 +709,77 @@ Name | Type | Description | Notes +### Return type + + (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### 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) + + +## RemoveAllocationEntitlementDeprecated + +> RemoveAllocationEntitlementDeprecated(ctx, uuid, entitlementID).Execute() + +Remove entitlement from the allocation + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + uuid := "uuid_example" // string | + entitlementID := "entitlementID_example" // string | Remove an entitlement from an allocation + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.RemoveAllocationEntitlementDeprecated(context.Background(), uuid, entitlementID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.RemoveAllocationEntitlementDeprecated``: %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. +**uuid** | **string** | | +**entitlementID** | **string** | Remove an entitlement from an allocation | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAllocationEntitlementDeprecatedRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + ### Return type (empty response body) @@ -728,7 +800,7 @@ Name | Type | Description | Notes ## ShowAllocation -> InlineResponse2003 ShowAllocation(ctx, allocationUUID).Include(include).Execute() +> InlineResponse2003 ShowAllocation(ctx, uuid).Include(include).Execute() Get an allocation by UUID @@ -747,12 +819,12 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | include := "include_example" // string | Show more details about a allocation (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.ShowAllocation(context.Background(), allocationUUID).Include(include).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.ShowAllocation(context.Background(), uuid).Include(include).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.ShowAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -768,7 +840,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | ### Other Parameters @@ -800,7 +872,7 @@ Name | Type | Description | Notes ## UpdateAllocation -> UpdateAllocation(ctx, allocationUUID).Allocation(allocation).Execute() +> UpdateAllocation(ctx, uuid).Allocation(allocation).Execute() Update an allocation @@ -819,12 +891,12 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | + uuid := "uuid_example" // string | allocation := *openapiclient.NewInlineObject("SimpleContentAccess_example") // InlineObject | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.UpdateAllocation(context.Background(), allocationUUID).Allocation(allocation).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.UpdateAllocation(context.Background(), uuid).Allocation(allocation).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.UpdateAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -838,7 +910,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | +**uuid** | **string** | | ### Other Parameters @@ -870,7 +942,7 @@ Name | Type | Description | Notes ## UpdateEntitlementAllocation -> InlineResponse2003 UpdateEntitlementAllocation(ctx, allocationUUID, entitlementUUID).Quantity(quantity).Execute() +> InlineResponse2003 UpdateEntitlementAllocation(ctx, uuid, entitlementID).Quantity(quantity).Execute() Update attached entitlement to allocation @@ -889,13 +961,13 @@ import ( ) func main() { - allocationUUID := "allocationUUID_example" // string | - entitlementUUID := "entitlementUUID_example" // string | + uuid := "uuid_example" // string | + entitlementID := "entitlementID_example" // string | quantity := int32(56) // int32 | maxItem: quantity must be less than or equal to the maximum number of allowed entitlements in the entitlement pool minItem: 1 (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AllocationApi.UpdateEntitlementAllocation(context.Background(), allocationUUID, entitlementUUID).Quantity(quantity).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AllocationApi.UpdateEntitlementAllocation(context.Background(), uuid, entitlementID).Quantity(quantity).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AllocationApi.UpdateEntitlementAllocation``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -911,8 +983,8 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**allocationUUID** | **string** | | -**entitlementUUID** | **string** | | +**uuid** | **string** | | +**entitlementID** | **string** | | ### Other Parameters diff --git a/docs/CloudaccessApi.md b/docs/CloudaccessApi.md index 4803cc1..571bf75 100644 --- a/docs/CloudaccessApi.md +++ b/docs/CloudaccessApi.md @@ -39,8 +39,8 @@ func main() { account := []openapiclient.AddProviderAccount{*openapiclient.NewAddProviderAccount()} // []AddProviderAccount | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.AddProviderAccounts(context.Background(), providerShortName).Account(account).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.AddProviderAccounts(context.Background(), providerShortName).Account(account).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.AddProviderAccounts``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -109,8 +109,8 @@ func main() { goldImages := *openapiclient.NewInlineObject5([]string{"Accounts_example"}, []string{"Images_example"}) // InlineObject5 | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.EnableGoldImages(context.Background(), providerShortName).GoldImages(goldImages).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.EnableGoldImages(context.Background(), providerShortName).GoldImages(goldImages).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.EnableGoldImages``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -177,8 +177,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.ListEnabledCloudAccessProviders(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.ListEnabledCloudAccessProviders(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.ListEnabledCloudAccessProviders``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -240,8 +240,8 @@ func main() { account := *openapiclient.NewInlineObject2("Id_example") // InlineObject2 | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.RemoveProviderAccount(context.Background(), providerShortName).Account(account).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.RemoveProviderAccount(context.Background(), providerShortName).Account(account).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.RemoveProviderAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -311,8 +311,8 @@ func main() { account := *openapiclient.NewInlineObject3("Nickname_example") // InlineObject3 | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.UpdateProviderAccount(context.Background(), providerShortName, accountID).Account(account).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.UpdateProviderAccount(context.Background(), providerShortName, accountID).Account(account).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.UpdateProviderAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -383,8 +383,8 @@ func main() { account := *openapiclient.NewInlineObject1("Id_example") // InlineObject1 | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.UpdateProviderAccountDeprecated(context.Background(), providerShortName).Account(account).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.UpdateProviderAccountDeprecated(context.Background(), providerShortName).Account(account).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.UpdateProviderAccountDeprecated``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -454,8 +454,8 @@ func main() { account := *openapiclient.NewInlineObject4("Identity_example", "Signature_example") // InlineObject4 | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.CloudaccessApi.VerifyProviderAccount(context.Background(), providerShortName, accountID).Account(account).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CloudaccessApi.VerifyProviderAccount(context.Background(), providerShortName, accountID).Account(account).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CloudaccessApi.VerifyProviderAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/docs/ErrataApi.md b/docs/ErrataApi.md index f0ed0ed..2e3f2fd 100644 --- a/docs/ErrataApi.md +++ b/docs/ErrataApi.md @@ -37,8 +37,8 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ErrataApi.ListErrata(context.Background()).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ErrataApi.ListErrata(context.Background()).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ErrataApi.ListErrata``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -107,8 +107,8 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ErrataApi.ListErrataByContentSetArch(context.Background(), contentSet, arch).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ErrataApi.ListErrataByContentSetArch(context.Background(), contentSet, arch).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ErrataApi.ListErrataByContentSetArch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -183,8 +183,8 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ErrataApi.ListErratumPackages(context.Background(), advisoryID).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ErrataApi.ListErratumPackages(context.Background(), advisoryID).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ErrataApi.ListErratumPackages``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -257,8 +257,8 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ErrataApi.ListErratumSystems(context.Background(), advisoryID).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ErrataApi.ListErratumSystems(context.Background(), advisoryID).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ErrataApi.ListErratumSystems``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -329,8 +329,8 @@ func main() { advisoryID := "advisoryID_example" // string | unique identifier for a Red Hat advisory configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ErrataApi.ShowErratum(context.Background(), advisoryID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ErrataApi.ShowErratum(context.Background(), advisoryID).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ErrataApi.ShowErratum``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/docs/ImageForVersionArch.md b/docs/ImageForVersionArch.md new file mode 100644 index 0000000..baf6d70 --- /dev/null +++ b/docs/ImageForVersionArch.md @@ -0,0 +1,186 @@ +# ImageForVersionArch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Arch** | Pointer to **string** | | [optional] +**Checksum** | Pointer to **string** | | [optional] +**DatePublished** | Pointer to **string** | Date represents the date format used for API returns | [optional] +**DownloadHref** | Pointer to **string** | | [optional] +**Filename** | Pointer to **string** | | [optional] +**ImageName** | Pointer to **string** | | [optional] + +## Methods + +### NewImageForVersionArch + +`func NewImageForVersionArch() *ImageForVersionArch` + +NewImageForVersionArch instantiates a new ImageForVersionArch 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 + +### NewImageForVersionArchWithDefaults + +`func NewImageForVersionArchWithDefaults() *ImageForVersionArch` + +NewImageForVersionArchWithDefaults instantiates a new ImageForVersionArch 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 + +### GetArch + +`func (o *ImageForVersionArch) GetArch() string` + +GetArch returns the Arch field if non-nil, zero value otherwise. + +### GetArchOk + +`func (o *ImageForVersionArch) GetArchOk() (*string, bool)` + +GetArchOk returns a tuple with the Arch field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArch + +`func (o *ImageForVersionArch) SetArch(v string)` + +SetArch sets Arch field to given value. + +### HasArch + +`func (o *ImageForVersionArch) HasArch() bool` + +HasArch returns a boolean if a field has been set. + +### GetChecksum + +`func (o *ImageForVersionArch) GetChecksum() string` + +GetChecksum returns the Checksum field if non-nil, zero value otherwise. + +### GetChecksumOk + +`func (o *ImageForVersionArch) GetChecksumOk() (*string, bool)` + +GetChecksumOk returns a tuple with the Checksum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChecksum + +`func (o *ImageForVersionArch) SetChecksum(v string)` + +SetChecksum sets Checksum field to given value. + +### HasChecksum + +`func (o *ImageForVersionArch) HasChecksum() bool` + +HasChecksum returns a boolean if a field has been set. + +### GetDatePublished + +`func (o *ImageForVersionArch) GetDatePublished() string` + +GetDatePublished returns the DatePublished field if non-nil, zero value otherwise. + +### GetDatePublishedOk + +`func (o *ImageForVersionArch) GetDatePublishedOk() (*string, bool)` + +GetDatePublishedOk returns a tuple with the DatePublished field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatePublished + +`func (o *ImageForVersionArch) SetDatePublished(v string)` + +SetDatePublished sets DatePublished field to given value. + +### HasDatePublished + +`func (o *ImageForVersionArch) HasDatePublished() bool` + +HasDatePublished returns a boolean if a field has been set. + +### GetDownloadHref + +`func (o *ImageForVersionArch) GetDownloadHref() string` + +GetDownloadHref returns the DownloadHref field if non-nil, zero value otherwise. + +### GetDownloadHrefOk + +`func (o *ImageForVersionArch) GetDownloadHrefOk() (*string, bool)` + +GetDownloadHrefOk returns a tuple with the DownloadHref field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDownloadHref + +`func (o *ImageForVersionArch) SetDownloadHref(v string)` + +SetDownloadHref sets DownloadHref field to given value. + +### HasDownloadHref + +`func (o *ImageForVersionArch) HasDownloadHref() bool` + +HasDownloadHref returns a boolean if a field has been set. + +### GetFilename + +`func (o *ImageForVersionArch) GetFilename() string` + +GetFilename returns the Filename field if non-nil, zero value otherwise. + +### GetFilenameOk + +`func (o *ImageForVersionArch) GetFilenameOk() (*string, bool)` + +GetFilenameOk returns a tuple with the Filename field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilename + +`func (o *ImageForVersionArch) SetFilename(v string)` + +SetFilename sets Filename field to given value. + +### HasFilename + +`func (o *ImageForVersionArch) HasFilename() bool` + +HasFilename returns a boolean if a field has been set. + +### GetImageName + +`func (o *ImageForVersionArch) GetImageName() string` + +GetImageName returns the ImageName field if non-nil, zero value otherwise. + +### GetImageNameOk + +`func (o *ImageForVersionArch) GetImageNameOk() (*string, bool)` + +GetImageNameOk returns a tuple with the ImageName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImageName + +`func (o *ImageForVersionArch) SetImageName(v string)` + +SetImageName sets ImageName field to given value. + +### HasImageName + +`func (o *ImageForVersionArch) HasImageName() bool` + +HasImageName 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/docs/ImagesApi.md b/docs/ImagesApi.md index 4ab289a..8a01407 100644 --- a/docs/ImagesApi.md +++ b/docs/ImagesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.access.redhat.com/management/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**DownloadImage**](ImagesApi.md#DownloadImage) | **Get** /images/{checksum}/download | Download an image by its SHA256 checksum +[**ListImageDownloadsByVersionArch**](ImagesApi.md#ListImageDownloadsByVersionArch) | **Get** /images/rhel/{Version}/{Arch} | List RHEL image downloads by version and architecture. [**ListImagesByContentSet**](ImagesApi.md#ListImagesByContentSet) | **Get** /images/cset/{ContentSet} | List available images in a content set @@ -33,8 +34,8 @@ func main() { checksum := "checksum_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ImagesApi.DownloadImage(context.Background(), checksum).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ImagesApi.DownloadImage(context.Background(), checksum).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.DownloadImage``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -77,6 +78,79 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## ListImageDownloadsByVersionArch + +> InlineResponse2009 ListImageDownloadsByVersionArch(ctx, version, arch).Execute() + +List RHEL image downloads by version and architecture. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + version := "version_example" // string | + arch := "arch_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ImagesApi.ListImageDownloadsByVersionArch(context.Background(), version, arch).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ListImageDownloadsByVersionArch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListImageDownloadsByVersionArch`: InlineResponse2009 + fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ListImageDownloadsByVersionArch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**version** | **string** | | +**arch** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListImageDownloadsByVersionArchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**InlineResponse2009**](InlineResponse2009.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### 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) + + ## ListImagesByContentSet > InlineResponse2008 ListImagesByContentSet(ctx, contentSet).Limit(limit).Offset(offset).Execute() @@ -103,8 +177,8 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ImagesApi.ListImagesByContentSet(context.Background(), contentSet).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ImagesApi.ListImagesByContentSet(context.Background(), contentSet).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ListImagesByContentSet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/docs/InlineObject4.md b/docs/InlineObject4.md index 65fd590..aef6203 100644 --- a/docs/InlineObject4.md +++ b/docs/InlineObject4.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Identity** | **string** | base64-encoded cloud instance metadata | -**Signature** | **string** | base64-encoded cloud instance metadata signature | +**Identity** | **string** | base64-encoded cloud instance metadata. For GCE, please use the instance identity token (JWT) as it is. | +**Signature** | **string** | base64-encoded cloud instance metadata signature. For GCE, please omit this field. | ## Methods diff --git a/docs/InlineResponse20010.md b/docs/InlineResponse20010.md index 1f40cc8..596d880 100644 --- a/docs/InlineResponse20010.md +++ b/docs/InlineResponse20010.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]PkgContentSetArch**](PkgContentSetArch.md) | | [optional] -**Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] +**Body** | Pointer to [**OrgSimpleContentAccess**](OrgSimpleContentAccess.md) | | [optional] ## Methods @@ -28,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20010) GetBody() []PkgContentSetArch` +`func (o *InlineResponse20010) GetBody() OrgSimpleContentAccess` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20010) GetBodyOk() (*[]PkgContentSetArch, bool)` +`func (o *InlineResponse20010) GetBodyOk() (*OrgSimpleContentAccess, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20010) SetBody(v []PkgContentSetArch)` +`func (o *InlineResponse20010) SetBody(v OrgSimpleContentAccess)` SetBody sets Body field to given value. @@ -51,31 +50,6 @@ SetBody sets Body field to given value. HasBody returns a boolean if a field has been set. -### GetPagination - -`func (o *InlineResponse20010) GetPagination() APIPageParam` - -GetPagination returns the Pagination field if non-nil, zero value otherwise. - -### GetPaginationOk - -`func (o *InlineResponse20010) GetPaginationOk() (*APIPageParam, bool)` - -GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPagination - -`func (o *InlineResponse20010) SetPagination(v APIPageParam)` - -SetPagination sets Pagination field to given value. - -### HasPagination - -`func (o *InlineResponse20010) HasPagination() bool` - -HasPagination 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/docs/InlineResponse20011.md b/docs/InlineResponse20011.md index 7af9e9f..a6405e5 100644 --- a/docs/InlineResponse20011.md +++ b/docs/InlineResponse20011.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**PkgDetails**](PkgDetails.md) | | [optional] +**Body** | Pointer to [**[]PkgContentSetArch**](PkgContentSetArch.md) | | [optional] +**Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] ## Methods @@ -27,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20011) GetBody() PkgDetails` +`func (o *InlineResponse20011) GetBody() []PkgContentSetArch` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20011) GetBodyOk() (*PkgDetails, bool)` +`func (o *InlineResponse20011) GetBodyOk() (*[]PkgContentSetArch, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20011) SetBody(v PkgDetails)` +`func (o *InlineResponse20011) SetBody(v []PkgContentSetArch)` SetBody sets Body field to given value. @@ -50,6 +51,31 @@ SetBody sets Body field to given value. HasBody returns a boolean if a field has been set. +### GetPagination + +`func (o *InlineResponse20011) GetPagination() APIPageParam` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *InlineResponse20011) GetPaginationOk() (*APIPageParam, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *InlineResponse20011) SetPagination(v APIPageParam)` + +SetPagination sets Pagination field to given value. + +### HasPagination + +`func (o *InlineResponse20011) HasPagination() bool` + +HasPagination 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/docs/InlineResponse20012.md b/docs/InlineResponse20012.md index eb548f4..b2f1853 100644 --- a/docs/InlineResponse20012.md +++ b/docs/InlineResponse20012.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]DetailResponse**](DetailResponse.md) | ListResponse is the actual collection of subscription details that gets rendered | [optional] -**Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] +**Body** | Pointer to [**PkgDetails**](PkgDetails.md) | | [optional] ## Methods @@ -28,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20012) GetBody() []DetailResponse` +`func (o *InlineResponse20012) GetBody() PkgDetails` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20012) GetBodyOk() (*[]DetailResponse, bool)` +`func (o *InlineResponse20012) GetBodyOk() (*PkgDetails, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20012) SetBody(v []DetailResponse)` +`func (o *InlineResponse20012) SetBody(v PkgDetails)` SetBody sets Body field to given value. @@ -51,31 +50,6 @@ SetBody sets Body field to given value. HasBody returns a boolean if a field has been set. -### GetPagination - -`func (o *InlineResponse20012) GetPagination() APIPageParam` - -GetPagination returns the Pagination field if non-nil, zero value otherwise. - -### GetPaginationOk - -`func (o *InlineResponse20012) GetPaginationOk() (*APIPageParam, bool)` - -GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPagination - -`func (o *InlineResponse20012) SetPagination(v APIPageParam)` - -SetPagination sets Pagination field to given value. - -### HasPagination - -`func (o *InlineResponse20012) HasPagination() bool` - -HasPagination 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/docs/InlineResponse20013.md b/docs/InlineResponse20013.md index 549c3f0..5ecc0d3 100644 --- a/docs/InlineResponse20013.md +++ b/docs/InlineResponse20013.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]ContentSet**](ContentSet.md) | | [optional] +**Body** | Pointer to [**[]DetailResponse**](DetailResponse.md) | ListResponse is the actual collection of subscription details that gets rendered | [optional] **Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] ## Methods @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20013) GetBody() []ContentSet` +`func (o *InlineResponse20013) GetBody() []DetailResponse` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20013) GetBodyOk() (*[]ContentSet, bool)` +`func (o *InlineResponse20013) GetBodyOk() (*[]DetailResponse, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20013) SetBody(v []ContentSet)` +`func (o *InlineResponse20013) SetBody(v []DetailResponse)` SetBody sets Body field to given value. diff --git a/docs/InlineResponse20014.md b/docs/InlineResponse20014.md index 3feb7f3..fcf1228 100644 --- a/docs/InlineResponse20014.md +++ b/docs/InlineResponse20014.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]SystemList**](SystemList.md) | | [optional] +**Body** | Pointer to [**[]ContentSet**](ContentSet.md) | | [optional] **Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] ## Methods @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20014) GetBody() []SystemList` +`func (o *InlineResponse20014) GetBody() []ContentSet` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20014) GetBodyOk() (*[]SystemList, bool)` +`func (o *InlineResponse20014) GetBodyOk() (*[]ContentSet, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20014) SetBody(v []SystemList)` +`func (o *InlineResponse20014) SetBody(v []ContentSet)` SetBody sets Body field to given value. diff --git a/docs/InlineResponse20015.md b/docs/InlineResponse20015.md index d1a9872..0516566 100644 --- a/docs/InlineResponse20015.md +++ b/docs/InlineResponse20015.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]System**](System.md) | systemList is a System Slice | [optional] +**Body** | Pointer to [**[]SystemList**](SystemList.md) | | [optional] **Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] ## Methods @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20015) GetBody() []System` +`func (o *InlineResponse20015) GetBody() []SystemList` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20015) GetBodyOk() (*[]System, bool)` +`func (o *InlineResponse20015) GetBodyOk() (*[]SystemList, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20015) SetBody(v []System)` +`func (o *InlineResponse20015) SetBody(v []SystemList)` SetBody sets Body field to given value. diff --git a/docs/InlineResponse20016.md b/docs/InlineResponse20016.md index 66f199a..8297ed2 100644 --- a/docs/InlineResponse20016.md +++ b/docs/InlineResponse20016.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**ShowSystem**](ShowSystem.md) | | [optional] +**Body** | Pointer to [**[]System**](System.md) | systemList is a System Slice | [optional] +**Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] ## Methods @@ -27,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20016) GetBody() ShowSystem` +`func (o *InlineResponse20016) GetBody() []System` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20016) GetBodyOk() (*ShowSystem, bool)` +`func (o *InlineResponse20016) GetBodyOk() (*[]System, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20016) SetBody(v ShowSystem)` +`func (o *InlineResponse20016) SetBody(v []System)` SetBody sets Body field to given value. @@ -50,6 +51,31 @@ SetBody sets Body field to given value. HasBody returns a boolean if a field has been set. +### GetPagination + +`func (o *InlineResponse20016) GetPagination() APIPageParam` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *InlineResponse20016) GetPaginationOk() (*APIPageParam, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *InlineResponse20016) SetPagination(v APIPageParam)` + +SetPagination sets Pagination field to given value. + +### HasPagination + +`func (o *InlineResponse20016) HasPagination() bool` + +HasPagination 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/docs/InlineResponse20017.md b/docs/InlineResponse20017.md index ce4aacc..01e26bb 100644 --- a/docs/InlineResponse20017.md +++ b/docs/InlineResponse20017.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**AttachEntitlement**](AttachEntitlement.md) | | [optional] +**Body** | Pointer to [**ShowSystem**](ShowSystem.md) | | [optional] ## Methods @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20017) GetBody() AttachEntitlement` +`func (o *InlineResponse20017) GetBody() ShowSystem` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20017) GetBodyOk() (*AttachEntitlement, bool)` +`func (o *InlineResponse20017) GetBodyOk() (*ShowSystem, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20017) SetBody(v AttachEntitlement)` +`func (o *InlineResponse20017) SetBody(v ShowSystem)` SetBody sets Body field to given value. diff --git a/docs/InlineResponse20018.md b/docs/InlineResponse20018.md index ecb6280..b282480 100644 --- a/docs/InlineResponse20018.md +++ b/docs/InlineResponse20018.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]ErratumForSystem**](ErratumForSystem.md) | | [optional] -**Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] +**Body** | Pointer to [**AttachEntitlement**](AttachEntitlement.md) | | [optional] ## Methods @@ -28,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20018) GetBody() []ErratumForSystem` +`func (o *InlineResponse20018) GetBody() AttachEntitlement` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20018) GetBodyOk() (*[]ErratumForSystem, bool)` +`func (o *InlineResponse20018) GetBodyOk() (*AttachEntitlement, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20018) SetBody(v []ErratumForSystem)` +`func (o *InlineResponse20018) SetBody(v AttachEntitlement)` SetBody sets Body field to given value. @@ -51,31 +50,6 @@ SetBody sets Body field to given value. HasBody returns a boolean if a field has been set. -### GetPagination - -`func (o *InlineResponse20018) GetPagination() APIPageParam` - -GetPagination returns the Pagination field if non-nil, zero value otherwise. - -### GetPaginationOk - -`func (o *InlineResponse20018) GetPaginationOk() (*APIPageParam, bool)` - -GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPagination - -`func (o *InlineResponse20018) SetPagination(v APIPageParam)` - -SetPagination sets Pagination field to given value. - -### HasPagination - -`func (o *InlineResponse20018) HasPagination() bool` - -HasPagination 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/docs/InlineResponse20019.md b/docs/InlineResponse20019.md index 411161c..ae7e502 100644 --- a/docs/InlineResponse20019.md +++ b/docs/InlineResponse20019.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**[]PackageForSystem**](PackageForSystem.md) | | [optional] +**Body** | Pointer to [**[]ErratumForSystem**](ErratumForSystem.md) | | [optional] **Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] ## Methods @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse20019) GetBody() []PackageForSystem` +`func (o *InlineResponse20019) GetBody() []ErratumForSystem` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse20019) GetBodyOk() (*[]PackageForSystem, bool)` +`func (o *InlineResponse20019) GetBodyOk() (*[]ErratumForSystem, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse20019) SetBody(v []PackageForSystem)` +`func (o *InlineResponse20019) SetBody(v []ErratumForSystem)` SetBody sets Body field to given value. diff --git a/docs/InlineResponse20020.md b/docs/InlineResponse20020.md new file mode 100644 index 0000000..a7e9111 --- /dev/null +++ b/docs/InlineResponse20020.md @@ -0,0 +1,82 @@ +# InlineResponse20020 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Body** | Pointer to [**[]PackageForSystem**](PackageForSystem.md) | | [optional] +**Pagination** | Pointer to [**APIPageParam**](APIPageParam.md) | | [optional] + +## Methods + +### NewInlineResponse20020 + +`func NewInlineResponse20020() *InlineResponse20020` + +NewInlineResponse20020 instantiates a new InlineResponse20020 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 + +### NewInlineResponse20020WithDefaults + +`func NewInlineResponse20020WithDefaults() *InlineResponse20020` + +NewInlineResponse20020WithDefaults instantiates a new InlineResponse20020 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 + +### GetBody + +`func (o *InlineResponse20020) GetBody() []PackageForSystem` + +GetBody returns the Body field if non-nil, zero value otherwise. + +### GetBodyOk + +`func (o *InlineResponse20020) GetBodyOk() (*[]PackageForSystem, bool)` + +GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBody + +`func (o *InlineResponse20020) SetBody(v []PackageForSystem)` + +SetBody sets Body field to given value. + +### HasBody + +`func (o *InlineResponse20020) HasBody() bool` + +HasBody returns a boolean if a field has been set. + +### GetPagination + +`func (o *InlineResponse20020) GetPagination() APIPageParam` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *InlineResponse20020) GetPaginationOk() (*APIPageParam, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *InlineResponse20020) SetPagination(v APIPageParam)` + +SetPagination sets Pagination field to given value. + +### HasPagination + +`func (o *InlineResponse20020) HasPagination() bool` + +HasPagination 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/docs/InlineResponse2009.md b/docs/InlineResponse2009.md index 7ee8b37..62508da 100644 --- a/docs/InlineResponse2009.md +++ b/docs/InlineResponse2009.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Body** | Pointer to [**OrgSimpleContentAccess**](OrgSimpleContentAccess.md) | | [optional] +**Body** | Pointer to [**[]ImageInContentSet**](ImageInContentSet.md) | | [optional] ## Methods @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetBody -`func (o *InlineResponse2009) GetBody() OrgSimpleContentAccess` +`func (o *InlineResponse2009) GetBody() []ImageInContentSet` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk -`func (o *InlineResponse2009) GetBodyOk() (*OrgSimpleContentAccess, bool)` +`func (o *InlineResponse2009) GetBodyOk() (*[]ImageInContentSet, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody -`func (o *InlineResponse2009) SetBody(v OrgSimpleContentAccess)` +`func (o *InlineResponse2009) SetBody(v []ImageInContentSet)` SetBody sets Body field to given value. diff --git a/docs/OrgSimpleContentAccess.md b/docs/OrgSimpleContentAccess.md index f910780..490da4d 100644 --- a/docs/OrgSimpleContentAccess.md +++ b/docs/OrgSimpleContentAccess.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Id** | Pointer to **string** | | [optional] **SimpleContentAccess** | Pointer to **string** | | [optional] **SimpleContentAccessCapable** | Pointer to **bool** | | [optional] +**SystemPurposeAttributes** | Pointer to [**SystemPurposeAttributes**](SystemPurposeAttributes.md) | | [optional] ## Methods @@ -102,6 +103,31 @@ SetSimpleContentAccessCapable sets SimpleContentAccessCapable field to given val HasSimpleContentAccessCapable returns a boolean if a field has been set. +### GetSystemPurposeAttributes + +`func (o *OrgSimpleContentAccess) GetSystemPurposeAttributes() SystemPurposeAttributes` + +GetSystemPurposeAttributes returns the SystemPurposeAttributes field if non-nil, zero value otherwise. + +### GetSystemPurposeAttributesOk + +`func (o *OrgSimpleContentAccess) GetSystemPurposeAttributesOk() (*SystemPurposeAttributes, bool)` + +GetSystemPurposeAttributesOk returns a tuple with the SystemPurposeAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSystemPurposeAttributes + +`func (o *OrgSimpleContentAccess) SetSystemPurposeAttributes(v SystemPurposeAttributes)` + +SetSystemPurposeAttributes sets SystemPurposeAttributes field to given value. + +### HasSystemPurposeAttributes + +`func (o *OrgSimpleContentAccess) HasSystemPurposeAttributes() bool` + +HasSystemPurposeAttributes 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/docs/OrganizationApi.md b/docs/OrganizationApi.md index 8aa7e09..0a382af 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## CheckOrgSCACapability -> InlineResponse2009 CheckOrgSCACapability(ctx).Execute() +> InlineResponse20010 CheckOrgSCACapability(ctx).Include(include).Execute() Get details of the user's organization @@ -29,31 +29,36 @@ import ( ) func main() { + include := "include_example" // string | Request for system purpose attributes in response (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.CheckOrgSCACapability(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationApi.CheckOrgSCACapability(context.Background()).Include(include).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.CheckOrgSCACapability``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CheckOrgSCACapability`: InlineResponse2009 + // response from `CheckOrgSCACapability`: InlineResponse20010 fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.CheckOrgSCACapability`: %v\n", resp) } ``` ### Path Parameters -This endpoint does not need any parameter. + ### Other Parameters Other parameters are passed through a pointer to a apiCheckOrgSCACapabilityRequest struct via the builder pattern +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **include** | **string** | Request for system purpose attributes in response | + ### Return type -[**InlineResponse2009**](InlineResponse2009.md) +[**InlineResponse20010**](InlineResponse20010.md) ### Authorization diff --git a/docs/PackagesApi.md b/docs/PackagesApi.md index b3f43e5..3769d4b 100644 --- a/docs/PackagesApi.md +++ b/docs/PackagesApi.md @@ -34,8 +34,8 @@ func main() { checksum := "checksum_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PackagesApi.DownloadPackage(context.Background(), checksum).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PackagesApi.DownloadPackage(context.Background(), checksum).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PackagesApi.DownloadPackage``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -80,7 +80,7 @@ Name | Type | Description | Notes ## ListPackagesByContentSetArch -> InlineResponse20010 ListPackagesByContentSetArch(ctx, contentSet, arch).Limit(limit).Offset(offset).Filter(filter).Execute() +> InlineResponse20011 ListPackagesByContentSetArch(ctx, contentSet, arch).Limit(limit).Offset(offset).Filter(filter).Execute() Get all the packages for the specified content set and arch. @@ -106,13 +106,13 @@ func main() { filter := []string{"Filter_example"} // []string | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PackagesApi.ListPackagesByContentSetArch(context.Background(), contentSet, arch).Limit(limit).Offset(offset).Filter(filter).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PackagesApi.ListPackagesByContentSetArch(context.Background(), contentSet, arch).Limit(limit).Offset(offset).Filter(filter).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PackagesApi.ListPackagesByContentSetArch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListPackagesByContentSetArch`: InlineResponse20010 + // response from `ListPackagesByContentSetArch`: InlineResponse20011 fmt.Fprintf(os.Stdout, "Response from `PackagesApi.ListPackagesByContentSetArch`: %v\n", resp) } ``` @@ -141,7 +141,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20010**](InlineResponse20010.md) +[**InlineResponse20011**](InlineResponse20011.md) ### Authorization @@ -159,7 +159,7 @@ Name | Type | Description | Notes ## ShowPackage -> InlineResponse20011 ShowPackage(ctx, checksum).Execute() +> InlineResponse20012 ShowPackage(ctx, checksum).Execute() Get the details of a package @@ -181,13 +181,13 @@ func main() { checksum := "checksum_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PackagesApi.ShowPackage(context.Background(), checksum).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PackagesApi.ShowPackage(context.Background(), checksum).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PackagesApi.ShowPackage``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ShowPackage`: InlineResponse20011 + // response from `ShowPackage`: InlineResponse20012 fmt.Fprintf(os.Stdout, "Response from `PackagesApi.ShowPackage`: %v\n", resp) } ``` @@ -211,7 +211,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20011**](InlineResponse20011.md) +[**InlineResponse20012**](InlineResponse20012.md) ### Authorization diff --git a/docs/SubscriptionApi.md b/docs/SubscriptionApi.md index 7273782..07f3612 100644 --- a/docs/SubscriptionApi.md +++ b/docs/SubscriptionApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description ## ListSubContentSets -> InlineResponse20013 ListSubContentSets(ctx, subscriptionNumber).Limit(limit).Offset(offset).Execute() +> InlineResponse20014 ListSubContentSets(ctx, subscriptionNumber).Limit(limit).Offset(offset).Execute() List all content sets for a subscription @@ -36,13 +36,13 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SubscriptionApi.ListSubContentSets(context.Background(), subscriptionNumber).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubscriptionApi.ListSubContentSets(context.Background(), subscriptionNumber).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.ListSubContentSets``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListSubContentSets`: InlineResponse20013 + // response from `ListSubContentSets`: InlineResponse20014 fmt.Fprintf(os.Stdout, "Response from `SubscriptionApi.ListSubContentSets`: %v\n", resp) } ``` @@ -68,7 +68,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20013**](InlineResponse20013.md) +[**InlineResponse20014**](InlineResponse20014.md) ### Authorization @@ -86,7 +86,7 @@ Name | Type | Description | Notes ## ListSubSystems -> InlineResponse20014 ListSubSystems(ctx, subscriptionNumber).Limit(limit).Offset(offset).Execute() +> InlineResponse20015 ListSubSystems(ctx, subscriptionNumber).Limit(limit).Offset(offset).Execute() List all systems consuming a subscription @@ -110,13 +110,13 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SubscriptionApi.ListSubSystems(context.Background(), subscriptionNumber).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubscriptionApi.ListSubSystems(context.Background(), subscriptionNumber).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.ListSubSystems``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListSubSystems`: InlineResponse20014 + // response from `ListSubSystems`: InlineResponse20015 fmt.Fprintf(os.Stdout, "Response from `SubscriptionApi.ListSubSystems`: %v\n", resp) } ``` @@ -142,7 +142,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20014**](InlineResponse20014.md) +[**InlineResponse20015**](InlineResponse20015.md) ### Authorization @@ -160,7 +160,7 @@ Name | Type | Description | Notes ## ListSubscriptions -> InlineResponse20012 ListSubscriptions(ctx).Limit(limit).Offset(offset).Execute() +> InlineResponse20013 ListSubscriptions(ctx).Limit(limit).Offset(offset).Execute() List all subscriptions for a user @@ -183,13 +183,13 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SubscriptionApi.ListSubscriptions(context.Background()).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubscriptionApi.ListSubscriptions(context.Background()).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.ListSubscriptions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListSubscriptions`: InlineResponse20012 + // response from `ListSubscriptions`: InlineResponse20013 fmt.Fprintf(os.Stdout, "Response from `SubscriptionApi.ListSubscriptions`: %v\n", resp) } ``` @@ -210,7 +210,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20012**](InlineResponse20012.md) +[**InlineResponse20013**](InlineResponse20013.md) ### Authorization diff --git a/docs/SystemApi.md b/docs/SystemApi.md index 24adcec..ba4c33d 100644 --- a/docs/SystemApi.md +++ b/docs/SystemApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description ## AttachEntitlement -> InlineResponse20017 AttachEntitlement(ctx, systemUUID).Pool(pool).Quantity(quantity).Execute() +> InlineResponse20018 AttachEntitlement(ctx, systemUUID).Pool(pool).Quantity(quantity).Execute() Attach entitlement to system @@ -41,13 +41,13 @@ func main() { quantity := int32(56) // int32 | quantity you want to attach (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.AttachEntitlement(context.Background(), systemUUID).Pool(pool).Quantity(quantity).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.AttachEntitlement(context.Background(), systemUUID).Pool(pool).Quantity(quantity).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.AttachEntitlement``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `AttachEntitlement`: InlineResponse20017 + // response from `AttachEntitlement`: InlineResponse20018 fmt.Fprintf(os.Stdout, "Response from `SystemApi.AttachEntitlement`: %v\n", resp) } ``` @@ -73,7 +73,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20017**](InlineResponse20017.md) +[**InlineResponse20018**](InlineResponse20018.md) ### Authorization @@ -91,7 +91,7 @@ Name | Type | Description | Notes ## ListSystemErrata -> InlineResponse20018 ListSystemErrata(ctx, systemUUID).Limit(limit).Offset(offset).Execute() +> InlineResponse20019 ListSystemErrata(ctx, systemUUID).Limit(limit).Offset(offset).Execute() List all applicable errata for a system @@ -115,13 +115,13 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.ListSystemErrata(context.Background(), systemUUID).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.ListSystemErrata(context.Background(), systemUUID).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.ListSystemErrata``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListSystemErrata`: InlineResponse20018 + // response from `ListSystemErrata`: InlineResponse20019 fmt.Fprintf(os.Stdout, "Response from `SystemApi.ListSystemErrata`: %v\n", resp) } ``` @@ -147,7 +147,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20018**](InlineResponse20018.md) +[**InlineResponse20019**](InlineResponse20019.md) ### Authorization @@ -165,7 +165,7 @@ Name | Type | Description | Notes ## ListSystemPackages -> InlineResponse20019 ListSystemPackages(ctx, systemUUID).Limit(limit).Offset(offset).ErrataDetail(errataDetail).Upgradeable(upgradeable).Filter(filter).Execute() +> InlineResponse20020 ListSystemPackages(ctx, systemUUID).Limit(limit).Offset(offset).ErrataDetail(errataDetail).Upgradeable(upgradeable).Filter(filter).Execute() List all packages for a system @@ -192,13 +192,13 @@ func main() { filter := "filter_example" // string | Filter packages (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.ListSystemPackages(context.Background(), systemUUID).Limit(limit).Offset(offset).ErrataDetail(errataDetail).Upgradeable(upgradeable).Filter(filter).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.ListSystemPackages(context.Background(), systemUUID).Limit(limit).Offset(offset).ErrataDetail(errataDetail).Upgradeable(upgradeable).Filter(filter).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.ListSystemPackages``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListSystemPackages`: InlineResponse20019 + // response from `ListSystemPackages`: InlineResponse20020 fmt.Fprintf(os.Stdout, "Response from `SystemApi.ListSystemPackages`: %v\n", resp) } ``` @@ -227,7 +227,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20019**](InlineResponse20019.md) +[**InlineResponse20020**](InlineResponse20020.md) ### Authorization @@ -269,8 +269,8 @@ func main() { offset := int32(56) // int32 | index from which you want next items (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.ListSystemPools(context.Background(), systemUUID).Limit(limit).Offset(offset).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.ListSystemPools(context.Background(), systemUUID).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.ListSystemPools``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -319,7 +319,7 @@ Name | Type | Description | Notes ## ListSystems -> InlineResponse20015 ListSystems(ctx).Limit(limit).Offset(offset).Filter(filter).Username(username).Execute() +> InlineResponse20016 ListSystems(ctx).Limit(limit).Offset(offset).Filter(filter).Username(username).Execute() List all systems for a user @@ -344,13 +344,13 @@ func main() { username := "username_example" // string | Filter Systems by a valid User Name, where User Name is the system owner and wildcard characters are not allowed (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.ListSystems(context.Background()).Limit(limit).Offset(offset).Filter(filter).Username(username).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.ListSystems(context.Background()).Limit(limit).Offset(offset).Filter(filter).Username(username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.ListSystems``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListSystems`: InlineResponse20015 + // response from `ListSystems`: InlineResponse20016 fmt.Fprintf(os.Stdout, "Response from `SystemApi.ListSystems`: %v\n", resp) } ``` @@ -373,7 +373,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20015**](InlineResponse20015.md) +[**InlineResponse20016**](InlineResponse20016.md) ### Authorization @@ -413,8 +413,8 @@ func main() { systemUUID := "systemUUID_example" // string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.RemoveSystem(context.Background(), systemUUID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.RemoveSystem(context.Background(), systemUUID).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.RemoveSystem``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -482,8 +482,8 @@ func main() { entitlementID := "entitlementID_example" // string | Remove an entitlement from a system configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.RemoveSystemEntitlement(context.Background(), systemUUID, entitlementID).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.RemoveSystemEntitlement(context.Background(), systemUUID, entitlementID).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.RemoveSystemEntitlement``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -530,7 +530,7 @@ Name | Type | Description | Notes ## ShowSystem -> InlineResponse20016 ShowSystem(ctx, systemUUID).Include(include).Execute() +> InlineResponse20017 ShowSystem(ctx, systemUUID).Include(include).Execute() Get a system specified by UUID. @@ -553,13 +553,13 @@ func main() { include := []string{"Include_example"} // []string | Show more details about a system (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.SystemApi.ShowSystem(context.Background(), systemUUID).Include(include).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemApi.ShowSystem(context.Background(), systemUUID).Include(include).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SystemApi.ShowSystem``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ShowSystem`: InlineResponse20016 + // response from `ShowSystem`: InlineResponse20017 fmt.Fprintf(os.Stdout, "Response from `SystemApi.ShowSystem`: %v\n", resp) } ``` @@ -584,7 +584,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20016**](InlineResponse20016.md) +[**InlineResponse20017**](InlineResponse20017.md) ### Authorization diff --git a/docs/SystemPurposeAttributes.md b/docs/SystemPurposeAttributes.md new file mode 100644 index 0000000..6d00fa9 --- /dev/null +++ b/docs/SystemPurposeAttributes.md @@ -0,0 +1,108 @@ +# SystemPurposeAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Roles** | Pointer to **[]string** | | [optional] +**ServiceLevel** | Pointer to **[]string** | | [optional] +**Usage** | Pointer to **[]string** | | [optional] + +## Methods + +### NewSystemPurposeAttributes + +`func NewSystemPurposeAttributes() *SystemPurposeAttributes` + +NewSystemPurposeAttributes instantiates a new SystemPurposeAttributes 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 + +### NewSystemPurposeAttributesWithDefaults + +`func NewSystemPurposeAttributesWithDefaults() *SystemPurposeAttributes` + +NewSystemPurposeAttributesWithDefaults instantiates a new SystemPurposeAttributes 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 + +### GetRoles + +`func (o *SystemPurposeAttributes) GetRoles() []string` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *SystemPurposeAttributes) GetRolesOk() (*[]string, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *SystemPurposeAttributes) SetRoles(v []string)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *SystemPurposeAttributes) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetServiceLevel + +`func (o *SystemPurposeAttributes) GetServiceLevel() []string` + +GetServiceLevel returns the ServiceLevel field if non-nil, zero value otherwise. + +### GetServiceLevelOk + +`func (o *SystemPurposeAttributes) GetServiceLevelOk() (*[]string, bool)` + +GetServiceLevelOk returns a tuple with the ServiceLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceLevel + +`func (o *SystemPurposeAttributes) SetServiceLevel(v []string)` + +SetServiceLevel sets ServiceLevel field to given value. + +### HasServiceLevel + +`func (o *SystemPurposeAttributes) HasServiceLevel() bool` + +HasServiceLevel returns a boolean if a field has been set. + +### GetUsage + +`func (o *SystemPurposeAttributes) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *SystemPurposeAttributes) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *SystemPurposeAttributes) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *SystemPurposeAttributes) HasUsage() bool` + +HasUsage 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/git_push.sh b/git_push.sh index ced3be2..f53a75d 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,7 +1,7 @@ #!/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" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ 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/go.mod b/go.mod index 03329a2..6f5126d 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,12 @@ module github.com/umich-vci/gorhsm -go 1.16 +go 1.17 -require golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 +require golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 + +require ( + github.com/golang/protobuf v1.4.2 // indirect + golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect + google.golang.org/appengine v1.6.6 // indirect + google.golang.org/protobuf v1.25.0 // indirect +) diff --git a/go.sum b/go.sum index ae0eaba..aca013a 100644 --- a/go.sum +++ b/go.sum @@ -183,8 +183,8 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 h1:5vD4XjIc0X5+kHZjx4UecYdjA6mJo+XXNoaW0EjU5Os= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/model_add_provider_account.go b/model_add_provider_account.go index a451560..536462c 100644 --- a/model_add_provider_account.go +++ b/model_add_provider_account.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_allocation.go b/model_allocation.go index 77a72e6..2b3ed59 100644 --- a/model_allocation.go +++ b/model_allocation.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_allocation_details.go b/model_allocation_details.go index 5612288..f13ab76 100644 --- a/model_allocation_details.go +++ b/model_allocation_details.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_allocation_summary.go b/model_allocation_summary.go index 2b40a5d..8af7258 100644 --- a/model_allocation_summary.go +++ b/model_allocation_summary.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_allocation_version.go b/model_allocation_version.go index 9049fd8..697f36f 100644 --- a/model_allocation_version.go +++ b/model_allocation_version.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_api_page_param.go b/model_api_page_param.go index 3540cf9..e617eeb 100644 --- a/model_api_page_param.go +++ b/model_api_page_param.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_attach_entitlement.go b/model_attach_entitlement.go index c3e0480..fee0227 100644 --- a/model_attach_entitlement.go +++ b/model_attach_entitlement.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_content_set.go b/model_content_set.go index a37254b..e7b7d08 100644 --- a/model_content_set.go +++ b/model_content_set.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_content_set_arch_mock.go b/model_content_set_arch_mock.go index fcb2bb5..3179e40 100644 --- a/model_content_set_arch_mock.go +++ b/model_content_set_arch_mock.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,8 @@ import ( // ContentSetArchMock struct for ContentSetArchMock type ContentSetArchMock struct { - Body *[]ErratumInContentSet `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body []ErratumInContentSet `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewContentSetArchMock instantiates a new ContentSetArchMock object @@ -43,12 +43,12 @@ func (o *ContentSetArchMock) GetBody() []ErratumInContentSet { var ret []ErratumInContentSet return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ContentSetArchMock) GetBodyOk() (*[]ErratumInContentSet, bool) { +func (o *ContentSetArchMock) GetBodyOk() ([]ErratumInContentSet, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *ContentSetArchMock) HasBody() bool { // SetBody gets a reference to the given []ErratumInContentSet and assigns it to the Body field. func (o *ContentSetArchMock) SetBody(v []ErratumInContentSet) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_detail_response.go b/model_detail_response.go index 0adb24e..ff82b1e 100644 --- a/model_detail_response.go +++ b/model_detail_response.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,7 +19,7 @@ type DetailResponse struct { ContractNumber *string `json:"contractNumber,omitempty"` // Date represents the date format used for API returns EndDate *string `json:"endDate,omitempty"` - Pools *[]Pool `json:"pools,omitempty"` + Pools []Pool `json:"pools,omitempty"` Quantity *string `json:"quantity,omitempty"` Sku *string `json:"sku,omitempty"` // Date represents the date format used for API returns @@ -116,12 +116,12 @@ func (o *DetailResponse) GetPools() []Pool { var ret []Pool return ret } - return *o.Pools + return o.Pools } // GetPoolsOk returns a tuple with the Pools field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DetailResponse) GetPoolsOk() (*[]Pool, bool) { +func (o *DetailResponse) GetPoolsOk() ([]Pool, bool) { if o == nil || o.Pools == nil { return nil, false } @@ -139,7 +139,7 @@ func (o *DetailResponse) HasPools() bool { // SetPools gets a reference to the given []Pool and assigns it to the Pools field. func (o *DetailResponse) SetPools(v []Pool) { - o.Pools = &v + o.Pools = v } // GetQuantity returns the Quantity field value if set, zero value otherwise. diff --git a/model_download_link.go b/model_download_link.go index 8cf1eff..9cf8647 100644 --- a/model_download_link.go +++ b/model_download_link.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_enabled_cloud_access_provider.go b/model_enabled_cloud_access_provider.go index 48c0261..5405a89 100644 --- a/model_enabled_cloud_access_provider.go +++ b/model_enabled_cloud_access_provider.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,10 +16,10 @@ import ( // EnabledCloudAccessProvider Enabled Cloud Access Provider details including products and accounts. type EnabledCloudAccessProvider struct { - Accounts *[]EnabledProviderAccount `json:"accounts,omitempty"` - Name *string `json:"name,omitempty"` - Products *[]EnabledProduct `json:"products,omitempty"` - ShortName *string `json:"shortName,omitempty"` + Accounts []EnabledProviderAccount `json:"accounts,omitempty"` + Name *string `json:"name,omitempty"` + Products []EnabledProduct `json:"products,omitempty"` + ShortName *string `json:"shortName,omitempty"` } // NewEnabledCloudAccessProvider instantiates a new EnabledCloudAccessProvider object @@ -45,12 +45,12 @@ func (o *EnabledCloudAccessProvider) GetAccounts() []EnabledProviderAccount { var ret []EnabledProviderAccount return ret } - return *o.Accounts + return o.Accounts } // GetAccountsOk returns a tuple with the Accounts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnabledCloudAccessProvider) GetAccountsOk() (*[]EnabledProviderAccount, bool) { +func (o *EnabledCloudAccessProvider) GetAccountsOk() ([]EnabledProviderAccount, bool) { if o == nil || o.Accounts == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *EnabledCloudAccessProvider) HasAccounts() bool { // SetAccounts gets a reference to the given []EnabledProviderAccount and assigns it to the Accounts field. func (o *EnabledCloudAccessProvider) SetAccounts(v []EnabledProviderAccount) { - o.Accounts = &v + o.Accounts = v } // GetName returns the Name field value if set, zero value otherwise. @@ -109,12 +109,12 @@ func (o *EnabledCloudAccessProvider) GetProducts() []EnabledProduct { var ret []EnabledProduct return ret } - return *o.Products + return o.Products } // GetProductsOk returns a tuple with the Products field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnabledCloudAccessProvider) GetProductsOk() (*[]EnabledProduct, bool) { +func (o *EnabledCloudAccessProvider) GetProductsOk() ([]EnabledProduct, bool) { if o == nil || o.Products == nil { return nil, false } @@ -132,7 +132,7 @@ func (o *EnabledCloudAccessProvider) HasProducts() bool { // SetProducts gets a reference to the given []EnabledProduct and assigns it to the Products field. func (o *EnabledCloudAccessProvider) SetProducts(v []EnabledProduct) { - o.Products = &v + o.Products = v } // GetShortName returns the ShortName field value if set, zero value otherwise. diff --git a/model_enabled_product.go b/model_enabled_product.go index 524728e..14b24c3 100644 --- a/model_enabled_product.go +++ b/model_enabled_product.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,9 +16,9 @@ import ( // EnabledProduct Enabled Product represents a cloud access provider product type EnabledProduct struct { - EnabledQuantity *int32 `json:"enabledQuantity,omitempty"` - ImageGroups *[]string `json:"imageGroups,omitempty"` - Name *string `json:"name,omitempty"` + EnabledQuantity *int32 `json:"enabledQuantity,omitempty"` + ImageGroups []string `json:"imageGroups,omitempty"` + Name *string `json:"name,omitempty"` // ShortDate represents the short date format used for API returns where time precision is not needed NextRenewal *string `json:"nextRenewal,omitempty"` Sku *string `json:"sku,omitempty"` @@ -80,12 +80,12 @@ func (o *EnabledProduct) GetImageGroups() []string { var ret []string return ret } - return *o.ImageGroups + return o.ImageGroups } // GetImageGroupsOk returns a tuple with the ImageGroups field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnabledProduct) GetImageGroupsOk() (*[]string, bool) { +func (o *EnabledProduct) GetImageGroupsOk() ([]string, bool) { if o == nil || o.ImageGroups == nil { return nil, false } @@ -103,7 +103,7 @@ func (o *EnabledProduct) HasImageGroups() bool { // SetImageGroups gets a reference to the given []string and assigns it to the ImageGroups field. func (o *EnabledProduct) SetImageGroups(v []string) { - o.ImageGroups = &v + o.ImageGroups = v } // GetName returns the Name field value if set, zero value otherwise. diff --git a/model_enabled_provider_account.go b/model_enabled_provider_account.go index 27bec6b..4255f4a 100644 --- a/model_enabled_provider_account.go +++ b/model_enabled_provider_account.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,10 +17,10 @@ import ( // EnabledProviderAccount Enabled Provider Account represents a cloud access provider account type EnabledProviderAccount struct { // Date represents the date format used for API returns - DateAdded string `json:"dateAdded"` - GoldImageStatus *[]GoldImageStatus `json:"goldImageStatus,omitempty"` - Id string `json:"id"` - Nickname string `json:"nickname"` + DateAdded string `json:"dateAdded"` + GoldImageStatus []GoldImageStatus `json:"goldImageStatus,omitempty"` + Id string `json:"id"` + Nickname string `json:"nickname"` // Source ID of linked account (only for accounts created via Sources on cloud.redhat.com) SourceId *string `json:"sourceId,omitempty"` // verification status for RHSM Auto Registration (only displayed for supported cloud providers) @@ -77,12 +77,12 @@ func (o *EnabledProviderAccount) GetGoldImageStatus() []GoldImageStatus { var ret []GoldImageStatus return ret } - return *o.GoldImageStatus + return o.GoldImageStatus } // GetGoldImageStatusOk returns a tuple with the GoldImageStatus field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnabledProviderAccount) GetGoldImageStatusOk() (*[]GoldImageStatus, bool) { +func (o *EnabledProviderAccount) GetGoldImageStatusOk() ([]GoldImageStatus, bool) { if o == nil || o.GoldImageStatus == nil { return nil, false } @@ -100,7 +100,7 @@ func (o *EnabledProviderAccount) HasGoldImageStatus() bool { // SetGoldImageStatus gets a reference to the given []GoldImageStatus and assigns it to the GoldImageStatus field. func (o *EnabledProviderAccount) SetGoldImageStatus(v []GoldImageStatus) { - o.GoldImageStatus = &v + o.GoldImageStatus = v } // GetId returns the Id field value diff --git a/model_entitlements_attached_response.go b/model_entitlements_attached_response.go index 8350de5..c37cdc6 100644 --- a/model_entitlements_attached_response.go +++ b/model_entitlements_attached_response.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,9 +16,9 @@ import ( // EntitlementsAttachedResponse EntitlementsAttachedResponse wraps data obtained for EntitlementsAttached and sends metadata about it using helpers.OptionalResult type EntitlementsAttachedResponse struct { - Reason *string `json:"reason,omitempty"` - Valid *bool `json:"valid,omitempty"` - Value *[]EntitlementsAttachedResponseValue `json:"value,omitempty"` + Reason *string `json:"reason,omitempty"` + Valid *bool `json:"valid,omitempty"` + Value []EntitlementsAttachedResponseValue `json:"value,omitempty"` } // NewEntitlementsAttachedResponse instantiates a new EntitlementsAttachedResponse object @@ -108,12 +108,12 @@ func (o *EntitlementsAttachedResponse) GetValue() []EntitlementsAttachedResponse var ret []EntitlementsAttachedResponseValue return ret } - return *o.Value + return o.Value } // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EntitlementsAttachedResponse) GetValueOk() (*[]EntitlementsAttachedResponseValue, bool) { +func (o *EntitlementsAttachedResponse) GetValueOk() ([]EntitlementsAttachedResponseValue, bool) { if o == nil || o.Value == nil { return nil, false } @@ -131,7 +131,7 @@ func (o *EntitlementsAttachedResponse) HasValue() bool { // SetValue gets a reference to the given []EntitlementsAttachedResponseValue and assigns it to the Value field. func (o *EntitlementsAttachedResponse) SetValue(v []EntitlementsAttachedResponseValue) { - o.Value = &v + o.Value = v } func (o EntitlementsAttachedResponse) MarshalJSON() ([]byte, error) { diff --git a/model_entitlements_attached_response_value.go b/model_entitlements_attached_response_value.go index 150ec0e..9d00b73 100644 --- a/model_entitlements_attached_response_value.go +++ b/model_entitlements_attached_response_value.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_errata_applicability_counts.go b/model_errata_applicability_counts.go index 70f2561..7546a62 100644 --- a/model_errata_applicability_counts.go +++ b/model_errata_applicability_counts.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_errata_count.go b/model_errata_count.go index 3dd2c46..649afb3 100644 --- a/model_errata_count.go +++ b/model_errata_count.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_erratum_details.go b/model_erratum_details.go index da827de..2f8199c 100644 --- a/model_erratum_details.go +++ b/model_erratum_details.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,23 +16,23 @@ import ( // ErratumDetails struct for ErratumDetails type ErratumDetails struct { - AffectedProducts *[]string `json:"affectedProducts,omitempty"` - Bugzillas *[]Reference `json:"bugzillas,omitempty"` - CopyrightYear *string `json:"copyrightYear,omitempty"` - Cves *string `json:"cves,omitempty"` - Description *string `json:"description,omitempty"` - Id *string `json:"id,omitempty"` + AffectedProducts []string `json:"affectedProducts,omitempty"` + Bugzillas []Reference `json:"bugzillas,omitempty"` + CopyrightYear *string `json:"copyrightYear,omitempty"` + Cves *string `json:"cves,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` // Date represents the date format used for API returns Issued *string `json:"issued,omitempty"` // Date represents the date format used for API returns - LastUpdated *string `json:"lastUpdated,omitempty"` - References *[]Reference `json:"references,omitempty"` - Severity *string `json:"severity,omitempty"` - Solution *string `json:"solution,omitempty"` - Summary *string `json:"summary,omitempty"` - Synopsis *string `json:"synopsis,omitempty"` - Type *string `json:"type,omitempty"` - TypeSeverity *string `json:"typeSeverity,omitempty"` + LastUpdated *string `json:"lastUpdated,omitempty"` + References []Reference `json:"references,omitempty"` + Severity *string `json:"severity,omitempty"` + Solution *string `json:"solution,omitempty"` + Summary *string `json:"summary,omitempty"` + Synopsis *string `json:"synopsis,omitempty"` + Type *string `json:"type,omitempty"` + TypeSeverity *string `json:"typeSeverity,omitempty"` } // NewErratumDetails instantiates a new ErratumDetails object @@ -58,12 +58,12 @@ func (o *ErratumDetails) GetAffectedProducts() []string { var ret []string return ret } - return *o.AffectedProducts + return o.AffectedProducts } // GetAffectedProductsOk returns a tuple with the AffectedProducts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ErratumDetails) GetAffectedProductsOk() (*[]string, bool) { +func (o *ErratumDetails) GetAffectedProductsOk() ([]string, bool) { if o == nil || o.AffectedProducts == nil { return nil, false } @@ -81,7 +81,7 @@ func (o *ErratumDetails) HasAffectedProducts() bool { // SetAffectedProducts gets a reference to the given []string and assigns it to the AffectedProducts field. func (o *ErratumDetails) SetAffectedProducts(v []string) { - o.AffectedProducts = &v + o.AffectedProducts = v } // GetBugzillas returns the Bugzillas field value if set, zero value otherwise. @@ -90,12 +90,12 @@ func (o *ErratumDetails) GetBugzillas() []Reference { var ret []Reference return ret } - return *o.Bugzillas + return o.Bugzillas } // GetBugzillasOk returns a tuple with the Bugzillas field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ErratumDetails) GetBugzillasOk() (*[]Reference, bool) { +func (o *ErratumDetails) GetBugzillasOk() ([]Reference, bool) { if o == nil || o.Bugzillas == nil { return nil, false } @@ -113,7 +113,7 @@ func (o *ErratumDetails) HasBugzillas() bool { // SetBugzillas gets a reference to the given []Reference and assigns it to the Bugzillas field. func (o *ErratumDetails) SetBugzillas(v []Reference) { - o.Bugzillas = &v + o.Bugzillas = v } // GetCopyrightYear returns the CopyrightYear field value if set, zero value otherwise. @@ -314,12 +314,12 @@ func (o *ErratumDetails) GetReferences() []Reference { var ret []Reference return ret } - return *o.References + return o.References } // GetReferencesOk returns a tuple with the References field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ErratumDetails) GetReferencesOk() (*[]Reference, bool) { +func (o *ErratumDetails) GetReferencesOk() ([]Reference, bool) { if o == nil || o.References == nil { return nil, false } @@ -337,7 +337,7 @@ func (o *ErratumDetails) HasReferences() bool { // SetReferences gets a reference to the given []Reference and assigns it to the References field. func (o *ErratumDetails) SetReferences(v []Reference) { - o.References = &v + o.References = v } // GetSeverity returns the Severity field value if set, zero value otherwise. diff --git a/model_erratum_for_system.go b/model_erratum_for_system.go index 3903384..5b24ff5 100644 --- a/model_erratum_for_system.go +++ b/model_erratum_for_system.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_erratum_in_content_set.go b/model_erratum_in_content_set.go index 236759d..f5781ce 100644 --- a/model_erratum_in_content_set.go +++ b/model_erratum_in_content_set.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_error_details.go b/model_error_details.go index 1f5982a..990456c 100644 --- a/model_error_details.go +++ b/model_error_details.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_export_job_response.go b/model_export_job_response.go index ef28e25..7a8c747 100644 --- a/model_export_job_response.go +++ b/model_export_job_response.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_export_response.go b/model_export_response.go index 4b4a048..e4a46ed 100644 --- a/model_export_response.go +++ b/model_export_response.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_facts.go b/model_facts.go index ad717f3..a15a829 100644 --- a/model_facts.go +++ b/model_facts.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_gold_image_status.go b/model_gold_image_status.go index 7eb5c82..e5979af 100644 --- a/model_gold_image_status.go +++ b/model_gold_image_status.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_image_for_version_arch.go b/model_image_for_version_arch.go new file mode 100644 index 0000000..798fd24 --- /dev/null +++ b/model_image_for_version_arch.go @@ -0,0 +1,294 @@ +/* +RHSM-API + +API for Red Hat Subscription Management + +API version: 1.264.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package gorhsm + +import ( + "encoding/json" +) + +// ImageForVersionArch Image Details for provided version and architecture. +type ImageForVersionArch struct { + Arch *string `json:"arch,omitempty"` + Checksum *string `json:"checksum,omitempty"` + // Date represents the date format used for API returns + DatePublished *string `json:"datePublished,omitempty"` + DownloadHref *string `json:"downloadHref,omitempty"` + Filename *string `json:"filename,omitempty"` + ImageName *string `json:"imageName,omitempty"` +} + +// NewImageForVersionArch instantiates a new ImageForVersionArch 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 NewImageForVersionArch() *ImageForVersionArch { + this := ImageForVersionArch{} + return &this +} + +// NewImageForVersionArchWithDefaults instantiates a new ImageForVersionArch 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 NewImageForVersionArchWithDefaults() *ImageForVersionArch { + this := ImageForVersionArch{} + return &this +} + +// GetArch returns the Arch field value if set, zero value otherwise. +func (o *ImageForVersionArch) GetArch() string { + if o == nil || o.Arch == nil { + var ret string + return ret + } + return *o.Arch +} + +// GetArchOk returns a tuple with the Arch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageForVersionArch) GetArchOk() (*string, bool) { + if o == nil || o.Arch == nil { + return nil, false + } + return o.Arch, true +} + +// HasArch returns a boolean if a field has been set. +func (o *ImageForVersionArch) HasArch() bool { + if o != nil && o.Arch != nil { + return true + } + + return false +} + +// SetArch gets a reference to the given string and assigns it to the Arch field. +func (o *ImageForVersionArch) SetArch(v string) { + o.Arch = &v +} + +// GetChecksum returns the Checksum field value if set, zero value otherwise. +func (o *ImageForVersionArch) GetChecksum() string { + if o == nil || o.Checksum == nil { + var ret string + return ret + } + return *o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageForVersionArch) GetChecksumOk() (*string, bool) { + if o == nil || o.Checksum == nil { + return nil, false + } + return o.Checksum, true +} + +// HasChecksum returns a boolean if a field has been set. +func (o *ImageForVersionArch) HasChecksum() bool { + if o != nil && o.Checksum != nil { + return true + } + + return false +} + +// SetChecksum gets a reference to the given string and assigns it to the Checksum field. +func (o *ImageForVersionArch) SetChecksum(v string) { + o.Checksum = &v +} + +// GetDatePublished returns the DatePublished field value if set, zero value otherwise. +func (o *ImageForVersionArch) GetDatePublished() string { + if o == nil || o.DatePublished == nil { + var ret string + return ret + } + return *o.DatePublished +} + +// GetDatePublishedOk returns a tuple with the DatePublished field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageForVersionArch) GetDatePublishedOk() (*string, bool) { + if o == nil || o.DatePublished == nil { + return nil, false + } + return o.DatePublished, true +} + +// HasDatePublished returns a boolean if a field has been set. +func (o *ImageForVersionArch) HasDatePublished() bool { + if o != nil && o.DatePublished != nil { + return true + } + + return false +} + +// SetDatePublished gets a reference to the given string and assigns it to the DatePublished field. +func (o *ImageForVersionArch) SetDatePublished(v string) { + o.DatePublished = &v +} + +// GetDownloadHref returns the DownloadHref field value if set, zero value otherwise. +func (o *ImageForVersionArch) GetDownloadHref() string { + if o == nil || o.DownloadHref == nil { + var ret string + return ret + } + return *o.DownloadHref +} + +// GetDownloadHrefOk returns a tuple with the DownloadHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageForVersionArch) GetDownloadHrefOk() (*string, bool) { + if o == nil || o.DownloadHref == nil { + return nil, false + } + return o.DownloadHref, true +} + +// HasDownloadHref returns a boolean if a field has been set. +func (o *ImageForVersionArch) HasDownloadHref() bool { + if o != nil && o.DownloadHref != nil { + return true + } + + return false +} + +// SetDownloadHref gets a reference to the given string and assigns it to the DownloadHref field. +func (o *ImageForVersionArch) SetDownloadHref(v string) { + o.DownloadHref = &v +} + +// GetFilename returns the Filename field value if set, zero value otherwise. +func (o *ImageForVersionArch) GetFilename() string { + if o == nil || o.Filename == nil { + var ret string + return ret + } + return *o.Filename +} + +// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageForVersionArch) GetFilenameOk() (*string, bool) { + if o == nil || o.Filename == nil { + return nil, false + } + return o.Filename, true +} + +// HasFilename returns a boolean if a field has been set. +func (o *ImageForVersionArch) HasFilename() bool { + if o != nil && o.Filename != nil { + return true + } + + return false +} + +// SetFilename gets a reference to the given string and assigns it to the Filename field. +func (o *ImageForVersionArch) SetFilename(v string) { + o.Filename = &v +} + +// GetImageName returns the ImageName field value if set, zero value otherwise. +func (o *ImageForVersionArch) GetImageName() string { + if o == nil || o.ImageName == nil { + var ret string + return ret + } + return *o.ImageName +} + +// GetImageNameOk returns a tuple with the ImageName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageForVersionArch) GetImageNameOk() (*string, bool) { + if o == nil || o.ImageName == nil { + return nil, false + } + return o.ImageName, true +} + +// HasImageName returns a boolean if a field has been set. +func (o *ImageForVersionArch) HasImageName() bool { + if o != nil && o.ImageName != nil { + return true + } + + return false +} + +// SetImageName gets a reference to the given string and assigns it to the ImageName field. +func (o *ImageForVersionArch) SetImageName(v string) { + o.ImageName = &v +} + +func (o ImageForVersionArch) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Arch != nil { + toSerialize["arch"] = o.Arch + } + if o.Checksum != nil { + toSerialize["checksum"] = o.Checksum + } + if o.DatePublished != nil { + toSerialize["datePublished"] = o.DatePublished + } + if o.DownloadHref != nil { + toSerialize["downloadHref"] = o.DownloadHref + } + if o.Filename != nil { + toSerialize["filename"] = o.Filename + } + if o.ImageName != nil { + toSerialize["imageName"] = o.ImageName + } + return json.Marshal(toSerialize) +} + +type NullableImageForVersionArch struct { + value *ImageForVersionArch + isSet bool +} + +func (v NullableImageForVersionArch) Get() *ImageForVersionArch { + return v.value +} + +func (v *NullableImageForVersionArch) Set(val *ImageForVersionArch) { + v.value = val + v.isSet = true +} + +func (v NullableImageForVersionArch) IsSet() bool { + return v.isSet +} + +func (v *NullableImageForVersionArch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImageForVersionArch(val *ImageForVersionArch) *NullableImageForVersionArch { + return &NullableImageForVersionArch{value: val, isSet: true} +} + +func (v NullableImageForVersionArch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImageForVersionArch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_image_in_content_set.go b/model_image_in_content_set.go index 74fb9d5..1f8dcdd 100644 --- a/model_image_in_content_set.go +++ b/model_image_in_content_set.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_object.go b/model_inline_object.go index 9f33b05..b51c817 100644 --- a/model_inline_object.go +++ b/model_inline_object.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_object_1.go b/model_inline_object_1.go index 89b5617..f2c0eab 100644 --- a/model_inline_object_1.go +++ b/model_inline_object_1.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_object_2.go b/model_inline_object_2.go index 72708f5..c00c2c9 100644 --- a/model_inline_object_2.go +++ b/model_inline_object_2.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_object_3.go b/model_inline_object_3.go index a575b0b..67fc7f1 100644 --- a/model_inline_object_3.go +++ b/model_inline_object_3.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_object_4.go b/model_inline_object_4.go index e194d2b..bc7b2db 100644 --- a/model_inline_object_4.go +++ b/model_inline_object_4.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,9 +16,9 @@ import ( // InlineObject4 struct for InlineObject4 type InlineObject4 struct { - // base64-encoded cloud instance metadata + // base64-encoded cloud instance metadata. For GCE, please use the instance identity token (JWT) as it is. Identity string `json:"identity"` - // base64-encoded cloud instance metadata signature + // base64-encoded cloud instance metadata signature. For GCE, please omit this field. Signature string `json:"signature"` } diff --git a/model_inline_object_5.go b/model_inline_object_5.go index 2e8a226..872850a 100644 --- a/model_inline_object_5.go +++ b/model_inline_object_5.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -51,11 +51,11 @@ func (o *InlineObject5) GetAccounts() []string { // GetAccountsOk returns a tuple with the Accounts field value // and a boolean to check if the value has been set. -func (o *InlineObject5) GetAccountsOk() (*[]string, bool) { +func (o *InlineObject5) GetAccountsOk() ([]string, bool) { if o == nil { return nil, false } - return &o.Accounts, true + return o.Accounts, true } // SetAccounts sets field value @@ -75,11 +75,11 @@ func (o *InlineObject5) GetImages() []string { // GetImagesOk returns a tuple with the Images field value // and a boolean to check if the value has been set. -func (o *InlineObject5) GetImagesOk() (*[]string, bool) { +func (o *InlineObject5) GetImagesOk() ([]string, bool) { if o == nil { return nil, false } - return &o.Images, true + return o.Images, true } // SetImages sets field value diff --git a/model_inline_response_200.go b/model_inline_response_200.go index 8f4a9a6..dd693ab 100644 --- a/model_inline_response_200.go +++ b/model_inline_response_200.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // InlineResponse200 struct for InlineResponse200 type InlineResponse200 struct { - Body *[]Allocation `json:"body,omitempty"` + Body []Allocation `json:"body,omitempty"` Pagination *APIPageParam `json:"pagination,omitempty"` } @@ -43,12 +43,12 @@ func (o *InlineResponse200) GetBody() []Allocation { var ret []Allocation return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse200) GetBodyOk() (*[]Allocation, bool) { +func (o *InlineResponse200) GetBodyOk() ([]Allocation, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *InlineResponse200) HasBody() bool { // SetBody gets a reference to the given []Allocation and assigns it to the Body field. func (o *InlineResponse200) SetBody(v []Allocation) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_inline_response_200_1.go b/model_inline_response_200_1.go index 0d1cfcf..00a6b1c 100644 --- a/model_inline_response_200_1.go +++ b/model_inline_response_200_1.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_200_10.go b/model_inline_response_200_10.go index 02c3564..c6ae114 100644 --- a/model_inline_response_200_10.go +++ b/model_inline_response_200_10.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,7 @@ import ( // InlineResponse20010 struct for InlineResponse20010 type InlineResponse20010 struct { - Body *[]PkgContentSetArch `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body *OrgSimpleContentAccess `json:"body,omitempty"` } // NewInlineResponse20010 instantiates a new InlineResponse20010 object @@ -38,9 +37,9 @@ func NewInlineResponse20010WithDefaults() *InlineResponse20010 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20010) GetBody() []PkgContentSetArch { +func (o *InlineResponse20010) GetBody() OrgSimpleContentAccess { if o == nil || o.Body == nil { - var ret []PkgContentSetArch + var ret OrgSimpleContentAccess return ret } return *o.Body @@ -48,7 +47,7 @@ func (o *InlineResponse20010) GetBody() []PkgContentSetArch { // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20010) GetBodyOk() (*[]PkgContentSetArch, bool) { +func (o *InlineResponse20010) GetBodyOk() (*OrgSimpleContentAccess, bool) { if o == nil || o.Body == nil { return nil, false } @@ -64,51 +63,16 @@ func (o *InlineResponse20010) HasBody() bool { return false } -// SetBody gets a reference to the given []PkgContentSetArch and assigns it to the Body field. -func (o *InlineResponse20010) SetBody(v []PkgContentSetArch) { +// SetBody gets a reference to the given OrgSimpleContentAccess and assigns it to the Body field. +func (o *InlineResponse20010) SetBody(v OrgSimpleContentAccess) { o.Body = &v } -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *InlineResponse20010) GetPagination() APIPageParam { - if o == nil || o.Pagination == nil { - var ret APIPageParam - return ret - } - return *o.Pagination -} - -// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20010) GetPaginationOk() (*APIPageParam, bool) { - if o == nil || o.Pagination == nil { - return nil, false - } - return o.Pagination, true -} - -// HasPagination returns a boolean if a field has been set. -func (o *InlineResponse20010) HasPagination() bool { - if o != nil && o.Pagination != nil { - return true - } - - return false -} - -// SetPagination gets a reference to the given APIPageParam and assigns it to the Pagination field. -func (o *InlineResponse20010) SetPagination(v APIPageParam) { - o.Pagination = &v -} - func (o InlineResponse20010) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Body != nil { toSerialize["body"] = o.Body } - if o.Pagination != nil { - toSerialize["pagination"] = o.Pagination - } return json.Marshal(toSerialize) } diff --git a/model_inline_response_200_11.go b/model_inline_response_200_11.go index 00db977..2ec3f3e 100644 --- a/model_inline_response_200_11.go +++ b/model_inline_response_200_11.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,8 @@ import ( // InlineResponse20011 struct for InlineResponse20011 type InlineResponse20011 struct { - Body *PkgDetails `json:"body,omitempty"` + Body []PkgContentSetArch `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewInlineResponse20011 instantiates a new InlineResponse20011 object @@ -37,17 +38,17 @@ func NewInlineResponse20011WithDefaults() *InlineResponse20011 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20011) GetBody() PkgDetails { +func (o *InlineResponse20011) GetBody() []PkgContentSetArch { if o == nil || o.Body == nil { - var ret PkgDetails + var ret []PkgContentSetArch return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20011) GetBodyOk() (*PkgDetails, bool) { +func (o *InlineResponse20011) GetBodyOk() ([]PkgContentSetArch, bool) { if o == nil || o.Body == nil { return nil, false } @@ -63,9 +64,41 @@ func (o *InlineResponse20011) HasBody() bool { return false } -// SetBody gets a reference to the given PkgDetails and assigns it to the Body field. -func (o *InlineResponse20011) SetBody(v PkgDetails) { - o.Body = &v +// SetBody gets a reference to the given []PkgContentSetArch and assigns it to the Body field. +func (o *InlineResponse20011) SetBody(v []PkgContentSetArch) { + o.Body = v +} + +// GetPagination returns the Pagination field value if set, zero value otherwise. +func (o *InlineResponse20011) GetPagination() APIPageParam { + if o == nil || o.Pagination == nil { + var ret APIPageParam + return ret + } + return *o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20011) GetPaginationOk() (*APIPageParam, bool) { + if o == nil || o.Pagination == nil { + return nil, false + } + return o.Pagination, true +} + +// HasPagination returns a boolean if a field has been set. +func (o *InlineResponse20011) HasPagination() bool { + if o != nil && o.Pagination != nil { + return true + } + + return false +} + +// SetPagination gets a reference to the given APIPageParam and assigns it to the Pagination field. +func (o *InlineResponse20011) SetPagination(v APIPageParam) { + o.Pagination = &v } func (o InlineResponse20011) MarshalJSON() ([]byte, error) { @@ -73,6 +106,9 @@ func (o InlineResponse20011) MarshalJSON() ([]byte, error) { if o.Body != nil { toSerialize["body"] = o.Body } + if o.Pagination != nil { + toSerialize["pagination"] = o.Pagination + } return json.Marshal(toSerialize) } diff --git a/model_inline_response_200_12.go b/model_inline_response_200_12.go index f409226..cc04a99 100644 --- a/model_inline_response_200_12.go +++ b/model_inline_response_200_12.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,9 +16,7 @@ import ( // InlineResponse20012 struct for InlineResponse20012 type InlineResponse20012 struct { - // ListResponse is the actual collection of subscription details that gets rendered - Body *[]DetailResponse `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body *PkgDetails `json:"body,omitempty"` } // NewInlineResponse20012 instantiates a new InlineResponse20012 object @@ -39,9 +37,9 @@ func NewInlineResponse20012WithDefaults() *InlineResponse20012 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20012) GetBody() []DetailResponse { +func (o *InlineResponse20012) GetBody() PkgDetails { if o == nil || o.Body == nil { - var ret []DetailResponse + var ret PkgDetails return ret } return *o.Body @@ -49,7 +47,7 @@ func (o *InlineResponse20012) GetBody() []DetailResponse { // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20012) GetBodyOk() (*[]DetailResponse, bool) { +func (o *InlineResponse20012) GetBodyOk() (*PkgDetails, bool) { if o == nil || o.Body == nil { return nil, false } @@ -65,51 +63,16 @@ func (o *InlineResponse20012) HasBody() bool { return false } -// SetBody gets a reference to the given []DetailResponse and assigns it to the Body field. -func (o *InlineResponse20012) SetBody(v []DetailResponse) { +// SetBody gets a reference to the given PkgDetails and assigns it to the Body field. +func (o *InlineResponse20012) SetBody(v PkgDetails) { o.Body = &v } -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *InlineResponse20012) GetPagination() APIPageParam { - if o == nil || o.Pagination == nil { - var ret APIPageParam - return ret - } - return *o.Pagination -} - -// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20012) GetPaginationOk() (*APIPageParam, bool) { - if o == nil || o.Pagination == nil { - return nil, false - } - return o.Pagination, true -} - -// HasPagination returns a boolean if a field has been set. -func (o *InlineResponse20012) HasPagination() bool { - if o != nil && o.Pagination != nil { - return true - } - - return false -} - -// SetPagination gets a reference to the given APIPageParam and assigns it to the Pagination field. -func (o *InlineResponse20012) SetPagination(v APIPageParam) { - o.Pagination = &v -} - func (o InlineResponse20012) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Body != nil { toSerialize["body"] = o.Body } - if o.Pagination != nil { - toSerialize["pagination"] = o.Pagination - } return json.Marshal(toSerialize) } diff --git a/model_inline_response_200_13.go b/model_inline_response_200_13.go index 86a364b..4b4c40c 100644 --- a/model_inline_response_200_13.go +++ b/model_inline_response_200_13.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,9 @@ import ( // InlineResponse20013 struct for InlineResponse20013 type InlineResponse20013 struct { - Body *[]ContentSet `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + // ListResponse is the actual collection of subscription details that gets rendered + Body []DetailResponse `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewInlineResponse20013 instantiates a new InlineResponse20013 object @@ -38,17 +39,17 @@ func NewInlineResponse20013WithDefaults() *InlineResponse20013 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20013) GetBody() []ContentSet { +func (o *InlineResponse20013) GetBody() []DetailResponse { if o == nil || o.Body == nil { - var ret []ContentSet + var ret []DetailResponse return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20013) GetBodyOk() (*[]ContentSet, bool) { +func (o *InlineResponse20013) GetBodyOk() ([]DetailResponse, bool) { if o == nil || o.Body == nil { return nil, false } @@ -64,9 +65,9 @@ func (o *InlineResponse20013) HasBody() bool { return false } -// SetBody gets a reference to the given []ContentSet and assigns it to the Body field. -func (o *InlineResponse20013) SetBody(v []ContentSet) { - o.Body = &v +// SetBody gets a reference to the given []DetailResponse and assigns it to the Body field. +func (o *InlineResponse20013) SetBody(v []DetailResponse) { + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_inline_response_200_14.go b/model_inline_response_200_14.go index fd1c887..401ab53 100644 --- a/model_inline_response_200_14.go +++ b/model_inline_response_200_14.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // InlineResponse20014 struct for InlineResponse20014 type InlineResponse20014 struct { - Body *[]SystemList `json:"body,omitempty"` + Body []ContentSet `json:"body,omitempty"` Pagination *APIPageParam `json:"pagination,omitempty"` } @@ -38,17 +38,17 @@ func NewInlineResponse20014WithDefaults() *InlineResponse20014 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20014) GetBody() []SystemList { +func (o *InlineResponse20014) GetBody() []ContentSet { if o == nil || o.Body == nil { - var ret []SystemList + var ret []ContentSet return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20014) GetBodyOk() (*[]SystemList, bool) { +func (o *InlineResponse20014) GetBodyOk() ([]ContentSet, bool) { if o == nil || o.Body == nil { return nil, false } @@ -64,9 +64,9 @@ func (o *InlineResponse20014) HasBody() bool { return false } -// SetBody gets a reference to the given []SystemList and assigns it to the Body field. -func (o *InlineResponse20014) SetBody(v []SystemList) { - o.Body = &v +// SetBody gets a reference to the given []ContentSet and assigns it to the Body field. +func (o *InlineResponse20014) SetBody(v []ContentSet) { + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_inline_response_200_15.go b/model_inline_response_200_15.go index 0375b6e..1f545ad 100644 --- a/model_inline_response_200_15.go +++ b/model_inline_response_200_15.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,7 @@ import ( // InlineResponse20015 struct for InlineResponse20015 type InlineResponse20015 struct { - // systemList is a System Slice - Body *[]System `json:"body,omitempty"` + Body []SystemList `json:"body,omitempty"` Pagination *APIPageParam `json:"pagination,omitempty"` } @@ -39,17 +38,17 @@ func NewInlineResponse20015WithDefaults() *InlineResponse20015 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20015) GetBody() []System { +func (o *InlineResponse20015) GetBody() []SystemList { if o == nil || o.Body == nil { - var ret []System + var ret []SystemList return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20015) GetBodyOk() (*[]System, bool) { +func (o *InlineResponse20015) GetBodyOk() ([]SystemList, bool) { if o == nil || o.Body == nil { return nil, false } @@ -65,9 +64,9 @@ func (o *InlineResponse20015) HasBody() bool { return false } -// SetBody gets a reference to the given []System and assigns it to the Body field. -func (o *InlineResponse20015) SetBody(v []System) { - o.Body = &v +// SetBody gets a reference to the given []SystemList and assigns it to the Body field. +func (o *InlineResponse20015) SetBody(v []SystemList) { + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_inline_response_200_16.go b/model_inline_response_200_16.go index a220567..7b18a11 100644 --- a/model_inline_response_200_16.go +++ b/model_inline_response_200_16.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,9 @@ import ( // InlineResponse20016 struct for InlineResponse20016 type InlineResponse20016 struct { - Body *ShowSystem `json:"body,omitempty"` + // systemList is a System Slice + Body []System `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewInlineResponse20016 instantiates a new InlineResponse20016 object @@ -37,17 +39,17 @@ func NewInlineResponse20016WithDefaults() *InlineResponse20016 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20016) GetBody() ShowSystem { +func (o *InlineResponse20016) GetBody() []System { if o == nil || o.Body == nil { - var ret ShowSystem + var ret []System return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20016) GetBodyOk() (*ShowSystem, bool) { +func (o *InlineResponse20016) GetBodyOk() ([]System, bool) { if o == nil || o.Body == nil { return nil, false } @@ -63,9 +65,41 @@ func (o *InlineResponse20016) HasBody() bool { return false } -// SetBody gets a reference to the given ShowSystem and assigns it to the Body field. -func (o *InlineResponse20016) SetBody(v ShowSystem) { - o.Body = &v +// SetBody gets a reference to the given []System and assigns it to the Body field. +func (o *InlineResponse20016) SetBody(v []System) { + o.Body = v +} + +// GetPagination returns the Pagination field value if set, zero value otherwise. +func (o *InlineResponse20016) GetPagination() APIPageParam { + if o == nil || o.Pagination == nil { + var ret APIPageParam + return ret + } + return *o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20016) GetPaginationOk() (*APIPageParam, bool) { + if o == nil || o.Pagination == nil { + return nil, false + } + return o.Pagination, true +} + +// HasPagination returns a boolean if a field has been set. +func (o *InlineResponse20016) HasPagination() bool { + if o != nil && o.Pagination != nil { + return true + } + + return false +} + +// SetPagination gets a reference to the given APIPageParam and assigns it to the Pagination field. +func (o *InlineResponse20016) SetPagination(v APIPageParam) { + o.Pagination = &v } func (o InlineResponse20016) MarshalJSON() ([]byte, error) { @@ -73,6 +107,9 @@ func (o InlineResponse20016) MarshalJSON() ([]byte, error) { if o.Body != nil { toSerialize["body"] = o.Body } + if o.Pagination != nil { + toSerialize["pagination"] = o.Pagination + } return json.Marshal(toSerialize) } diff --git a/model_inline_response_200_17.go b/model_inline_response_200_17.go index 0deb890..881bc8f 100644 --- a/model_inline_response_200_17.go +++ b/model_inline_response_200_17.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // InlineResponse20017 struct for InlineResponse20017 type InlineResponse20017 struct { - Body *AttachEntitlement `json:"body,omitempty"` + Body *ShowSystem `json:"body,omitempty"` } // NewInlineResponse20017 instantiates a new InlineResponse20017 object @@ -37,9 +37,9 @@ func NewInlineResponse20017WithDefaults() *InlineResponse20017 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20017) GetBody() AttachEntitlement { +func (o *InlineResponse20017) GetBody() ShowSystem { if o == nil || o.Body == nil { - var ret AttachEntitlement + var ret ShowSystem return ret } return *o.Body @@ -47,7 +47,7 @@ func (o *InlineResponse20017) GetBody() AttachEntitlement { // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20017) GetBodyOk() (*AttachEntitlement, bool) { +func (o *InlineResponse20017) GetBodyOk() (*ShowSystem, bool) { if o == nil || o.Body == nil { return nil, false } @@ -63,8 +63,8 @@ func (o *InlineResponse20017) HasBody() bool { return false } -// SetBody gets a reference to the given AttachEntitlement and assigns it to the Body field. -func (o *InlineResponse20017) SetBody(v AttachEntitlement) { +// SetBody gets a reference to the given ShowSystem and assigns it to the Body field. +func (o *InlineResponse20017) SetBody(v ShowSystem) { o.Body = &v } diff --git a/model_inline_response_200_18.go b/model_inline_response_200_18.go index 948482b..e8976d9 100644 --- a/model_inline_response_200_18.go +++ b/model_inline_response_200_18.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,7 @@ import ( // InlineResponse20018 struct for InlineResponse20018 type InlineResponse20018 struct { - Body *[]ErratumForSystem `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body *AttachEntitlement `json:"body,omitempty"` } // NewInlineResponse20018 instantiates a new InlineResponse20018 object @@ -38,9 +37,9 @@ func NewInlineResponse20018WithDefaults() *InlineResponse20018 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20018) GetBody() []ErratumForSystem { +func (o *InlineResponse20018) GetBody() AttachEntitlement { if o == nil || o.Body == nil { - var ret []ErratumForSystem + var ret AttachEntitlement return ret } return *o.Body @@ -48,7 +47,7 @@ func (o *InlineResponse20018) GetBody() []ErratumForSystem { // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20018) GetBodyOk() (*[]ErratumForSystem, bool) { +func (o *InlineResponse20018) GetBodyOk() (*AttachEntitlement, bool) { if o == nil || o.Body == nil { return nil, false } @@ -64,51 +63,16 @@ func (o *InlineResponse20018) HasBody() bool { return false } -// SetBody gets a reference to the given []ErratumForSystem and assigns it to the Body field. -func (o *InlineResponse20018) SetBody(v []ErratumForSystem) { +// SetBody gets a reference to the given AttachEntitlement and assigns it to the Body field. +func (o *InlineResponse20018) SetBody(v AttachEntitlement) { o.Body = &v } -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *InlineResponse20018) GetPagination() APIPageParam { - if o == nil || o.Pagination == nil { - var ret APIPageParam - return ret - } - return *o.Pagination -} - -// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20018) GetPaginationOk() (*APIPageParam, bool) { - if o == nil || o.Pagination == nil { - return nil, false - } - return o.Pagination, true -} - -// HasPagination returns a boolean if a field has been set. -func (o *InlineResponse20018) HasPagination() bool { - if o != nil && o.Pagination != nil { - return true - } - - return false -} - -// SetPagination gets a reference to the given APIPageParam and assigns it to the Pagination field. -func (o *InlineResponse20018) SetPagination(v APIPageParam) { - o.Pagination = &v -} - func (o InlineResponse20018) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Body != nil { toSerialize["body"] = o.Body } - if o.Pagination != nil { - toSerialize["pagination"] = o.Pagination - } return json.Marshal(toSerialize) } diff --git a/model_inline_response_200_19.go b/model_inline_response_200_19.go index 955d6cb..23ae623 100644 --- a/model_inline_response_200_19.go +++ b/model_inline_response_200_19.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,8 @@ import ( // InlineResponse20019 struct for InlineResponse20019 type InlineResponse20019 struct { - Body *[]PackageForSystem `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body []ErratumForSystem `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewInlineResponse20019 instantiates a new InlineResponse20019 object @@ -38,17 +38,17 @@ func NewInlineResponse20019WithDefaults() *InlineResponse20019 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse20019) GetBody() []PackageForSystem { +func (o *InlineResponse20019) GetBody() []ErratumForSystem { if o == nil || o.Body == nil { - var ret []PackageForSystem + var ret []ErratumForSystem return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse20019) GetBodyOk() (*[]PackageForSystem, bool) { +func (o *InlineResponse20019) GetBodyOk() ([]ErratumForSystem, bool) { if o == nil || o.Body == nil { return nil, false } @@ -64,9 +64,9 @@ func (o *InlineResponse20019) HasBody() bool { return false } -// SetBody gets a reference to the given []PackageForSystem and assigns it to the Body field. -func (o *InlineResponse20019) SetBody(v []PackageForSystem) { - o.Body = &v +// SetBody gets a reference to the given []ErratumForSystem and assigns it to the Body field. +func (o *InlineResponse20019) SetBody(v []ErratumForSystem) { + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_inline_response_200_2.go b/model_inline_response_200_2.go index 79550ca..ad147fc 100644 --- a/model_inline_response_200_2.go +++ b/model_inline_response_200_2.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // InlineResponse2002 struct for InlineResponse2002 type InlineResponse2002 struct { - Body *[]AllocationVersion `json:"body,omitempty"` + Body []AllocationVersion `json:"body,omitempty"` } // NewInlineResponse2002 instantiates a new InlineResponse2002 object @@ -42,12 +42,12 @@ func (o *InlineResponse2002) GetBody() []AllocationVersion { var ret []AllocationVersion return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse2002) GetBodyOk() (*[]AllocationVersion, bool) { +func (o *InlineResponse2002) GetBodyOk() ([]AllocationVersion, bool) { if o == nil || o.Body == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *InlineResponse2002) HasBody() bool { // SetBody gets a reference to the given []AllocationVersion and assigns it to the Body field. func (o *InlineResponse2002) SetBody(v []AllocationVersion) { - o.Body = &v + o.Body = v } func (o InlineResponse2002) MarshalJSON() ([]byte, error) { diff --git a/model_inline_response_200_20.go b/model_inline_response_200_20.go new file mode 100644 index 0000000..5904546 --- /dev/null +++ b/model_inline_response_200_20.go @@ -0,0 +1,149 @@ +/* +RHSM-API + +API for Red Hat Subscription Management + +API version: 1.264.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package gorhsm + +import ( + "encoding/json" +) + +// InlineResponse20020 struct for InlineResponse20020 +type InlineResponse20020 struct { + Body []PackageForSystem `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` +} + +// NewInlineResponse20020 instantiates a new InlineResponse20020 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 NewInlineResponse20020() *InlineResponse20020 { + this := InlineResponse20020{} + return &this +} + +// NewInlineResponse20020WithDefaults instantiates a new InlineResponse20020 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 NewInlineResponse20020WithDefaults() *InlineResponse20020 { + this := InlineResponse20020{} + return &this +} + +// GetBody returns the Body field value if set, zero value otherwise. +func (o *InlineResponse20020) GetBody() []PackageForSystem { + if o == nil || o.Body == nil { + var ret []PackageForSystem + return ret + } + return o.Body +} + +// GetBodyOk returns a tuple with the Body field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20020) GetBodyOk() ([]PackageForSystem, bool) { + if o == nil || o.Body == nil { + return nil, false + } + return o.Body, true +} + +// HasBody returns a boolean if a field has been set. +func (o *InlineResponse20020) HasBody() bool { + if o != nil && o.Body != nil { + return true + } + + return false +} + +// SetBody gets a reference to the given []PackageForSystem and assigns it to the Body field. +func (o *InlineResponse20020) SetBody(v []PackageForSystem) { + o.Body = v +} + +// GetPagination returns the Pagination field value if set, zero value otherwise. +func (o *InlineResponse20020) GetPagination() APIPageParam { + if o == nil || o.Pagination == nil { + var ret APIPageParam + return ret + } + return *o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20020) GetPaginationOk() (*APIPageParam, bool) { + if o == nil || o.Pagination == nil { + return nil, false + } + return o.Pagination, true +} + +// HasPagination returns a boolean if a field has been set. +func (o *InlineResponse20020) HasPagination() bool { + if o != nil && o.Pagination != nil { + return true + } + + return false +} + +// SetPagination gets a reference to the given APIPageParam and assigns it to the Pagination field. +func (o *InlineResponse20020) SetPagination(v APIPageParam) { + o.Pagination = &v +} + +func (o InlineResponse20020) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Body != nil { + toSerialize["body"] = o.Body + } + if o.Pagination != nil { + toSerialize["pagination"] = o.Pagination + } + return json.Marshal(toSerialize) +} + +type NullableInlineResponse20020 struct { + value *InlineResponse20020 + isSet bool +} + +func (v NullableInlineResponse20020) Get() *InlineResponse20020 { + return v.value +} + +func (v *NullableInlineResponse20020) Set(val *InlineResponse20020) { + v.value = val + v.isSet = true +} + +func (v NullableInlineResponse20020) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineResponse20020) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineResponse20020(val *InlineResponse20020) *NullableInlineResponse20020 { + return &NullableInlineResponse20020{value: val, isSet: true} +} + +func (v NullableInlineResponse20020) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInlineResponse20020) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_inline_response_200_3.go b/model_inline_response_200_3.go index a348a7a..1d959d8 100644 --- a/model_inline_response_200_3.go +++ b/model_inline_response_200_3.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_200_4.go b/model_inline_response_200_4.go index f24d2eb..6d52362 100644 --- a/model_inline_response_200_4.go +++ b/model_inline_response_200_4.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_200_5.go b/model_inline_response_200_5.go index e3b0ecc..aa3becf 100644 --- a/model_inline_response_200_5.go +++ b/model_inline_response_200_5.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_200_6.go b/model_inline_response_200_6.go index f164748..037b204 100644 --- a/model_inline_response_200_6.go +++ b/model_inline_response_200_6.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // InlineResponse2006 struct for InlineResponse2006 type InlineResponse2006 struct { - Body *[]EnabledCloudAccessProvider `json:"body,omitempty"` + Body []EnabledCloudAccessProvider `json:"body,omitempty"` } // NewInlineResponse2006 instantiates a new InlineResponse2006 object @@ -42,12 +42,12 @@ func (o *InlineResponse2006) GetBody() []EnabledCloudAccessProvider { var ret []EnabledCloudAccessProvider return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse2006) GetBodyOk() (*[]EnabledCloudAccessProvider, bool) { +func (o *InlineResponse2006) GetBodyOk() ([]EnabledCloudAccessProvider, bool) { if o == nil || o.Body == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *InlineResponse2006) HasBody() bool { // SetBody gets a reference to the given []EnabledCloudAccessProvider and assigns it to the Body field. func (o *InlineResponse2006) SetBody(v []EnabledCloudAccessProvider) { - o.Body = &v + o.Body = v } func (o InlineResponse2006) MarshalJSON() ([]byte, error) { diff --git a/model_inline_response_200_7.go b/model_inline_response_200_7.go index 6097194..16cae35 100644 --- a/model_inline_response_200_7.go +++ b/model_inline_response_200_7.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_200_8.go b/model_inline_response_200_8.go index 7486af2..874c955 100644 --- a/model_inline_response_200_8.go +++ b/model_inline_response_200_8.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,8 @@ import ( // InlineResponse2008 struct for InlineResponse2008 type InlineResponse2008 struct { - Body *[]ImageInContentSet `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body []ImageInContentSet `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewInlineResponse2008 instantiates a new InlineResponse2008 object @@ -43,12 +43,12 @@ func (o *InlineResponse2008) GetBody() []ImageInContentSet { var ret []ImageInContentSet return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse2008) GetBodyOk() (*[]ImageInContentSet, bool) { +func (o *InlineResponse2008) GetBodyOk() ([]ImageInContentSet, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *InlineResponse2008) HasBody() bool { // SetBody gets a reference to the given []ImageInContentSet and assigns it to the Body field. func (o *InlineResponse2008) SetBody(v []ImageInContentSet) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_inline_response_200_9.go b/model_inline_response_200_9.go index 44c8752..3904d42 100644 --- a/model_inline_response_200_9.go +++ b/model_inline_response_200_9.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // InlineResponse2009 struct for InlineResponse2009 type InlineResponse2009 struct { - Body *OrgSimpleContentAccess `json:"body,omitempty"` + Body []ImageInContentSet `json:"body,omitempty"` } // NewInlineResponse2009 instantiates a new InlineResponse2009 object @@ -37,17 +37,17 @@ func NewInlineResponse2009WithDefaults() *InlineResponse2009 { } // GetBody returns the Body field value if set, zero value otherwise. -func (o *InlineResponse2009) GetBody() OrgSimpleContentAccess { +func (o *InlineResponse2009) GetBody() []ImageInContentSet { if o == nil || o.Body == nil { - var ret OrgSimpleContentAccess + var ret []ImageInContentSet return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse2009) GetBodyOk() (*OrgSimpleContentAccess, bool) { +func (o *InlineResponse2009) GetBodyOk() ([]ImageInContentSet, bool) { if o == nil || o.Body == nil { return nil, false } @@ -63,9 +63,9 @@ func (o *InlineResponse2009) HasBody() bool { return false } -// SetBody gets a reference to the given OrgSimpleContentAccess and assigns it to the Body field. -func (o *InlineResponse2009) SetBody(v OrgSimpleContentAccess) { - o.Body = &v +// SetBody gets a reference to the given []ImageInContentSet and assigns it to the Body field. +func (o *InlineResponse2009) SetBody(v []ImageInContentSet) { + o.Body = v } func (o InlineResponse2009) MarshalJSON() ([]byte, error) { diff --git a/model_inline_response_202.go b/model_inline_response_202.go index 830de52..e034329 100644 --- a/model_inline_response_202.go +++ b/model_inline_response_202.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_307.go b/model_inline_response_307.go index 4b5b83f..afa37f2 100644 --- a/model_inline_response_307.go +++ b/model_inline_response_307.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_inline_response_400.go b/model_inline_response_400.go index 93eddbc..832d43b 100644 --- a/model_inline_response_400.go +++ b/model_inline_response_400.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_installed_products.go b/model_installed_products.go index b43aabb..ac5a23f 100644 --- a/model_installed_products.go +++ b/model_installed_products.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_my_errata_list_mock.go b/model_my_errata_list_mock.go index d4d4e89..47cbf9e 100644 --- a/model_my_errata_list_mock.go +++ b/model_my_errata_list_mock.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // MyErrataListMock struct for MyErrataListMock type MyErrataListMock struct { - Body *[]MyErratum `json:"body,omitempty"` + Body []MyErratum `json:"body,omitempty"` Pagination *APIPageParam `json:"pagination,omitempty"` } @@ -43,12 +43,12 @@ func (o *MyErrataListMock) GetBody() []MyErratum { var ret []MyErratum return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MyErrataListMock) GetBodyOk() (*[]MyErratum, bool) { +func (o *MyErrataListMock) GetBodyOk() ([]MyErratum, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *MyErrataListMock) HasBody() bool { // SetBody gets a reference to the given []MyErratum and assigns it to the Body field. func (o *MyErrataListMock) SetBody(v []MyErratum) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_my_erratum.go b/model_my_erratum.go index df06035..1beb7ba 100644 --- a/model_my_erratum.go +++ b/model_my_erratum.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_ongoing_export_job_response.go b/model_ongoing_export_job_response.go index 82db2be..f2a379d 100644 --- a/model_ongoing_export_job_response.go +++ b/model_ongoing_export_job_response.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_org_simple_content_access.go b/model_org_simple_content_access.go index 14e9820..8d43e23 100644 --- a/model_org_simple_content_access.go +++ b/model_org_simple_content_access.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,9 +16,10 @@ import ( // OrgSimpleContentAccess struct for OrgSimpleContentAccess type OrgSimpleContentAccess struct { - Id *string `json:"id,omitempty"` - SimpleContentAccess *string `json:"simpleContentAccess,omitempty"` - SimpleContentAccessCapable *bool `json:"simpleContentAccessCapable,omitempty"` + Id *string `json:"id,omitempty"` + SimpleContentAccess *string `json:"simpleContentAccess,omitempty"` + SimpleContentAccessCapable *bool `json:"simpleContentAccessCapable,omitempty"` + SystemPurposeAttributes *SystemPurposeAttributes `json:"systemPurposeAttributes,omitempty"` } // NewOrgSimpleContentAccess instantiates a new OrgSimpleContentAccess object @@ -134,6 +135,38 @@ func (o *OrgSimpleContentAccess) SetSimpleContentAccessCapable(v bool) { o.SimpleContentAccessCapable = &v } +// GetSystemPurposeAttributes returns the SystemPurposeAttributes field value if set, zero value otherwise. +func (o *OrgSimpleContentAccess) GetSystemPurposeAttributes() SystemPurposeAttributes { + if o == nil || o.SystemPurposeAttributes == nil { + var ret SystemPurposeAttributes + return ret + } + return *o.SystemPurposeAttributes +} + +// GetSystemPurposeAttributesOk returns a tuple with the SystemPurposeAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgSimpleContentAccess) GetSystemPurposeAttributesOk() (*SystemPurposeAttributes, bool) { + if o == nil || o.SystemPurposeAttributes == nil { + return nil, false + } + return o.SystemPurposeAttributes, true +} + +// HasSystemPurposeAttributes returns a boolean if a field has been set. +func (o *OrgSimpleContentAccess) HasSystemPurposeAttributes() bool { + if o != nil && o.SystemPurposeAttributes != nil { + return true + } + + return false +} + +// SetSystemPurposeAttributes gets a reference to the given SystemPurposeAttributes and assigns it to the SystemPurposeAttributes field. +func (o *OrgSimpleContentAccess) SetSystemPurposeAttributes(v SystemPurposeAttributes) { + o.SystemPurposeAttributes = &v +} + func (o OrgSimpleContentAccess) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { @@ -145,6 +178,9 @@ func (o OrgSimpleContentAccess) MarshalJSON() ([]byte, error) { if o.SimpleContentAccessCapable != nil { toSerialize["simpleContentAccessCapable"] = o.SimpleContentAccessCapable } + if o.SystemPurposeAttributes != nil { + toSerialize["systemPurposeAttributes"] = o.SystemPurposeAttributes + } return json.Marshal(toSerialize) } diff --git a/model_package_detail.go b/model_package_detail.go index a9b16ab..d273ea5 100644 --- a/model_package_detail.go +++ b/model_package_detail.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,17 +16,17 @@ import ( // PackageDetail PackageDetail wraps an errata package and adds a RefURL type PackageDetail struct { - Arch *string `json:"arch,omitempty"` - Checksum *string `json:"checksum,omitempty"` - ContentSets *[]string `json:"contentSets,omitempty"` - DetailsUrl *string `json:"details_url,omitempty"` - Epoch *int32 `json:"epoch,omitempty"` - Filename *string `json:"filename,omitempty"` - Name *string `json:"name,omitempty"` - Release *string `json:"release,omitempty"` - RepoTags *[]string `json:"repoTags,omitempty"` - Summary *string `json:"summary,omitempty"` - Version *string `json:"version,omitempty"` + Arch *string `json:"arch,omitempty"` + Checksum *string `json:"checksum,omitempty"` + ContentSets []string `json:"contentSets,omitempty"` + DetailsUrl *string `json:"details_url,omitempty"` + Epoch *int32 `json:"epoch,omitempty"` + Filename *string `json:"filename,omitempty"` + Name *string `json:"name,omitempty"` + Release *string `json:"release,omitempty"` + RepoTags []string `json:"repoTags,omitempty"` + Summary *string `json:"summary,omitempty"` + Version *string `json:"version,omitempty"` } // NewPackageDetail instantiates a new PackageDetail object @@ -116,12 +116,12 @@ func (o *PackageDetail) GetContentSets() []string { var ret []string return ret } - return *o.ContentSets + return o.ContentSets } // GetContentSetsOk returns a tuple with the ContentSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PackageDetail) GetContentSetsOk() (*[]string, bool) { +func (o *PackageDetail) GetContentSetsOk() ([]string, bool) { if o == nil || o.ContentSets == nil { return nil, false } @@ -139,7 +139,7 @@ func (o *PackageDetail) HasContentSets() bool { // SetContentSets gets a reference to the given []string and assigns it to the ContentSets field. func (o *PackageDetail) SetContentSets(v []string) { - o.ContentSets = &v + o.ContentSets = v } // GetDetailsUrl returns the DetailsUrl field value if set, zero value otherwise. @@ -308,12 +308,12 @@ func (o *PackageDetail) GetRepoTags() []string { var ret []string return ret } - return *o.RepoTags + return o.RepoTags } // GetRepoTagsOk returns a tuple with the RepoTags field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PackageDetail) GetRepoTagsOk() (*[]string, bool) { +func (o *PackageDetail) GetRepoTagsOk() ([]string, bool) { if o == nil || o.RepoTags == nil { return nil, false } @@ -331,7 +331,7 @@ func (o *PackageDetail) HasRepoTags() bool { // SetRepoTags gets a reference to the given []string and assigns it to the RepoTags field. func (o *PackageDetail) SetRepoTags(v []string) { - o.RepoTags = &v + o.RepoTags = v } // GetSummary returns the Summary field value if set, zero value otherwise. diff --git a/model_package_for_system.go b/model_package_for_system.go index f6b7f7f..a3b995d 100644 --- a/model_package_for_system.go +++ b/model_package_for_system.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,13 +16,13 @@ import ( // PackageForSystem package installed on a system type PackageForSystem struct { - Advisories *[]PackageForSystemAdvisories `json:"advisories,omitempty"` - Arch *string `json:"arch,omitempty"` - Epoch *int32 `json:"epoch,omitempty"` - ErrataCount *int32 `json:"errataCount,omitempty"` - Name *string `json:"name,omitempty"` - Release *string `json:"release,omitempty"` - Version *string `json:"version,omitempty"` + Advisories []PackageForSystemAdvisories `json:"advisories,omitempty"` + Arch *string `json:"arch,omitempty"` + Epoch *int32 `json:"epoch,omitempty"` + ErrataCount *int32 `json:"errataCount,omitempty"` + Name *string `json:"name,omitempty"` + Release *string `json:"release,omitempty"` + Version *string `json:"version,omitempty"` } // NewPackageForSystem instantiates a new PackageForSystem object @@ -48,12 +48,12 @@ func (o *PackageForSystem) GetAdvisories() []PackageForSystemAdvisories { var ret []PackageForSystemAdvisories return ret } - return *o.Advisories + return o.Advisories } // GetAdvisoriesOk returns a tuple with the Advisories field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PackageForSystem) GetAdvisoriesOk() (*[]PackageForSystemAdvisories, bool) { +func (o *PackageForSystem) GetAdvisoriesOk() ([]PackageForSystemAdvisories, bool) { if o == nil || o.Advisories == nil { return nil, false } @@ -71,7 +71,7 @@ func (o *PackageForSystem) HasAdvisories() bool { // SetAdvisories gets a reference to the given []PackageForSystemAdvisories and assigns it to the Advisories field. func (o *PackageForSystem) SetAdvisories(v []PackageForSystemAdvisories) { - o.Advisories = &v + o.Advisories = v } // GetArch returns the Arch field value if set, zero value otherwise. diff --git a/model_package_for_system_advisories.go b/model_package_for_system_advisories.go index 9f732af..2ce58ea 100644 --- a/model_package_for_system_advisories.go +++ b/model_package_for_system_advisories.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_pkg_content_set_arch.go b/model_pkg_content_set_arch.go index abd2f3f..5137b5b 100644 --- a/model_pkg_content_set_arch.go +++ b/model_pkg_content_set_arch.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,21 +18,21 @@ import ( type PkgContentSetArch struct { Arch *string `json:"arch,omitempty"` // Date represents the date format used for API returns - BuildDate *string `json:"buildDate,omitempty"` - BuildHost *string `json:"buildHost,omitempty"` - Checksum *string `json:"checksum,omitempty"` - ContentSets *[]string `json:"contentSets,omitempty"` - Description *string `json:"description,omitempty"` - DownloadHref *string `json:"downloadHref,omitempty"` - Epoch *string `json:"epoch,omitempty"` - Group *string `json:"group,omitempty"` - Href *string `json:"href,omitempty"` - License *string `json:"license,omitempty"` - Name *string `json:"name,omitempty"` - Release *string `json:"release,omitempty"` - Size *int32 `json:"size,omitempty"` - Summary *string `json:"summary,omitempty"` - Version *string `json:"version,omitempty"` + BuildDate *string `json:"buildDate,omitempty"` + BuildHost *string `json:"buildHost,omitempty"` + Checksum *string `json:"checksum,omitempty"` + ContentSets []string `json:"contentSets,omitempty"` + Description *string `json:"description,omitempty"` + DownloadHref *string `json:"downloadHref,omitempty"` + Epoch *string `json:"epoch,omitempty"` + Group *string `json:"group,omitempty"` + Href *string `json:"href,omitempty"` + License *string `json:"license,omitempty"` + Name *string `json:"name,omitempty"` + Release *string `json:"release,omitempty"` + Size *int32 `json:"size,omitempty"` + Summary *string `json:"summary,omitempty"` + Version *string `json:"version,omitempty"` } // NewPkgContentSetArch instantiates a new PkgContentSetArch object @@ -186,12 +186,12 @@ func (o *PkgContentSetArch) GetContentSets() []string { var ret []string return ret } - return *o.ContentSets + return o.ContentSets } // GetContentSetsOk returns a tuple with the ContentSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PkgContentSetArch) GetContentSetsOk() (*[]string, bool) { +func (o *PkgContentSetArch) GetContentSetsOk() ([]string, bool) { if o == nil || o.ContentSets == nil { return nil, false } @@ -209,7 +209,7 @@ func (o *PkgContentSetArch) HasContentSets() bool { // SetContentSets gets a reference to the given []string and assigns it to the ContentSets field. func (o *PkgContentSetArch) SetContentSets(v []string) { - o.ContentSets = &v + o.ContentSets = v } // GetDescription returns the Description field value if set, zero value otherwise. diff --git a/model_pkg_details.go b/model_pkg_details.go index 95846c3..bc63310 100644 --- a/model_pkg_details.go +++ b/model_pkg_details.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,20 +18,20 @@ import ( type PkgDetails struct { Arch *string `json:"arch,omitempty"` // Date represents the date format used for API returns - BuildDate *string `json:"buildDate,omitempty"` - BuildHost *string `json:"buildHost,omitempty"` - Checksum *string `json:"checksum,omitempty"` - ContentSets *[]string `json:"contentSets,omitempty"` - Description *string `json:"description,omitempty"` - Epoch *string `json:"epoch,omitempty"` - Group *string `json:"group,omitempty"` - Href *string `json:"href,omitempty"` - License *string `json:"license,omitempty"` - Name *string `json:"name,omitempty"` - Release *string `json:"release,omitempty"` - Size *int32 `json:"size,omitempty"` - Summary *string `json:"summary,omitempty"` - Version *string `json:"version,omitempty"` + BuildDate *string `json:"buildDate,omitempty"` + BuildHost *string `json:"buildHost,omitempty"` + Checksum *string `json:"checksum,omitempty"` + ContentSets []string `json:"contentSets,omitempty"` + Description *string `json:"description,omitempty"` + Epoch *string `json:"epoch,omitempty"` + Group *string `json:"group,omitempty"` + Href *string `json:"href,omitempty"` + License *string `json:"license,omitempty"` + Name *string `json:"name,omitempty"` + Release *string `json:"release,omitempty"` + Size *int32 `json:"size,omitempty"` + Summary *string `json:"summary,omitempty"` + Version *string `json:"version,omitempty"` } // NewPkgDetails instantiates a new PkgDetails object @@ -185,12 +185,12 @@ func (o *PkgDetails) GetContentSets() []string { var ret []string return ret } - return *o.ContentSets + return o.ContentSets } // GetContentSetsOk returns a tuple with the ContentSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PkgDetails) GetContentSetsOk() (*[]string, bool) { +func (o *PkgDetails) GetContentSetsOk() ([]string, bool) { if o == nil || o.ContentSets == nil { return nil, false } @@ -208,7 +208,7 @@ func (o *PkgDetails) HasContentSets() bool { // SetContentSets gets a reference to the given []string and assigns it to the ContentSets field. func (o *PkgDetails) SetContentSets(v []string) { - o.ContentSets = &v + o.ContentSets = v } // GetDescription returns the Description field value if set, zero value otherwise. diff --git a/model_pkg_list_mock.go b/model_pkg_list_mock.go index 1be5b61..e2dd911 100644 --- a/model_pkg_list_mock.go +++ b/model_pkg_list_mock.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,8 +16,8 @@ import ( // PkgListMock struct for PkgListMock type PkgListMock struct { - Body *[]PackageDetail `json:"body,omitempty"` - Pagination *APIPageParam `json:"pagination,omitempty"` + Body []PackageDetail `json:"body,omitempty"` + Pagination *APIPageParam `json:"pagination,omitempty"` } // NewPkgListMock instantiates a new PkgListMock object @@ -43,12 +43,12 @@ func (o *PkgListMock) GetBody() []PackageDetail { var ret []PackageDetail return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PkgListMock) GetBodyOk() (*[]PackageDetail, bool) { +func (o *PkgListMock) GetBodyOk() ([]PackageDetail, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *PkgListMock) HasBody() bool { // SetBody gets a reference to the given []PackageDetail and assigns it to the Body field. func (o *PkgListMock) SetBody(v []PackageDetail) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_pool.go b/model_pool.go index 73a2c0b..80d950b 100644 --- a/model_pool.go +++ b/model_pool.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_pool_detail.go b/model_pool_detail.go index 0a6f091..5b380c2 100644 --- a/model_pool_detail.go +++ b/model_pool_detail.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_pools_list_mock.go b/model_pools_list_mock.go index 61ce2d1..f76c597 100644 --- a/model_pools_list_mock.go +++ b/model_pools_list_mock.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // PoolsListMock struct for PoolsListMock type PoolsListMock struct { - Body *[]PoolDetail `json:"body,omitempty"` + Body []PoolDetail `json:"body,omitempty"` Pagination *APIPageParam `json:"pagination,omitempty"` } @@ -43,12 +43,12 @@ func (o *PoolsListMock) GetBody() []PoolDetail { var ret []PoolDetail return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PoolsListMock) GetBodyOk() (*[]PoolDetail, bool) { +func (o *PoolsListMock) GetBodyOk() ([]PoolDetail, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *PoolsListMock) HasBody() bool { // SetBody gets a reference to the given []PoolDetail and assigns it to the Body field. func (o *PoolsListMock) SetBody(v []PoolDetail) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_reference.go b/model_reference.go index e32b858..379c8fd 100644 --- a/model_reference.go +++ b/model_reference.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_show_system.go b/model_show_system.go index bb1d845..309debf 100644 --- a/model_show_system.go +++ b/model_show_system.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_system.go b/model_system.go index eb41e75..f770d38 100644 --- a/model_system.go +++ b/model_system.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_system_list.go b/model_system_list.go index 269a012..cd18365 100644 --- a/model_system_list.go +++ b/model_system_list.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_system_list_mock.go b/model_system_list_mock.go index 643fe6f..8d6b65a 100644 --- a/model_system_list_mock.go +++ b/model_system_list_mock.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,7 +16,7 @@ import ( // SystemListMock struct for SystemListMock type SystemListMock struct { - Body *[]System `json:"body,omitempty"` + Body []System `json:"body,omitempty"` Pagination *APIPageParam `json:"pagination,omitempty"` } @@ -43,12 +43,12 @@ func (o *SystemListMock) GetBody() []System { var ret []System return ret } - return *o.Body + return o.Body } // GetBodyOk returns a tuple with the Body field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SystemListMock) GetBodyOk() (*[]System, bool) { +func (o *SystemListMock) GetBodyOk() ([]System, bool) { if o == nil || o.Body == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *SystemListMock) HasBody() bool { // SetBody gets a reference to the given []System and assigns it to the Body field. func (o *SystemListMock) SetBody(v []System) { - o.Body = &v + o.Body = v } // GetPagination returns the Pagination field value if set, zero value otherwise. diff --git a/model_system_purpose_attributes.go b/model_system_purpose_attributes.go new file mode 100644 index 0000000..470492d --- /dev/null +++ b/model_system_purpose_attributes.go @@ -0,0 +1,185 @@ +/* +RHSM-API + +API for Red Hat Subscription Management + +API version: 1.264.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package gorhsm + +import ( + "encoding/json" +) + +// SystemPurposeAttributes System purpose settings available to an organization +type SystemPurposeAttributes struct { + Roles []string `json:"roles,omitempty"` + ServiceLevel []string `json:"serviceLevel,omitempty"` + Usage []string `json:"usage,omitempty"` +} + +// NewSystemPurposeAttributes instantiates a new SystemPurposeAttributes 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 NewSystemPurposeAttributes() *SystemPurposeAttributes { + this := SystemPurposeAttributes{} + return &this +} + +// NewSystemPurposeAttributesWithDefaults instantiates a new SystemPurposeAttributes 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 NewSystemPurposeAttributesWithDefaults() *SystemPurposeAttributes { + this := SystemPurposeAttributes{} + return &this +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *SystemPurposeAttributes) GetRoles() []string { + if o == nil || o.Roles == nil { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SystemPurposeAttributes) GetRolesOk() ([]string, bool) { + if o == nil || o.Roles == nil { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *SystemPurposeAttributes) HasRoles() bool { + if o != nil && o.Roles != nil { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *SystemPurposeAttributes) SetRoles(v []string) { + o.Roles = v +} + +// GetServiceLevel returns the ServiceLevel field value if set, zero value otherwise. +func (o *SystemPurposeAttributes) GetServiceLevel() []string { + if o == nil || o.ServiceLevel == nil { + var ret []string + return ret + } + return o.ServiceLevel +} + +// GetServiceLevelOk returns a tuple with the ServiceLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SystemPurposeAttributes) GetServiceLevelOk() ([]string, bool) { + if o == nil || o.ServiceLevel == nil { + return nil, false + } + return o.ServiceLevel, true +} + +// HasServiceLevel returns a boolean if a field has been set. +func (o *SystemPurposeAttributes) HasServiceLevel() bool { + if o != nil && o.ServiceLevel != nil { + return true + } + + return false +} + +// SetServiceLevel gets a reference to the given []string and assigns it to the ServiceLevel field. +func (o *SystemPurposeAttributes) SetServiceLevel(v []string) { + o.ServiceLevel = v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *SystemPurposeAttributes) GetUsage() []string { + if o == nil || o.Usage == nil { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SystemPurposeAttributes) GetUsageOk() ([]string, bool) { + if o == nil || o.Usage == nil { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *SystemPurposeAttributes) HasUsage() bool { + if o != nil && o.Usage != nil { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *SystemPurposeAttributes) SetUsage(v []string) { + o.Usage = v +} + +func (o SystemPurposeAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Roles != nil { + toSerialize["roles"] = o.Roles + } + if o.ServiceLevel != nil { + toSerialize["serviceLevel"] = o.ServiceLevel + } + if o.Usage != nil { + toSerialize["usage"] = o.Usage + } + return json.Marshal(toSerialize) +} + +type NullableSystemPurposeAttributes struct { + value *SystemPurposeAttributes + isSet bool +} + +func (v NullableSystemPurposeAttributes) Get() *SystemPurposeAttributes { + return v.value +} + +func (v *NullableSystemPurposeAttributes) Set(val *SystemPurposeAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableSystemPurposeAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableSystemPurposeAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSystemPurposeAttributes(val *SystemPurposeAttributes) *NullableSystemPurposeAttributes { + return &NullableSystemPurposeAttributes{value: val, isSet: true} +} + +func (v NullableSystemPurposeAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSystemPurposeAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/response.go b/response.go index c4b78e8..07fbd83 100644 --- a/response.go +++ b/response.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/utils.go b/utils.go index de9597e..5a067fe 100644 --- a/utils.go +++ b/utils.go @@ -3,7 +3,7 @@ RHSM-API API for Red Hat Subscription Management -API version: 1.196.0 +API version: 1.264.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.