From 24b7e22030912744f4f6ac418d412e45a9576fcd Mon Sep 17 00:00:00 2001 From: andrewgdewar Date: Thu, 7 Dec 2023 07:12:47 +0000 Subject: [PATCH] Update pulp bindings to 9258456e9d3b4a85d3e54836d2b97984db6aa5037ae5486b92ad2e96ab328e64 --- release/.openapi-generator/FILES | 11 + release/README.md | 16 +- release/api/openapi.yaml | 748 ++++++++- release/api_contentguards.go | 4 +- release/api_contentguards_composite.go | 1403 +++++++++++++++++ release/client.go | 3 + release/configuration.go | 2 +- release/docs/ArtifactDistributionResponse.md | 176 +-- release/docs/CompositeContentGuard.md | 113 ++ release/docs/CompositeContentGuardResponse.md | 165 ++ release/docs/ContentguardsAPI.md | 8 +- release/docs/ContentguardsCompositeAPI.md | 772 +++++++++ ...inatedCompositeContentGuardResponseList.md | 154 ++ release/docs/PatchedCompositeContentGuard.md | 118 ++ .../model_artifact_distribution_response.go | 244 +-- release/model_composite_content_guard.go | 241 +++ .../model_composite_content_guard_response.go | 315 ++++ ...d_composite_content_guard_response_list.go | 255 +++ .../model_patched_composite_content_guard.go | 212 +++ .../test/api_contentguards_composite_test.go | 164 ++ 20 files changed, 4884 insertions(+), 240 deletions(-) create mode 100644 release/api_contentguards_composite.go create mode 100644 release/docs/CompositeContentGuard.md create mode 100644 release/docs/CompositeContentGuardResponse.md create mode 100644 release/docs/ContentguardsCompositeAPI.md create mode 100644 release/docs/PaginatedCompositeContentGuardResponseList.md create mode 100644 release/docs/PatchedCompositeContentGuard.md create mode 100644 release/model_composite_content_guard.go create mode 100644 release/model_composite_content_guard_response.go create mode 100644 release/model_paginated_composite_content_guard_response_list.go create mode 100644 release/model_patched_composite_content_guard.go create mode 100644 release/test/api_contentguards_composite_test.go diff --git a/release/.openapi-generator/FILES b/release/.openapi-generator/FILES index 81846104..6e2f90af 100644 --- a/release/.openapi-generator/FILES +++ b/release/.openapi-generator/FILES @@ -21,6 +21,7 @@ api_content_packagelangpacks.go api_content_packages.go api_content_repo_metadata_files.go api_contentguards.go +api_contentguards_composite.go api_contentguards_content_redirect.go api_contentguards_header.go api_contentguards_rbac.go @@ -86,6 +87,8 @@ docs/ArtifactResponse.md docs/ArtifactsAPI.md docs/AsyncOperationResponse.md docs/ChecksumResponse.md +docs/CompositeContentGuard.md +docs/CompositeContentGuardResponse.md docs/CompsXml.md docs/ContentAPI.md docs/ContentAdvisoriesAPI.md @@ -107,6 +110,7 @@ docs/ContentRepoMetadataFilesAPI.md docs/ContentSettingsResponse.md docs/ContentSummaryResponse.md docs/ContentguardsAPI.md +docs/ContentguardsCompositeAPI.md docs/ContentguardsContentRedirectAPI.md docs/ContentguardsHeaderAPI.md docs/ContentguardsRbacAPI.md @@ -175,6 +179,7 @@ docs/PackageChecksumTypeEnum.md docs/PaginatedAccessPolicyResponseList.md docs/PaginatedArtifactDistributionResponseList.md docs/PaginatedArtifactResponseList.md +docs/PaginatedCompositeContentGuardResponseList.md docs/PaginatedContentGuardResponseList.md docs/PaginatedContentRedirectContentGuardResponseList.md docs/PaginatedDistributionResponseList.md @@ -229,6 +234,7 @@ docs/PaginatedrpmRpmRepositoryResponseList.md docs/PaginatedrpmUlnRemoteResponseList.md docs/PaginatedrpmUpdateRecordResponseList.md docs/PatchedAccessPolicy.md +docs/PatchedCompositeContentGuard.md docs/PatchedContentRedirectContentGuard.md docs/PatchedDomain.md docs/PatchedFilesystemExporter.md @@ -381,6 +387,8 @@ model_artifact_distribution_response.go model_artifact_response.go model_async_operation_response.go model_checksum_response.go +model_composite_content_guard.go +model_composite_content_guard_response.go model_comps_xml.go model_content_app_status_response.go model_content_guard_response.go @@ -434,6 +442,7 @@ model_package_checksum_type_enum.go model_paginated_access_policy_response_list.go model_paginated_artifact_distribution_response_list.go model_paginated_artifact_response_list.go +model_paginated_composite_content_guard_response_list.go model_paginated_content_guard_response_list.go model_paginated_content_redirect_content_guard_response_list.go model_paginated_distribution_response_list.go @@ -488,6 +497,7 @@ model_paginatedrpm_rpm_repository_response_list.go model_paginatedrpm_uln_remote_response_list.go model_paginatedrpm_update_record_response_list.go model_patched_access_policy.go +model_patched_composite_content_guard.go model_patched_content_redirect_content_guard.go model_patched_domain.go model_patched_filesystem_exporter.go @@ -618,6 +628,7 @@ test/api_content_packagelangpacks_test.go test/api_content_packages_test.go test/api_content_repo_metadata_files_test.go test/api_content_test.go +test/api_contentguards_composite_test.go test/api_contentguards_content_redirect_test.go test/api_contentguards_header_test.go test/api_contentguards_rbac_test.go diff --git a/release/README.md b/release/README.md index 08527328..73985e32 100644 --- a/release/README.md +++ b/release/README.md @@ -6,7 +6,7 @@ Fetch, Upload, Organize, and Distribute Software Packages 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: v3 -- Package version: 689d598a363629d8a5469d9b2a8474e4282edb037d356e3e82bb4a5edeb4224e +- Package version: 9258456e9d3b4a85d3e54836d2b97984db6aa5037ae5486b92ad2e96ab328e64 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://pulpproject.org](https://pulpproject.org) @@ -141,6 +141,16 @@ Class | Method | HTTP request | Description *ContentRepoMetadataFilesAPI* | [**ContentRpmRepoMetadataFilesList**](docs/ContentRepoMetadataFilesAPI.md#contentrpmrepometadatafileslist) | **Get** /pulp/{pulp_domain}/api/v3/content/rpm/repo_metadata_files/ | List repo metadata files *ContentRepoMetadataFilesAPI* | [**ContentRpmRepoMetadataFilesRead**](docs/ContentRepoMetadataFilesAPI.md#contentrpmrepometadatafilesread) | **Get** /{rpm_repo_metadata_file_href} | Inspect a repo metadata file *ContentguardsAPI* | [**ContentguardsList**](docs/ContentguardsAPI.md#contentguardslist) | **Get** /pulp/{pulp_domain}/api/v3/contentguards/ | List content guards +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeAddRole**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositeaddrole) | **Post** /{composite_content_guard_href}add_role/ | Add a role +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeCreate**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositecreate) | **Post** /pulp/{pulp_domain}/api/v3/contentguards/core/composite/ | Create a composite content guard +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeDelete**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositedelete) | **Delete** /{composite_content_guard_href} | Delete a composite content guard +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeList**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositelist) | **Get** /pulp/{pulp_domain}/api/v3/contentguards/core/composite/ | List composite content guards +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeListRoles**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositelistroles) | **Get** /{composite_content_guard_href}list_roles/ | List roles +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeMyPermissions**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositemypermissions) | **Get** /{composite_content_guard_href}my_permissions/ | List user permissions +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositePartialUpdate**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositepartialupdate) | **Patch** /{composite_content_guard_href} | Update a composite content guard +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeRead**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositeread) | **Get** /{composite_content_guard_href} | Inspect a composite content guard +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeRemoveRole**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositeremoverole) | **Post** /{composite_content_guard_href}remove_role/ | Remove a role +*ContentguardsCompositeAPI* | [**ContentguardsCoreCompositeUpdate**](docs/ContentguardsCompositeAPI.md#contentguardscorecompositeupdate) | **Put** /{composite_content_guard_href} | Update a composite content guard *ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectAddRole**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectaddrole) | **Post** /{content_redirect_content_guard_href}add_role/ | Add a role *ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectCreate**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectcreate) | **Post** /pulp/{pulp_domain}/api/v3/contentguards/core/content_redirect/ | Create a content redirect content guard *ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectDelete**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectdelete) | **Delete** /{content_redirect_content_guard_href} | Delete a content redirect content guard @@ -424,6 +434,8 @@ Class | Method | HTTP request | Description - [ArtifactResponse](docs/ArtifactResponse.md) - [AsyncOperationResponse](docs/AsyncOperationResponse.md) - [ChecksumResponse](docs/ChecksumResponse.md) + - [CompositeContentGuard](docs/CompositeContentGuard.md) + - [CompositeContentGuardResponse](docs/CompositeContentGuardResponse.md) - [CompsXml](docs/CompsXml.md) - [ContentAppStatusResponse](docs/ContentAppStatusResponse.md) - [ContentGuardResponse](docs/ContentGuardResponse.md) @@ -477,6 +489,7 @@ Class | Method | HTTP request | Description - [PaginatedAccessPolicyResponseList](docs/PaginatedAccessPolicyResponseList.md) - [PaginatedArtifactDistributionResponseList](docs/PaginatedArtifactDistributionResponseList.md) - [PaginatedArtifactResponseList](docs/PaginatedArtifactResponseList.md) + - [PaginatedCompositeContentGuardResponseList](docs/PaginatedCompositeContentGuardResponseList.md) - [PaginatedContentGuardResponseList](docs/PaginatedContentGuardResponseList.md) - [PaginatedContentRedirectContentGuardResponseList](docs/PaginatedContentRedirectContentGuardResponseList.md) - [PaginatedDistributionResponseList](docs/PaginatedDistributionResponseList.md) @@ -531,6 +544,7 @@ Class | Method | HTTP request | Description - [PaginatedrpmUlnRemoteResponseList](docs/PaginatedrpmUlnRemoteResponseList.md) - [PaginatedrpmUpdateRecordResponseList](docs/PaginatedrpmUpdateRecordResponseList.md) - [PatchedAccessPolicy](docs/PatchedAccessPolicy.md) + - [PatchedCompositeContentGuard](docs/PatchedCompositeContentGuard.md) - [PatchedContentRedirectContentGuard](docs/PatchedContentRedirectContentGuard.md) - [PatchedDomain](docs/PatchedDomain.md) - [PatchedFilesystemExporter](docs/PatchedFilesystemExporter.md) diff --git a/release/api/openapi.yaml b/release/api/openapi.yaml index 36aa4b57..3e7d4d30 100644 --- a/release/api/openapi.yaml +++ b/release/api/openapi.yaml @@ -13,9 +13,9 @@ info: x-logo: url: https://pulp.plan.io/attachments/download/517478/pulp_logo_word_rectangle.svg x-pulp-app-versions: - core: 3.42.0 + core: 3.43.0 rpm: 3.24.0 - file: 3.42.0 + file: 3.43.0 x-pulp-domain-enabled: true servers: - url: http://localhost:8080/ @@ -5580,12 +5580,14 @@ paths: * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header + * `core.composite` - core.composite explode: true in: query name: pulp_type required: false schema: enum: + - core.composite - core.content_redirect - core.header - core.rbac @@ -5597,6 +5599,7 @@ paths: * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header + * `core.composite` - core.composite explode: false in: query name: pulp_type__in @@ -5604,6 +5607,7 @@ paths: schema: items: enum: + - core.composite - core.content_redirect - core.header - core.rbac @@ -5650,6 +5654,555 @@ paths: summary: List content guards tags: - Contentguards + /pulp/{pulp_domain}/api/v3/contentguards/core/composite/: + get: + description: Content guard that queries a list-of content-guards for access + permissions. + operationId: contentguards_core_composite_list + parameters: + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: Filter results where name matches value + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Filter results where name contains value + explode: true + in: query + name: name__contains + required: false + schema: + type: string + style: form + - description: Filter results where name contains value + explode: true + in: query + name: name__icontains + required: false + schema: + type: string + style: form + - description: Filter results where name matches value + explode: true + in: query + name: name__iexact + required: false + schema: + type: string + style: form + - description: Filter results where name is in a comma-separated list of values + explode: false + in: query + name: name__in + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter results where name matches regex value + explode: true + in: query + name: name__iregex + required: false + schema: + type: string + style: form + - description: Filter results where name starts with value + explode: true + in: query + name: name__istartswith + required: false + schema: + type: string + style: form + - description: Filter results where name matches regex value + explode: true + in: query + name: name__regex + required: false + schema: + type: string + style: form + - description: Filter results where name starts with value + explode: true + in: query + name: name__startswith + required: false + schema: + type: string + style: form + - description: The initial index from which to return the results. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: |- + Ordering + + * `pulp_id` - Pulp id + * `-pulp_id` - Pulp id (descending) + * `pulp_created` - Pulp created + * `-pulp_created` - Pulp created (descending) + * `pulp_last_updated` - Pulp last updated + * `-pulp_last_updated` - Pulp last updated (descending) + * `pulp_type` - Pulp type + * `-pulp_type` - Pulp type (descending) + * `name` - Name + * `-name` - Name (descending) + * `description` - Description + * `-description` - Description (descending) + * `pk` - Pk + * `-pk` - Pk (descending) + explode: false + in: query + name: ordering + required: false + schema: + items: + enum: + - -description + - -name + - -pk + - -pulp_created + - -pulp_id + - -pulp_last_updated + - -pulp_type + - description + - name + - pk + - pulp_created + - pulp_id + - pulp_last_updated + - pulp_type + type: string + type: array + style: form + - explode: false + in: path + name: pulp_domain + required: true + schema: + type: string + style: simple + x-isDomain: true + - description: Multiple values may be separated by commas. + explode: false + in: query + name: pulp_href__in + required: false + schema: + items: + type: string + type: array + style: form + - description: Multiple values may be separated by commas. + explode: false + in: query + name: pulp_id__in + required: false + schema: + items: + format: uuid + type: string + type: array + style: form + - explode: true + in: query + name: q + required: false + schema: + type: string + style: form + - description: A list of fields to include in the response. + explode: true + in: query + name: fields + required: false + schema: + items: + type: string + type: array + style: form + - description: A list of fields to exclude from the response. + explode: true + in: query + name: exclude_fields + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCompositeContentGuardResponseList' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: List composite content guards + tags: + - "Contentguards: Composite" + post: + description: Content guard that queries a list-of content-guards for access + permissions. + operationId: contentguards_core_composite_create + parameters: + - explode: false + in: path + name: pulp_domain + required: true + schema: + type: string + style: simple + x-isDomain: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeContentGuard' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CompositeContentGuard' + multipart/form-data: + schema: + $ref: '#/components/schemas/CompositeContentGuard' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Create a composite content guard + tags: + - "Contentguards: Composite" + '{composite_content_guard_href}': + delete: + description: Content guard that queries a list-of content-guards for access + permissions. + operationId: contentguards_core_composite_delete + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + responses: + "204": + description: No response body + security: + - basicAuth: [] + - cookieAuth: [] + summary: Delete a composite content guard + tags: + - "Contentguards: Composite" + get: + description: Content guard that queries a list-of content-guards for access + permissions. + operationId: contentguards_core_composite_read + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + - description: A list of fields to include in the response. + explode: true + in: query + name: fields + required: false + schema: + items: + type: string + type: array + style: form + - description: A list of fields to exclude from the response. + explode: true + in: query + name: exclude_fields + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Inspect a composite content guard + tags: + - "Contentguards: Composite" + patch: + description: Content guard that queries a list-of content-guards for access + permissions. + operationId: contentguards_core_composite_partial_update + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCompositeContentGuard' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedCompositeContentGuard' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedCompositeContentGuard' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Update a composite content guard + tags: + - "Contentguards: Composite" + put: + description: Content guard that queries a list-of content-guards for access + permissions. + operationId: contentguards_core_composite_update + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeContentGuard' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CompositeContentGuard' + multipart/form-data: + schema: + $ref: '#/components/schemas/CompositeContentGuard' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Update a composite content guard + tags: + - "Contentguards: Composite" + '{composite_content_guard_href}add_role/': + post: + description: Add a role for this object to users/groups. + operationId: contentguards_core_composite_add_role + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NestedRole' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/NestedRole' + multipart/form-data: + schema: + $ref: '#/components/schemas/NestedRole' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NestedRoleResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Add a role + tags: + - "Contentguards: Composite" + '{composite_content_guard_href}list_roles/': + get: + description: List roles assigned to this object. + operationId: contentguards_core_composite_list_roles + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + - description: A list of fields to include in the response. + explode: true + in: query + name: fields + required: false + schema: + items: + type: string + type: array + style: form + - description: A list of fields to exclude from the response. + explode: true + in: query + name: exclude_fields + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ObjectRolesResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: List roles + tags: + - "Contentguards: Composite" + '{composite_content_guard_href}my_permissions/': + get: + description: List permissions available to the current user on this object. + operationId: contentguards_core_composite_my_permissions + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + - description: A list of fields to include in the response. + explode: true + in: query + name: fields + required: false + schema: + items: + type: string + type: array + style: form + - description: A list of fields to exclude from the response. + explode: true + in: query + name: exclude_fields + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MyPermissionsResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: List user permissions + tags: + - "Contentguards: Composite" + '{composite_content_guard_href}remove_role/': + post: + description: Remove a role for this object from users/groups. + operationId: contentguards_core_composite_remove_role + parameters: + - explode: false + in: path + name: composite_content_guard_href + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NestedRole' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/NestedRole' + multipart/form-data: + schema: + $ref: '#/components/schemas/NestedRole' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NestedRoleResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Remove a role + tags: + - "Contentguards: Composite" /pulp/{pulp_domain}/api/v3/contentguards/core/content_redirect/: get: description: Content guard to protect preauthenticated redirects to the content @@ -24060,23 +24613,20 @@ components: ArtifactDistributionResponse: description: A serializer for ArtifactDistribution. example: + pulp_href: https://openapi-generator.tech hidden: false pulp_labels: key: pulp_labels - pulp_href: https://openapi-generator.tech name: name base_url: base_url base_path: base_path pulp_created: 2000-01-23T04:56:07.000+00:00 content_guard: https://openapi-generator.tech properties: - name: - description: "A unique name. Ex, `rawhide` and `stable`." + pulp_href: + format: uri + readOnly: true type: string - hidden: - default: false - description: Whether this distribution should be shown in the content app. - type: boolean base_path: description: The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths @@ -24087,24 +24637,27 @@ components: format: date-time readOnly: true type: string + name: + description: "A unique name. Ex, `rawhide` and `stable`." + type: string + content_guard: + description: An optional content-guard. + format: uri + nullable: true + type: string base_url: description: The URL for accessing the publication as defined by this distribution. readOnly: true type: string + hidden: + default: false + description: Whether this distribution should be shown in the content app. + type: boolean pulp_labels: additionalProperties: nullable: true type: string type: object - content_guard: - description: An optional content-guard. - format: uri - nullable: true - type: string - pulp_href: - format: uri - readOnly: true - type: string required: - base_path - name @@ -24201,6 +24754,85 @@ components: - checksum - path type: object + CompositeContentGuard: + description: |- + Base serializer for use with :class:`pulpcore.app.models.Model` + + This ensures that all Serializers provide values for the 'pulp_href` field. + + The class provides a default for the ``ref_name`` attribute in the + ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions + of plugins are namespaced properly. + example: + name: name + description: description + guards: + - https://openapi-generator.tech + - https://openapi-generator.tech + properties: + name: + description: The unique name. + minLength: 1 + type: string + description: + description: An optional description. + minLength: 1 + nullable: true + type: string + guards: + description: List of ContentGuards to ask for access-permission. + items: + format: uri + nullable: true + type: string + type: array + required: + - name + type: object + CompositeContentGuardResponse: + description: |- + Base serializer for use with :class:`pulpcore.app.models.Model` + + This ensures that all Serializers provide values for the 'pulp_href` field. + + The class provides a default for the ``ref_name`` attribute in the + ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions + of plugins are namespaced properly. + example: + pulp_href: https://openapi-generator.tech + name: name + description: description + pulp_created: 2000-01-23T04:56:07.000+00:00 + guards: + - https://openapi-generator.tech + - https://openapi-generator.tech + properties: + pulp_href: + format: uri + readOnly: true + type: string + pulp_created: + description: Timestamp of creation. + format: date-time + readOnly: true + type: string + name: + description: The unique name. + type: string + description: + description: An optional description. + nullable: true + type: string + guards: + description: List of ContentGuards to ask for access-permission. + items: + format: uri + nullable: true + type: string + type: array + required: + - name + type: object CompsXml: description: A serializer for comps.xml Upload API. properties: @@ -25372,19 +26004,19 @@ components: previous: http://api.example.org/accounts/?offset=200&limit=100 count: 123 results: - - hidden: false + - pulp_href: https://openapi-generator.tech + hidden: false pulp_labels: key: pulp_labels - pulp_href: https://openapi-generator.tech name: name base_url: base_url base_path: base_path pulp_created: 2000-01-23T04:56:07.000+00:00 content_guard: https://openapi-generator.tech - - hidden: false + - pulp_href: https://openapi-generator.tech + hidden: false pulp_labels: key: pulp_labels - pulp_href: https://openapi-generator.tech name: name base_url: base_url base_path: base_path @@ -25454,6 +26086,45 @@ components: $ref: '#/components/schemas/ArtifactResponse' type: array type: object + PaginatedCompositeContentGuardResponseList: + example: + next: http://api.example.org/accounts/?offset=400&limit=100 + previous: http://api.example.org/accounts/?offset=200&limit=100 + count: 123 + results: + - pulp_href: https://openapi-generator.tech + name: name + description: description + pulp_created: 2000-01-23T04:56:07.000+00:00 + guards: + - https://openapi-generator.tech + - https://openapi-generator.tech + - pulp_href: https://openapi-generator.tech + name: name + description: description + pulp_created: 2000-01-23T04:56:07.000+00:00 + guards: + - https://openapi-generator.tech + - https://openapi-generator.tech + properties: + count: + example: 123 + type: integer + next: + example: http://api.example.org/accounts/?offset=400&limit=100 + format: uri + nullable: true + type: string + previous: + example: http://api.example.org/accounts/?offset=200&limit=100 + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/CompositeContentGuardResponse' + type: array + type: object PaginatedContentGuardResponseList: example: next: http://api.example.org/accounts/?offset=400&limit=100 @@ -28216,6 +28887,39 @@ components: for valid callables. Set to blank to turn off queryset scoping. type: object type: object + PatchedCompositeContentGuard: + description: |- + Base serializer for use with :class:`pulpcore.app.models.Model` + + This ensures that all Serializers provide values for the 'pulp_href` field. + + The class provides a default for the ``ref_name`` attribute in the + ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions + of plugins are namespaced properly. + example: + name: name + description: description + guards: + - https://openapi-generator.tech + - https://openapi-generator.tech + properties: + name: + description: The unique name. + minLength: 1 + type: string + description: + description: An optional description. + minLength: 1 + nullable: true + type: string + guards: + description: List of ContentGuards to ask for access-permission. + items: + format: uri + nullable: true + type: string + type: array + type: object PatchedContentRedirectContentGuard: description: A serializer for ContentRedirectContentGuard. example: diff --git a/release/api_contentguards.go b/release/api_contentguards.go index 625245c0..47ac5b46 100644 --- a/release/api_contentguards.go +++ b/release/api_contentguards.go @@ -134,13 +134,13 @@ func (r ContentguardsAPIContentguardsListRequest) PulpIdIn(pulpIdIn []string) Co return r } -// Pulp type * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header +// Pulp type * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header * `core.composite` - core.composite func (r ContentguardsAPIContentguardsListRequest) PulpType(pulpType string) ContentguardsAPIContentguardsListRequest { r.pulpType = &pulpType return r } -// Multiple values may be separated by commas. * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header +// Multiple values may be separated by commas. * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header * `core.composite` - core.composite func (r ContentguardsAPIContentguardsListRequest) PulpTypeIn(pulpTypeIn []string) ContentguardsAPIContentguardsListRequest { r.pulpTypeIn = &pulpTypeIn return r diff --git a/release/api_contentguards_composite.go b/release/api_contentguards_composite.go new file mode 100644 index 00000000..52980eae --- /dev/null +++ b/release/api_contentguards_composite.go @@ -0,0 +1,1403 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package zest + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentguardsCompositeAPIService ContentguardsCompositeAPI service +type ContentguardsCompositeAPIService service + +type ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeAddRoleExecute(r) +} + +/* +ContentguardsCoreCompositeAddRole Add a role + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeAddRole(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeAddRoleExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + pulpDomain string + compositeContentGuard *CompositeContentGuard +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest) CompositeContentGuard(compositeContentGuard CompositeContentGuard) ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest { + r.compositeContentGuard = &compositeContentGuard + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest) Execute() (*CompositeContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeCreateExecute(r) +} + +/* +ContentguardsCoreCompositeCreate Create a composite content guard + +Content guard that queries a list-of content-guards for access permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpDomain + @return ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeCreate(ctx context.Context, pulpDomain string) ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest{ + ApiService: a, + ctx: ctx, + pulpDomain: pulpDomain, + } +} + +// Execute executes the request +// @return CompositeContentGuardResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeCreateExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeCreateRequest) (*CompositeContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/{pulp_domain}/api/v3/contentguards/core/composite/" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_domain"+"}", url.PathEscape(parameterValueToString(r.pulpDomain, "pulpDomain")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compositeContentGuard == nil { + return localVarReturnValue, nil, reportError("compositeContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compositeContentGuard + 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeDeleteRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeDeleteExecute(r) +} + +/* +ContentguardsCoreCompositeDelete Delete a composite content guard + +Content guard that queries a list-of content-guards for access permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeDeleteRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeDelete(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeDeleteRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeDeleteRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeDeleteExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -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{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeListRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + pulpDomain string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIexact *string + nameIn *[]string + nameIregex *string + nameIstartswith *string + nameRegex *string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Limit(limit int32) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Name(name string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameContains(nameContains string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameIcontains(nameIcontains string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name matches value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameIexact(nameIexact string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameIexact = &nameIexact + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameIn(nameIn []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name matches regex value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameIregex(nameIregex string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameIregex = &nameIregex + return r +} + +// Filter results where name starts with value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameIstartswith(nameIstartswith string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameIstartswith = &nameIstartswith + return r +} + +// Filter results where name matches regex value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameRegex(nameRegex string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameRegex = &nameRegex + return r +} + +// Filter results where name starts with value +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) NameStartswith(nameStartswith string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Offset(offset int32) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Ordering(ordering []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) PulpIdIn(pulpIdIn []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Q(q string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.q = &q + return r +} + +// A list of fields to include in the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Fields(fields []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) ExcludeFields(excludeFields []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) Execute() (*PaginatedCompositeContentGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeListExecute(r) +} + +/* +ContentguardsCoreCompositeList List composite content guards + +Content guard that queries a list-of content-guards for access permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpDomain + @return ContentguardsCompositeAPIContentguardsCoreCompositeListRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeList(ctx context.Context, pulpDomain string) ContentguardsCompositeAPIContentguardsCoreCompositeListRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeListRequest{ + ApiService: a, + ctx: ctx, + pulpDomain: pulpDomain, + } +} + +// Execute executes the request +// @return PaginatedCompositeContentGuardResponseList +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeListExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeListRequest) (*PaginatedCompositeContentGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCompositeContentGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/{pulp_domain}/api/v3/contentguards/core/composite/" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_domain"+"}", url.PathEscape(parameterValueToString(r.pulpDomain, "pulpDomain")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameIregex != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iregex", r.nameIregex, "") + } + if r.nameIstartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__istartswith", r.nameIstartswith, "") + } + if r.nameRegex != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__regex", r.nameRegex, "") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest) Fields(fields []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest) ExcludeFields(excludeFields []string) ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeListRolesExecute(r) +} + +/* +ContentguardsCoreCompositeListRoles List roles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeListRoles(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeListRolesExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest) Fields(fields []string) ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest) ExcludeFields(excludeFields []string) ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeMyPermissionsExecute(r) +} + +/* +ContentguardsCoreCompositeMyPermissions List user permissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeMyPermissions(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeMyPermissionsExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + patchedCompositeContentGuard *PatchedCompositeContentGuard +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest) PatchedCompositeContentGuard(patchedCompositeContentGuard PatchedCompositeContentGuard) ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest { + r.patchedCompositeContentGuard = &patchedCompositeContentGuard + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest) Execute() (*CompositeContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositePartialUpdateExecute(r) +} + +/* +ContentguardsCoreCompositePartialUpdate Update a composite content guard + +Content guard that queries a list-of content-guards for access permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositePartialUpdate(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return CompositeContentGuardResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositePartialUpdateExecute(r ContentguardsCompositeAPIContentguardsCoreCompositePartialUpdateRequest) (*CompositeContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedCompositeContentGuard == nil { + return localVarReturnValue, nil, reportError("patchedCompositeContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCompositeContentGuard + 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest) Fields(fields []string) ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest) ExcludeFields(excludeFields []string) ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest) Execute() (*CompositeContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeReadExecute(r) +} + +/* +ContentguardsCoreCompositeRead Inspect a composite content guard + +Content guard that queries a list-of content-guards for access permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeRead(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return CompositeContentGuardResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeReadExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeReadRequest) (*CompositeContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeRemoveRoleExecute(r) +} + +/* +ContentguardsCoreCompositeRemoveRole Remove a role + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeRemoveRole(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeRemoveRoleExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsCompositeAPIService + compositeContentGuardHref string + compositeContentGuard *CompositeContentGuard +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest) CompositeContentGuard(compositeContentGuard CompositeContentGuard) ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest { + r.compositeContentGuard = &compositeContentGuard + return r +} + +func (r ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest) Execute() (*CompositeContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreCompositeUpdateExecute(r) +} + +/* +ContentguardsCoreCompositeUpdate Update a composite content guard + +Content guard that queries a list-of content-guards for access permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compositeContentGuardHref + @return ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest +*/ +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeUpdate(ctx context.Context, compositeContentGuardHref string) ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest { + return ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest{ + ApiService: a, + ctx: ctx, + compositeContentGuardHref: compositeContentGuardHref, + } +} + +// Execute executes the request +// @return CompositeContentGuardResponse +func (a *ContentguardsCompositeAPIService) ContentguardsCoreCompositeUpdateExecute(r ContentguardsCompositeAPIContentguardsCoreCompositeUpdateRequest) (*CompositeContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsCompositeAPIService.ContentguardsCoreCompositeUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{composite_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"composite_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.compositeContentGuardHref, "compositeContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compositeContentGuard == nil { + return localVarReturnValue, nil, reportError("compositeContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compositeContentGuard + 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 := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/release/client.go b/release/client.go index 74b227c5..6e1f0ddf 100644 --- a/release/client.go +++ b/release/client.go @@ -86,6 +86,8 @@ type APIClient struct { ContentguardsAPI *ContentguardsAPIService + ContentguardsCompositeAPI *ContentguardsCompositeAPIService + ContentguardsContentRedirectAPI *ContentguardsContentRedirectAPIService ContentguardsHeaderAPI *ContentguardsHeaderAPIService @@ -221,6 +223,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.ContentPackagesAPI = (*ContentPackagesAPIService)(&c.common) c.ContentRepoMetadataFilesAPI = (*ContentRepoMetadataFilesAPIService)(&c.common) c.ContentguardsAPI = (*ContentguardsAPIService)(&c.common) + c.ContentguardsCompositeAPI = (*ContentguardsCompositeAPIService)(&c.common) c.ContentguardsContentRedirectAPI = (*ContentguardsContentRedirectAPIService)(&c.common) c.ContentguardsHeaderAPI = (*ContentguardsHeaderAPIService)(&c.common) c.ContentguardsRbacAPI = (*ContentguardsRbacAPIService)(&c.common) diff --git a/release/configuration.go b/release/configuration.go index b6b07fd4..5ea0f303 100644 --- a/release/configuration.go +++ b/release/configuration.go @@ -93,7 +93,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/689d598a363629d8a5469d9b2a8474e4282edb037d356e3e82bb4a5edeb4224e/go", + UserAgent: "OpenAPI-Generator/9258456e9d3b4a85d3e54836d2b97984db6aa5037ae5486b92ad2e96ab328e64/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/release/docs/ArtifactDistributionResponse.md b/release/docs/ArtifactDistributionResponse.md index a0d4b0a9..cf1408a7 100644 --- a/release/docs/ArtifactDistributionResponse.md +++ b/release/docs/ArtifactDistributionResponse.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | A unique name. Ex, `rawhide` and `stable`. | -**Hidden** | Pointer to **bool** | Whether this distribution should be shown in the content app. | [optional] [default to false] +**PulpHref** | Pointer to **string** | | [optional] [readonly] **BasePath** | **string** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") | **PulpCreated** | Pointer to **time.Time** | Timestamp of creation. | [optional] [readonly] +**Name** | **string** | A unique name. Ex, `rawhide` and `stable`. | +**ContentGuard** | Pointer to **NullableString** | An optional content-guard. | [optional] **BaseUrl** | Pointer to **string** | The URL for accessing the publication as defined by this distribution. | [optional] [readonly] +**Hidden** | Pointer to **bool** | Whether this distribution should be shown in the content app. | [optional] [default to false] **PulpLabels** | Pointer to **map[string]string** | | [optional] -**ContentGuard** | Pointer to **NullableString** | An optional content-guard. | [optional] -**PulpHref** | Pointer to **string** | | [optional] [readonly] ## Methods ### NewArtifactDistributionResponse -`func NewArtifactDistributionResponse(name string, basePath string, ) *ArtifactDistributionResponse` +`func NewArtifactDistributionResponse(basePath string, name string, ) *ArtifactDistributionResponse` NewArtifactDistributionResponse instantiates a new ArtifactDistributionResponse object This constructor will assign default values to properties that have it defined, @@ -32,50 +32,30 @@ NewArtifactDistributionResponseWithDefaults instantiates a new ArtifactDistribut This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetName - -`func (o *ArtifactDistributionResponse) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ArtifactDistributionResponse) SetName(v string)` - -SetName sets Name field to given value. - - -### GetHidden +### GetPulpHref -`func (o *ArtifactDistributionResponse) GetHidden() bool` +`func (o *ArtifactDistributionResponse) GetPulpHref() string` -GetHidden returns the Hidden field if non-nil, zero value otherwise. +GetPulpHref returns the PulpHref field if non-nil, zero value otherwise. -### GetHiddenOk +### GetPulpHrefOk -`func (o *ArtifactDistributionResponse) GetHiddenOk() (*bool, bool)` +`func (o *ArtifactDistributionResponse) GetPulpHrefOk() (*string, bool)` -GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +GetPulpHrefOk returns a tuple with the PulpHref field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetHidden +### SetPulpHref -`func (o *ArtifactDistributionResponse) SetHidden(v bool)` +`func (o *ArtifactDistributionResponse) SetPulpHref(v string)` -SetHidden sets Hidden field to given value. +SetPulpHref sets PulpHref field to given value. -### HasHidden +### HasPulpHref -`func (o *ArtifactDistributionResponse) HasHidden() bool` +`func (o *ArtifactDistributionResponse) HasPulpHref() bool` -HasHidden returns a boolean if a field has been set. +HasPulpHref returns a boolean if a field has been set. ### GetBasePath @@ -122,55 +102,25 @@ SetPulpCreated sets PulpCreated field to given value. HasPulpCreated returns a boolean if a field has been set. -### GetBaseUrl - -`func (o *ArtifactDistributionResponse) GetBaseUrl() string` - -GetBaseUrl returns the BaseUrl field if non-nil, zero value otherwise. - -### GetBaseUrlOk - -`func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool)` - -GetBaseUrlOk returns a tuple with the BaseUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBaseUrl - -`func (o *ArtifactDistributionResponse) SetBaseUrl(v string)` - -SetBaseUrl sets BaseUrl field to given value. - -### HasBaseUrl - -`func (o *ArtifactDistributionResponse) HasBaseUrl() bool` - -HasBaseUrl returns a boolean if a field has been set. - -### GetPulpLabels +### GetName -`func (o *ArtifactDistributionResponse) GetPulpLabels() map[string]string` +`func (o *ArtifactDistributionResponse) GetName() string` -GetPulpLabels returns the PulpLabels field if non-nil, zero value otherwise. +GetName returns the Name field if non-nil, zero value otherwise. -### GetPulpLabelsOk +### GetNameOk -`func (o *ArtifactDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool)` +`func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool)` -GetPulpLabelsOk returns a tuple with the PulpLabels field if it's non-nil, zero value otherwise +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPulpLabels - -`func (o *ArtifactDistributionResponse) SetPulpLabels(v map[string]string)` - -SetPulpLabels sets PulpLabels field to given value. +### SetName -### HasPulpLabels +`func (o *ArtifactDistributionResponse) SetName(v string)` -`func (o *ArtifactDistributionResponse) HasPulpLabels() bool` +SetName sets Name field to given value. -HasPulpLabels returns a boolean if a field has been set. ### GetContentGuard @@ -207,30 +157,80 @@ HasContentGuard returns a boolean if a field has been set. `func (o *ArtifactDistributionResponse) UnsetContentGuard()` UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil -### GetPulpHref +### GetBaseUrl -`func (o *ArtifactDistributionResponse) GetPulpHref() string` +`func (o *ArtifactDistributionResponse) GetBaseUrl() string` -GetPulpHref returns the PulpHref field if non-nil, zero value otherwise. +GetBaseUrl returns the BaseUrl field if non-nil, zero value otherwise. -### GetPulpHrefOk +### GetBaseUrlOk -`func (o *ArtifactDistributionResponse) GetPulpHrefOk() (*string, bool)` +`func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool)` -GetPulpHrefOk returns a tuple with the PulpHref field if it's non-nil, zero value otherwise +GetBaseUrlOk returns a tuple with the BaseUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPulpHref +### SetBaseUrl -`func (o *ArtifactDistributionResponse) SetPulpHref(v string)` +`func (o *ArtifactDistributionResponse) SetBaseUrl(v string)` -SetPulpHref sets PulpHref field to given value. +SetBaseUrl sets BaseUrl field to given value. -### HasPulpHref +### HasBaseUrl -`func (o *ArtifactDistributionResponse) HasPulpHref() bool` +`func (o *ArtifactDistributionResponse) HasBaseUrl() bool` -HasPulpHref returns a boolean if a field has been set. +HasBaseUrl returns a boolean if a field has been set. + +### GetHidden + +`func (o *ArtifactDistributionResponse) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *ArtifactDistributionResponse) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *ArtifactDistributionResponse) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *ArtifactDistributionResponse) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + +### GetPulpLabels + +`func (o *ArtifactDistributionResponse) GetPulpLabels() map[string]string` + +GetPulpLabels returns the PulpLabels field if non-nil, zero value otherwise. + +### GetPulpLabelsOk + +`func (o *ArtifactDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool)` + +GetPulpLabelsOk returns a tuple with the PulpLabels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPulpLabels + +`func (o *ArtifactDistributionResponse) SetPulpLabels(v map[string]string)` + +SetPulpLabels sets PulpLabels field to given value. + +### HasPulpLabels + +`func (o *ArtifactDistributionResponse) HasPulpLabels() bool` + +HasPulpLabels 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/release/docs/CompositeContentGuard.md b/release/docs/CompositeContentGuard.md new file mode 100644 index 00000000..092e6803 --- /dev/null +++ b/release/docs/CompositeContentGuard.md @@ -0,0 +1,113 @@ +# CompositeContentGuard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The unique name. | +**Description** | Pointer to **NullableString** | An optional description. | [optional] +**Guards** | Pointer to **[]string** | List of ContentGuards to ask for access-permission. | [optional] + +## Methods + +### NewCompositeContentGuard + +`func NewCompositeContentGuard(name string, ) *CompositeContentGuard` + +NewCompositeContentGuard instantiates a new CompositeContentGuard 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 + +### NewCompositeContentGuardWithDefaults + +`func NewCompositeContentGuardWithDefaults() *CompositeContentGuard` + +NewCompositeContentGuardWithDefaults instantiates a new CompositeContentGuard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CompositeContentGuard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CompositeContentGuard) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CompositeContentGuard) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CompositeContentGuard) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CompositeContentGuard) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CompositeContentGuard) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CompositeContentGuard) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *CompositeContentGuard) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *CompositeContentGuard) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetGuards + +`func (o *CompositeContentGuard) GetGuards() []*string` + +GetGuards returns the Guards field if non-nil, zero value otherwise. + +### GetGuardsOk + +`func (o *CompositeContentGuard) GetGuardsOk() (*[]*string, bool)` + +GetGuardsOk returns a tuple with the Guards field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGuards + +`func (o *CompositeContentGuard) SetGuards(v []*string)` + +SetGuards sets Guards field to given value. + +### HasGuards + +`func (o *CompositeContentGuard) HasGuards() bool` + +HasGuards 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/release/docs/CompositeContentGuardResponse.md b/release/docs/CompositeContentGuardResponse.md new file mode 100644 index 00000000..91e9af43 --- /dev/null +++ b/release/docs/CompositeContentGuardResponse.md @@ -0,0 +1,165 @@ +# CompositeContentGuardResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PulpHref** | Pointer to **string** | | [optional] [readonly] +**PulpCreated** | Pointer to **time.Time** | Timestamp of creation. | [optional] [readonly] +**Name** | **string** | The unique name. | +**Description** | Pointer to **NullableString** | An optional description. | [optional] +**Guards** | Pointer to **[]string** | List of ContentGuards to ask for access-permission. | [optional] + +## Methods + +### NewCompositeContentGuardResponse + +`func NewCompositeContentGuardResponse(name string, ) *CompositeContentGuardResponse` + +NewCompositeContentGuardResponse instantiates a new CompositeContentGuardResponse 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 + +### NewCompositeContentGuardResponseWithDefaults + +`func NewCompositeContentGuardResponseWithDefaults() *CompositeContentGuardResponse` + +NewCompositeContentGuardResponseWithDefaults instantiates a new CompositeContentGuardResponse 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 + +### GetPulpHref + +`func (o *CompositeContentGuardResponse) GetPulpHref() string` + +GetPulpHref returns the PulpHref field if non-nil, zero value otherwise. + +### GetPulpHrefOk + +`func (o *CompositeContentGuardResponse) GetPulpHrefOk() (*string, bool)` + +GetPulpHrefOk returns a tuple with the PulpHref field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPulpHref + +`func (o *CompositeContentGuardResponse) SetPulpHref(v string)` + +SetPulpHref sets PulpHref field to given value. + +### HasPulpHref + +`func (o *CompositeContentGuardResponse) HasPulpHref() bool` + +HasPulpHref returns a boolean if a field has been set. + +### GetPulpCreated + +`func (o *CompositeContentGuardResponse) GetPulpCreated() time.Time` + +GetPulpCreated returns the PulpCreated field if non-nil, zero value otherwise. + +### GetPulpCreatedOk + +`func (o *CompositeContentGuardResponse) GetPulpCreatedOk() (*time.Time, bool)` + +GetPulpCreatedOk returns a tuple with the PulpCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPulpCreated + +`func (o *CompositeContentGuardResponse) SetPulpCreated(v time.Time)` + +SetPulpCreated sets PulpCreated field to given value. + +### HasPulpCreated + +`func (o *CompositeContentGuardResponse) HasPulpCreated() bool` + +HasPulpCreated returns a boolean if a field has been set. + +### GetName + +`func (o *CompositeContentGuardResponse) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CompositeContentGuardResponse) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CompositeContentGuardResponse) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CompositeContentGuardResponse) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CompositeContentGuardResponse) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CompositeContentGuardResponse) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CompositeContentGuardResponse) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *CompositeContentGuardResponse) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *CompositeContentGuardResponse) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetGuards + +`func (o *CompositeContentGuardResponse) GetGuards() []*string` + +GetGuards returns the Guards field if non-nil, zero value otherwise. + +### GetGuardsOk + +`func (o *CompositeContentGuardResponse) GetGuardsOk() (*[]*string, bool)` + +GetGuardsOk returns a tuple with the Guards field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGuards + +`func (o *CompositeContentGuardResponse) SetGuards(v []*string)` + +SetGuards sets Guards field to given value. + +### HasGuards + +`func (o *CompositeContentGuardResponse) HasGuards() bool` + +HasGuards 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/release/docs/ContentguardsAPI.md b/release/docs/ContentguardsAPI.md index 4973afaa..5bad75f5 100644 --- a/release/docs/ContentguardsAPI.md +++ b/release/docs/ContentguardsAPI.md @@ -44,8 +44,8 @@ func main() { ordering := []string{"Ordering_example"} // []string | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional) pulpHrefIn := []string{"Inner_example"} // []string | Multiple values may be separated by commas. (optional) pulpIdIn := []string{"Inner_example"} // []string | Multiple values may be separated by commas. (optional) - pulpType := "pulpType_example" // string | Pulp type * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header (optional) - pulpTypeIn := []string{"PulpTypeIn_example"} // []string | Multiple values may be separated by commas. * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header (optional) + pulpType := "pulpType_example" // string | Pulp type * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header * `core.composite` - core.composite (optional) + pulpTypeIn := []string{"PulpTypeIn_example"} // []string | Multiple values may be separated by commas. * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header * `core.composite` - core.composite (optional) q := "q_example" // string | (optional) fields := []string{"Inner_example"} // []string | A list of fields to include in the response. (optional) excludeFields := []string{"Inner_example"} // []string | A list of fields to exclude from the response. (optional) @@ -92,8 +92,8 @@ Name | Type | Description | Notes **ordering** | **[]string** | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) | **pulpHrefIn** | **[]string** | Multiple values may be separated by commas. | **pulpIdIn** | **[]string** | Multiple values may be separated by commas. | - **pulpType** | **string** | Pulp type * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header | - **pulpTypeIn** | **[]string** | Multiple values may be separated by commas. * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header | + **pulpType** | **string** | Pulp type * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header * `core.composite` - core.composite | + **pulpTypeIn** | **[]string** | Multiple values may be separated by commas. * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `core.header` - core.header * `core.composite` - core.composite | **q** | **string** | | **fields** | **[]string** | A list of fields to include in the response. | **excludeFields** | **[]string** | A list of fields to exclude from the response. | diff --git a/release/docs/ContentguardsCompositeAPI.md b/release/docs/ContentguardsCompositeAPI.md new file mode 100644 index 00000000..7cb3c056 --- /dev/null +++ b/release/docs/ContentguardsCompositeAPI.md @@ -0,0 +1,772 @@ +# \ContentguardsCompositeAPI + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ContentguardsCoreCompositeAddRole**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeAddRole) | **Post** /{composite_content_guard_href}add_role/ | Add a role +[**ContentguardsCoreCompositeCreate**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeCreate) | **Post** /pulp/{pulp_domain}/api/v3/contentguards/core/composite/ | Create a composite content guard +[**ContentguardsCoreCompositeDelete**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeDelete) | **Delete** /{composite_content_guard_href} | Delete a composite content guard +[**ContentguardsCoreCompositeList**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeList) | **Get** /pulp/{pulp_domain}/api/v3/contentguards/core/composite/ | List composite content guards +[**ContentguardsCoreCompositeListRoles**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeListRoles) | **Get** /{composite_content_guard_href}list_roles/ | List roles +[**ContentguardsCoreCompositeMyPermissions**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeMyPermissions) | **Get** /{composite_content_guard_href}my_permissions/ | List user permissions +[**ContentguardsCoreCompositePartialUpdate**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositePartialUpdate) | **Patch** /{composite_content_guard_href} | Update a composite content guard +[**ContentguardsCoreCompositeRead**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeRead) | **Get** /{composite_content_guard_href} | Inspect a composite content guard +[**ContentguardsCoreCompositeRemoveRole**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeRemoveRole) | **Post** /{composite_content_guard_href}remove_role/ | Remove a role +[**ContentguardsCoreCompositeUpdate**](ContentguardsCompositeAPI.md#ContentguardsCoreCompositeUpdate) | **Put** /{composite_content_guard_href} | Update a composite content guard + + + +## ContentguardsCoreCompositeAddRole + +> NestedRoleResponse ContentguardsCoreCompositeAddRole(ctx, compositeContentGuardHref).NestedRole(nestedRole).Execute() + +Add a role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + nestedRole := *openapiclient.NewNestedRole("Role_example") // NestedRole | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeAddRole(context.Background(), compositeContentGuardHref).NestedRole(nestedRole).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeAddRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeAddRole`: NestedRoleResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeAddRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeAddRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nestedRole** | [**NestedRole**](NestedRole.md) | | + +### Return type + +[**NestedRoleResponse**](NestedRoleResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### HTTP request headers + +- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data +- **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) + + +## ContentguardsCoreCompositeCreate + +> CompositeContentGuardResponse ContentguardsCoreCompositeCreate(ctx, pulpDomain).CompositeContentGuard(compositeContentGuard).Execute() + +Create a composite content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + pulpDomain := "pulpDomain_example" // string | + compositeContentGuard := *openapiclient.NewCompositeContentGuard("Name_example") // CompositeContentGuard | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeCreate(context.Background(), pulpDomain).CompositeContentGuard(compositeContentGuard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeCreate`: CompositeContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pulpDomain** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compositeContentGuard** | [**CompositeContentGuard**](CompositeContentGuard.md) | | + +### Return type + +[**CompositeContentGuardResponse**](CompositeContentGuardResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### HTTP request headers + +- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data +- **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) + + +## ContentguardsCoreCompositeDelete + +> ContentguardsCoreCompositeDelete(ctx, compositeContentGuardHref).Execute() + +Delete a composite content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeDelete(context.Background(), compositeContentGuardHref).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeDelete``: %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. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[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) + + +## ContentguardsCoreCompositeList + +> PaginatedCompositeContentGuardResponseList ContentguardsCoreCompositeList(ctx, pulpDomain).Limit(limit).Name(name).NameContains(nameContains).NameIcontains(nameIcontains).NameIexact(nameIexact).NameIn(nameIn).NameIregex(nameIregex).NameIstartswith(nameIstartswith).NameRegex(nameRegex).NameStartswith(nameStartswith).Offset(offset).Ordering(ordering).PulpHrefIn(pulpHrefIn).PulpIdIn(pulpIdIn).Q(q).Fields(fields).ExcludeFields(excludeFields).Execute() + +List composite content guards + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + pulpDomain := "pulpDomain_example" // string | + limit := int32(56) // int32 | Number of results to return per page. (optional) + name := "name_example" // string | Filter results where name matches value (optional) + nameContains := "nameContains_example" // string | Filter results where name contains value (optional) + nameIcontains := "nameIcontains_example" // string | Filter results where name contains value (optional) + nameIexact := "nameIexact_example" // string | Filter results where name matches value (optional) + nameIn := []string{"Inner_example"} // []string | Filter results where name is in a comma-separated list of values (optional) + nameIregex := "nameIregex_example" // string | Filter results where name matches regex value (optional) + nameIstartswith := "nameIstartswith_example" // string | Filter results where name starts with value (optional) + nameRegex := "nameRegex_example" // string | Filter results where name matches regex value (optional) + nameStartswith := "nameStartswith_example" // string | Filter results where name starts with value (optional) + offset := int32(56) // int32 | The initial index from which to return the results. (optional) + ordering := []string{"Ordering_example"} // []string | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional) + pulpHrefIn := []string{"Inner_example"} // []string | Multiple values may be separated by commas. (optional) + pulpIdIn := []string{"Inner_example"} // []string | Multiple values may be separated by commas. (optional) + q := "q_example" // string | (optional) + fields := []string{"Inner_example"} // []string | A list of fields to include in the response. (optional) + excludeFields := []string{"Inner_example"} // []string | A list of fields to exclude from the response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeList(context.Background(), pulpDomain).Limit(limit).Name(name).NameContains(nameContains).NameIcontains(nameIcontains).NameIexact(nameIexact).NameIn(nameIn).NameIregex(nameIregex).NameIstartswith(nameIstartswith).NameRegex(nameRegex).NameStartswith(nameStartswith).Offset(offset).Ordering(ordering).PulpHrefIn(pulpHrefIn).PulpIdIn(pulpIdIn).Q(q).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeList`: PaginatedCompositeContentGuardResponseList + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pulpDomain** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | Number of results to return per page. | + **name** | **string** | Filter results where name matches value | + **nameContains** | **string** | Filter results where name contains value | + **nameIcontains** | **string** | Filter results where name contains value | + **nameIexact** | **string** | Filter results where name matches value | + **nameIn** | **[]string** | Filter results where name is in a comma-separated list of values | + **nameIregex** | **string** | Filter results where name matches regex value | + **nameIstartswith** | **string** | Filter results where name starts with value | + **nameRegex** | **string** | Filter results where name matches regex value | + **nameStartswith** | **string** | Filter results where name starts with value | + **offset** | **int32** | The initial index from which to return the results. | + **ordering** | **[]string** | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) | + **pulpHrefIn** | **[]string** | Multiple values may be separated by commas. | + **pulpIdIn** | **[]string** | Multiple values may be separated by commas. | + **q** | **string** | | + **fields** | **[]string** | A list of fields to include in the response. | + **excludeFields** | **[]string** | A list of fields to exclude from the response. | + +### Return type + +[**PaginatedCompositeContentGuardResponseList**](PaginatedCompositeContentGuardResponseList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### 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) + + +## ContentguardsCoreCompositeListRoles + +> ObjectRolesResponse ContentguardsCoreCompositeListRoles(ctx, compositeContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + +List roles + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + fields := []string{"Inner_example"} // []string | A list of fields to include in the response. (optional) + excludeFields := []string{"Inner_example"} // []string | A list of fields to exclude from the response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeListRoles(context.Background(), compositeContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeListRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeListRoles`: ObjectRolesResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeListRoles`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeListRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **[]string** | A list of fields to include in the response. | + **excludeFields** | **[]string** | A list of fields to exclude from the response. | + +### Return type + +[**ObjectRolesResponse**](ObjectRolesResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### 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) + + +## ContentguardsCoreCompositeMyPermissions + +> MyPermissionsResponse ContentguardsCoreCompositeMyPermissions(ctx, compositeContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + +List user permissions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + fields := []string{"Inner_example"} // []string | A list of fields to include in the response. (optional) + excludeFields := []string{"Inner_example"} // []string | A list of fields to exclude from the response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeMyPermissions(context.Background(), compositeContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeMyPermissions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeMyPermissions`: MyPermissionsResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeMyPermissions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeMyPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **[]string** | A list of fields to include in the response. | + **excludeFields** | **[]string** | A list of fields to exclude from the response. | + +### Return type + +[**MyPermissionsResponse**](MyPermissionsResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### 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) + + +## ContentguardsCoreCompositePartialUpdate + +> CompositeContentGuardResponse ContentguardsCoreCompositePartialUpdate(ctx, compositeContentGuardHref).PatchedCompositeContentGuard(patchedCompositeContentGuard).Execute() + +Update a composite content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + patchedCompositeContentGuard := *openapiclient.NewPatchedCompositeContentGuard() // PatchedCompositeContentGuard | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositePartialUpdate(context.Background(), compositeContentGuardHref).PatchedCompositeContentGuard(patchedCompositeContentGuard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositePartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositePartialUpdate`: CompositeContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositePartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositePartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedCompositeContentGuard** | [**PatchedCompositeContentGuard**](PatchedCompositeContentGuard.md) | | + +### Return type + +[**CompositeContentGuardResponse**](CompositeContentGuardResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### HTTP request headers + +- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data +- **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) + + +## ContentguardsCoreCompositeRead + +> CompositeContentGuardResponse ContentguardsCoreCompositeRead(ctx, compositeContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + +Inspect a composite content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + fields := []string{"Inner_example"} // []string | A list of fields to include in the response. (optional) + excludeFields := []string{"Inner_example"} // []string | A list of fields to exclude from the response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeRead(context.Background(), compositeContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeRead`: CompositeContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **[]string** | A list of fields to include in the response. | + **excludeFields** | **[]string** | A list of fields to exclude from the response. | + +### Return type + +[**CompositeContentGuardResponse**](CompositeContentGuardResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### 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) + + +## ContentguardsCoreCompositeRemoveRole + +> NestedRoleResponse ContentguardsCoreCompositeRemoveRole(ctx, compositeContentGuardHref).NestedRole(nestedRole).Execute() + +Remove a role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + nestedRole := *openapiclient.NewNestedRole("Role_example") // NestedRole | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeRemoveRole(context.Background(), compositeContentGuardHref).NestedRole(nestedRole).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeRemoveRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeRemoveRole`: NestedRoleResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeRemoveRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeRemoveRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nestedRole** | [**NestedRole**](NestedRole.md) | | + +### Return type + +[**NestedRoleResponse**](NestedRoleResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### HTTP request headers + +- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data +- **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) + + +## ContentguardsCoreCompositeUpdate + +> CompositeContentGuardResponse ContentguardsCoreCompositeUpdate(ctx, compositeContentGuardHref).CompositeContentGuard(compositeContentGuard).Execute() + +Update a composite content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func main() { + compositeContentGuardHref := "compositeContentGuardHref_example" // string | + compositeContentGuard := *openapiclient.NewCompositeContentGuard("Name_example") // CompositeContentGuard | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeUpdate(context.Background(), compositeContentGuardHref).CompositeContentGuard(compositeContentGuard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsCompositeAPI.ContentguardsCoreCompositeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsCoreCompositeUpdate`: CompositeContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsCompositeAPI.ContentguardsCoreCompositeUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compositeContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsCoreCompositeUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compositeContentGuard** | [**CompositeContentGuard**](CompositeContentGuard.md) | | + +### Return type + +[**CompositeContentGuardResponse**](CompositeContentGuardResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth) + +### HTTP request headers + +- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/release/docs/PaginatedCompositeContentGuardResponseList.md b/release/docs/PaginatedCompositeContentGuardResponseList.md new file mode 100644 index 00000000..020a441f --- /dev/null +++ b/release/docs/PaginatedCompositeContentGuardResponseList.md @@ -0,0 +1,154 @@ +# PaginatedCompositeContentGuardResponseList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int32** | | [optional] +**Next** | Pointer to **NullableString** | | [optional] +**Previous** | Pointer to **NullableString** | | [optional] +**Results** | Pointer to [**[]CompositeContentGuardResponse**](CompositeContentGuardResponse.md) | | [optional] + +## Methods + +### NewPaginatedCompositeContentGuardResponseList + +`func NewPaginatedCompositeContentGuardResponseList() *PaginatedCompositeContentGuardResponseList` + +NewPaginatedCompositeContentGuardResponseList instantiates a new PaginatedCompositeContentGuardResponseList 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 + +### NewPaginatedCompositeContentGuardResponseListWithDefaults + +`func NewPaginatedCompositeContentGuardResponseListWithDefaults() *PaginatedCompositeContentGuardResponseList` + +NewPaginatedCompositeContentGuardResponseListWithDefaults instantiates a new PaginatedCompositeContentGuardResponseList 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 + +### GetCount + +`func (o *PaginatedCompositeContentGuardResponseList) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedCompositeContentGuardResponseList) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedCompositeContentGuardResponseList) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedCompositeContentGuardResponseList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedCompositeContentGuardResponseList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedCompositeContentGuardResponseList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedCompositeContentGuardResponseList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedCompositeContentGuardResponseList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedCompositeContentGuardResponseList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedCompositeContentGuardResponseList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedCompositeContentGuardResponseList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedCompositeContentGuardResponseList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedCompositeContentGuardResponseList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedCompositeContentGuardResponseList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedCompositeContentGuardResponseList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedCompositeContentGuardResponseList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedCompositeContentGuardResponseList) GetResults() []CompositeContentGuardResponse` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedCompositeContentGuardResponseList) GetResultsOk() (*[]CompositeContentGuardResponse, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedCompositeContentGuardResponseList) SetResults(v []CompositeContentGuardResponse)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedCompositeContentGuardResponseList) HasResults() bool` + +HasResults 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/release/docs/PatchedCompositeContentGuard.md b/release/docs/PatchedCompositeContentGuard.md new file mode 100644 index 00000000..1fdb4257 --- /dev/null +++ b/release/docs/PatchedCompositeContentGuard.md @@ -0,0 +1,118 @@ +# PatchedCompositeContentGuard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The unique name. | [optional] +**Description** | Pointer to **NullableString** | An optional description. | [optional] +**Guards** | Pointer to **[]string** | List of ContentGuards to ask for access-permission. | [optional] + +## Methods + +### NewPatchedCompositeContentGuard + +`func NewPatchedCompositeContentGuard() *PatchedCompositeContentGuard` + +NewPatchedCompositeContentGuard instantiates a new PatchedCompositeContentGuard 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 + +### NewPatchedCompositeContentGuardWithDefaults + +`func NewPatchedCompositeContentGuardWithDefaults() *PatchedCompositeContentGuard` + +NewPatchedCompositeContentGuardWithDefaults instantiates a new PatchedCompositeContentGuard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedCompositeContentGuard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedCompositeContentGuard) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedCompositeContentGuard) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedCompositeContentGuard) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedCompositeContentGuard) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedCompositeContentGuard) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedCompositeContentGuard) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedCompositeContentGuard) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *PatchedCompositeContentGuard) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *PatchedCompositeContentGuard) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetGuards + +`func (o *PatchedCompositeContentGuard) GetGuards() []*string` + +GetGuards returns the Guards field if non-nil, zero value otherwise. + +### GetGuardsOk + +`func (o *PatchedCompositeContentGuard) GetGuardsOk() (*[]*string, bool)` + +GetGuardsOk returns a tuple with the Guards field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGuards + +`func (o *PatchedCompositeContentGuard) SetGuards(v []*string)` + +SetGuards sets Guards field to given value. + +### HasGuards + +`func (o *PatchedCompositeContentGuard) HasGuards() bool` + +HasGuards 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/release/model_artifact_distribution_response.go b/release/model_artifact_distribution_response.go index 2b9436e6..77b0c83c 100644 --- a/release/model_artifact_distribution_response.go +++ b/release/model_artifact_distribution_response.go @@ -22,20 +22,20 @@ var _ MappedNullable = &ArtifactDistributionResponse{} // ArtifactDistributionResponse A serializer for ArtifactDistribution. type ArtifactDistributionResponse struct { - // A unique name. Ex, `rawhide` and `stable`. - Name string `json:"name"` - // Whether this distribution should be shown in the content app. - Hidden *bool `json:"hidden,omitempty"` + PulpHref *string `json:"pulp_href,omitempty"` // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") BasePath string `json:"base_path"` // Timestamp of creation. PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` // The URL for accessing the publication as defined by this distribution. BaseUrl *string `json:"base_url,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` PulpLabels *map[string]string `json:"pulp_labels,omitempty"` - // An optional content-guard. - ContentGuard NullableString `json:"content_guard,omitempty"` - PulpHref *string `json:"pulp_href,omitempty"` } type _ArtifactDistributionResponse ArtifactDistributionResponse @@ -44,12 +44,12 @@ type _ArtifactDistributionResponse ArtifactDistributionResponse // 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 NewArtifactDistributionResponse(name string, basePath string) *ArtifactDistributionResponse { +func NewArtifactDistributionResponse(basePath string, name string) *ArtifactDistributionResponse { this := ArtifactDistributionResponse{} + this.BasePath = basePath this.Name = name var hidden bool = false this.Hidden = &hidden - this.BasePath = basePath return &this } @@ -63,60 +63,36 @@ func NewArtifactDistributionResponseWithDefaults() *ArtifactDistributionResponse return &this } -// GetName returns the Name field value -func (o *ArtifactDistributionResponse) GetName() string { - if o == nil { +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { var ret string return ret } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ArtifactDistributionResponse) SetName(v string) { - o.Name = v -} - -// GetHidden returns the Hidden field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) GetHidden() bool { - if o == nil || IsNil(o.Hidden) { - var ret bool - return ret - } - return *o.Hidden + return *o.PulpHref } -// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArtifactDistributionResponse) GetHiddenOk() (*bool, bool) { - if o == nil || IsNil(o.Hidden) { +func (o *ArtifactDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { return nil, false } - return o.Hidden, true + return o.PulpHref, true } -// HasHidden returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasHidden() bool { - if o != nil && !IsNil(o.Hidden) { +// HasPulpHref returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { return true } return false } -// SetHidden gets a reference to the given bool and assigns it to the Hidden field. -func (o *ArtifactDistributionResponse) SetHidden(v bool) { - o.Hidden = &v +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ArtifactDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v } // GetBasePath returns the BasePath field value @@ -175,68 +151,28 @@ func (o *ArtifactDistributionResponse) SetPulpCreated(v time.Time) { o.PulpCreated = &v } -// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) GetBaseUrl() string { - if o == nil || IsNil(o.BaseUrl) { +// GetName returns the Name field value +func (o *ArtifactDistributionResponse) GetName() string { + if o == nil { var ret string return ret } - return *o.BaseUrl -} - -// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool) { - if o == nil || IsNil(o.BaseUrl) { - return nil, false - } - return o.BaseUrl, true -} - -// HasBaseUrl returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasBaseUrl() bool { - if o != nil && !IsNil(o.BaseUrl) { - return true - } - return false -} - -// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. -func (o *ArtifactDistributionResponse) SetBaseUrl(v string) { - o.BaseUrl = &v -} - -// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) GetPulpLabels() map[string]string { - if o == nil || IsNil(o.PulpLabels) { - var ret map[string]string - return ret - } - return *o.PulpLabels + return o.Name } -// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *ArtifactDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.PulpLabels) { +func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { return nil, false } - return o.PulpLabels, true -} - -// HasPulpLabels returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasPulpLabels() bool { - if o != nil && !IsNil(o.PulpLabels) { - return true - } - - return false + return &o.Name, true } -// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. -func (o *ArtifactDistributionResponse) SetPulpLabels(v map[string]string) { - o.PulpLabels = &v +// SetName sets field value +func (o *ArtifactDistributionResponse) SetName(v string) { + o.Name = v } // GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). @@ -281,36 +217,100 @@ func (o *ArtifactDistributionResponse) UnsetContentGuard() { o.ContentGuard.Unset() } -// GetPulpHref returns the PulpHref field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) GetPulpHref() string { - if o == nil || IsNil(o.PulpHref) { +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { var ret string return ret } - return *o.PulpHref + return *o.BaseUrl } -// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArtifactDistributionResponse) GetPulpHrefOk() (*string, bool) { - if o == nil || IsNil(o.PulpHref) { +func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { return nil, false } - return o.PulpHref, true + return o.BaseUrl, true } -// HasPulpHref returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasPulpHref() bool { - if o != nil && !IsNil(o.PulpHref) { +// HasBaseUrl returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { return true } return false } -// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. -func (o *ArtifactDistributionResponse) SetPulpHref(v string) { - o.PulpHref = &v +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *ArtifactDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *ArtifactDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ArtifactDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v } func (o ArtifactDistributionResponse) MarshalJSON() ([]byte, error) { @@ -323,26 +323,26 @@ func (o ArtifactDistributionResponse) MarshalJSON() ([]byte, error) { func (o ArtifactDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - if !IsNil(o.Hidden) { - toSerialize["hidden"] = o.Hidden + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref } toSerialize["base_path"] = o.BasePath if !IsNil(o.PulpCreated) { toSerialize["pulp_created"] = o.PulpCreated } + toSerialize["name"] = o.Name + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } if !IsNil(o.BaseUrl) { toSerialize["base_url"] = o.BaseUrl } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } if !IsNil(o.PulpLabels) { toSerialize["pulp_labels"] = o.PulpLabels } - if o.ContentGuard.IsSet() { - toSerialize["content_guard"] = o.ContentGuard.Get() - } - if !IsNil(o.PulpHref) { - toSerialize["pulp_href"] = o.PulpHref - } return toSerialize, nil } @@ -351,8 +351,8 @@ func (o *ArtifactDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "name", "base_path", + "name", } allProperties := make(map[string]interface{}) diff --git a/release/model_composite_content_guard.go b/release/model_composite_content_guard.go new file mode 100644 index 00000000..a7eeb907 --- /dev/null +++ b/release/model_composite_content_guard.go @@ -0,0 +1,241 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package zest + +import ( + "encoding/json" + "fmt" +) + +// checks if the CompositeContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeContentGuard{} + +// CompositeContentGuard Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly. +type CompositeContentGuard struct { + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // List of ContentGuards to ask for access-permission. + Guards []*string `json:"guards,omitempty"` +} + +type _CompositeContentGuard CompositeContentGuard + +// NewCompositeContentGuard instantiates a new CompositeContentGuard 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 NewCompositeContentGuard(name string) *CompositeContentGuard { + this := CompositeContentGuard{} + this.Name = name + return &this +} + +// NewCompositeContentGuardWithDefaults instantiates a new CompositeContentGuard 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 NewCompositeContentGuardWithDefaults() *CompositeContentGuard { + this := CompositeContentGuard{} + return &this +} + +// GetName returns the Name field value +func (o *CompositeContentGuard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompositeContentGuard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompositeContentGuard) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeContentGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeContentGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompositeContentGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CompositeContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CompositeContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CompositeContentGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetGuards returns the Guards field value if set, zero value otherwise. +func (o *CompositeContentGuard) GetGuards() []*string { + if o == nil || IsNil(o.Guards) { + var ret []*string + return ret + } + return o.Guards +} + +// GetGuardsOk returns a tuple with the Guards field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeContentGuard) GetGuardsOk() ([]*string, bool) { + if o == nil || IsNil(o.Guards) { + return nil, false + } + return o.Guards, true +} + +// HasGuards returns a boolean if a field has been set. +func (o *CompositeContentGuard) HasGuards() bool { + if o != nil && !IsNil(o.Guards) { + return true + } + + return false +} + +// SetGuards gets a reference to the given []*string and assigns it to the Guards field. +func (o *CompositeContentGuard) SetGuards(v []*string) { + o.Guards = v +} + +func (o CompositeContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Guards) { + toSerialize["guards"] = o.Guards + } + return toSerialize, nil +} + +func (o *CompositeContentGuard) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeContentGuard := _CompositeContentGuard{} + + err = json.Unmarshal(bytes, &varCompositeContentGuard) + + if err != nil { + return err + } + + *o = CompositeContentGuard(varCompositeContentGuard) + + return err +} + +type NullableCompositeContentGuard struct { + value *CompositeContentGuard + isSet bool +} + +func (v NullableCompositeContentGuard) Get() *CompositeContentGuard { + return v.value +} + +func (v *NullableCompositeContentGuard) Set(val *CompositeContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeContentGuard(val *CompositeContentGuard) *NullableCompositeContentGuard { + return &NullableCompositeContentGuard{value: val, isSet: true} +} + +func (v NullableCompositeContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/model_composite_content_guard_response.go b/release/model_composite_content_guard_response.go new file mode 100644 index 00000000..6241cd13 --- /dev/null +++ b/release/model_composite_content_guard_response.go @@ -0,0 +1,315 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package zest + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CompositeContentGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeContentGuardResponse{} + +// CompositeContentGuardResponse Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly. +type CompositeContentGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // List of ContentGuards to ask for access-permission. + Guards []*string `json:"guards,omitempty"` +} + +type _CompositeContentGuardResponse CompositeContentGuardResponse + +// NewCompositeContentGuardResponse instantiates a new CompositeContentGuardResponse 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 NewCompositeContentGuardResponse(name string) *CompositeContentGuardResponse { + this := CompositeContentGuardResponse{} + this.Name = name + return &this +} + +// NewCompositeContentGuardResponseWithDefaults instantiates a new CompositeContentGuardResponse 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 NewCompositeContentGuardResponseWithDefaults() *CompositeContentGuardResponse { + this := CompositeContentGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *CompositeContentGuardResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeContentGuardResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *CompositeContentGuardResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *CompositeContentGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *CompositeContentGuardResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeContentGuardResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *CompositeContentGuardResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *CompositeContentGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *CompositeContentGuardResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompositeContentGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompositeContentGuardResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeContentGuardResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeContentGuardResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompositeContentGuardResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CompositeContentGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CompositeContentGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CompositeContentGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetGuards returns the Guards field value if set, zero value otherwise. +func (o *CompositeContentGuardResponse) GetGuards() []*string { + if o == nil || IsNil(o.Guards) { + var ret []*string + return ret + } + return o.Guards +} + +// GetGuardsOk returns a tuple with the Guards field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeContentGuardResponse) GetGuardsOk() ([]*string, bool) { + if o == nil || IsNil(o.Guards) { + return nil, false + } + return o.Guards, true +} + +// HasGuards returns a boolean if a field has been set. +func (o *CompositeContentGuardResponse) HasGuards() bool { + if o != nil && !IsNil(o.Guards) { + return true + } + + return false +} + +// SetGuards gets a reference to the given []*string and assigns it to the Guards field. +func (o *CompositeContentGuardResponse) SetGuards(v []*string) { + o.Guards = v +} + +func (o CompositeContentGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeContentGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Guards) { + toSerialize["guards"] = o.Guards + } + return toSerialize, nil +} + +func (o *CompositeContentGuardResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeContentGuardResponse := _CompositeContentGuardResponse{} + + err = json.Unmarshal(bytes, &varCompositeContentGuardResponse) + + if err != nil { + return err + } + + *o = CompositeContentGuardResponse(varCompositeContentGuardResponse) + + return err +} + +type NullableCompositeContentGuardResponse struct { + value *CompositeContentGuardResponse + isSet bool +} + +func (v NullableCompositeContentGuardResponse) Get() *CompositeContentGuardResponse { + return v.value +} + +func (v *NullableCompositeContentGuardResponse) Set(val *CompositeContentGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeContentGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeContentGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeContentGuardResponse(val *CompositeContentGuardResponse) *NullableCompositeContentGuardResponse { + return &NullableCompositeContentGuardResponse{value: val, isSet: true} +} + +func (v NullableCompositeContentGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeContentGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/model_paginated_composite_content_guard_response_list.go b/release/model_paginated_composite_content_guard_response_list.go new file mode 100644 index 00000000..fa06cd4b --- /dev/null +++ b/release/model_paginated_composite_content_guard_response_list.go @@ -0,0 +1,255 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package zest + +import ( + "encoding/json" +) + +// checks if the PaginatedCompositeContentGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCompositeContentGuardResponseList{} + +// PaginatedCompositeContentGuardResponseList struct for PaginatedCompositeContentGuardResponseList +type PaginatedCompositeContentGuardResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []CompositeContentGuardResponse `json:"results,omitempty"` +} + +// NewPaginatedCompositeContentGuardResponseList instantiates a new PaginatedCompositeContentGuardResponseList 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 NewPaginatedCompositeContentGuardResponseList() *PaginatedCompositeContentGuardResponseList { + this := PaginatedCompositeContentGuardResponseList{} + return &this +} + +// NewPaginatedCompositeContentGuardResponseListWithDefaults instantiates a new PaginatedCompositeContentGuardResponseList 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 NewPaginatedCompositeContentGuardResponseListWithDefaults() *PaginatedCompositeContentGuardResponseList { + this := PaginatedCompositeContentGuardResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCompositeContentGuardResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCompositeContentGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCompositeContentGuardResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedCompositeContentGuardResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCompositeContentGuardResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCompositeContentGuardResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCompositeContentGuardResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCompositeContentGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCompositeContentGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCompositeContentGuardResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCompositeContentGuardResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCompositeContentGuardResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCompositeContentGuardResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCompositeContentGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCompositeContentGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCompositeContentGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedCompositeContentGuardResponseList) GetResults() []CompositeContentGuardResponse { + if o == nil || IsNil(o.Results) { + var ret []CompositeContentGuardResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCompositeContentGuardResponseList) GetResultsOk() ([]CompositeContentGuardResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedCompositeContentGuardResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CompositeContentGuardResponse and assigns it to the Results field. +func (o *PaginatedCompositeContentGuardResponseList) SetResults(v []CompositeContentGuardResponse) { + o.Results = v +} + +func (o PaginatedCompositeContentGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCompositeContentGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedCompositeContentGuardResponseList struct { + value *PaginatedCompositeContentGuardResponseList + isSet bool +} + +func (v NullablePaginatedCompositeContentGuardResponseList) Get() *PaginatedCompositeContentGuardResponseList { + return v.value +} + +func (v *NullablePaginatedCompositeContentGuardResponseList) Set(val *PaginatedCompositeContentGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCompositeContentGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCompositeContentGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCompositeContentGuardResponseList(val *PaginatedCompositeContentGuardResponseList) *NullablePaginatedCompositeContentGuardResponseList { + return &NullablePaginatedCompositeContentGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedCompositeContentGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCompositeContentGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/model_patched_composite_content_guard.go b/release/model_patched_composite_content_guard.go new file mode 100644 index 00000000..370c0ed9 --- /dev/null +++ b/release/model_patched_composite_content_guard.go @@ -0,0 +1,212 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package zest + +import ( + "encoding/json" +) + +// checks if the PatchedCompositeContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCompositeContentGuard{} + +// PatchedCompositeContentGuard Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly. +type PatchedCompositeContentGuard struct { + // The unique name. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // List of ContentGuards to ask for access-permission. + Guards []*string `json:"guards,omitempty"` +} + +// NewPatchedCompositeContentGuard instantiates a new PatchedCompositeContentGuard 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 NewPatchedCompositeContentGuard() *PatchedCompositeContentGuard { + this := PatchedCompositeContentGuard{} + return &this +} + +// NewPatchedCompositeContentGuardWithDefaults instantiates a new PatchedCompositeContentGuard 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 NewPatchedCompositeContentGuardWithDefaults() *PatchedCompositeContentGuard { + this := PatchedCompositeContentGuard{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedCompositeContentGuard) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCompositeContentGuard) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedCompositeContentGuard) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedCompositeContentGuard) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCompositeContentGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCompositeContentGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedCompositeContentGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedCompositeContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedCompositeContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedCompositeContentGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetGuards returns the Guards field value if set, zero value otherwise. +func (o *PatchedCompositeContentGuard) GetGuards() []*string { + if o == nil || IsNil(o.Guards) { + var ret []*string + return ret + } + return o.Guards +} + +// GetGuardsOk returns a tuple with the Guards field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCompositeContentGuard) GetGuardsOk() ([]*string, bool) { + if o == nil || IsNil(o.Guards) { + return nil, false + } + return o.Guards, true +} + +// HasGuards returns a boolean if a field has been set. +func (o *PatchedCompositeContentGuard) HasGuards() bool { + if o != nil && !IsNil(o.Guards) { + return true + } + + return false +} + +// SetGuards gets a reference to the given []*string and assigns it to the Guards field. +func (o *PatchedCompositeContentGuard) SetGuards(v []*string) { + o.Guards = v +} + +func (o PatchedCompositeContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCompositeContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Guards) { + toSerialize["guards"] = o.Guards + } + return toSerialize, nil +} + +type NullablePatchedCompositeContentGuard struct { + value *PatchedCompositeContentGuard + isSet bool +} + +func (v NullablePatchedCompositeContentGuard) Get() *PatchedCompositeContentGuard { + return v.value +} + +func (v *NullablePatchedCompositeContentGuard) Set(val *PatchedCompositeContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedCompositeContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedCompositeContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedCompositeContentGuard(val *PatchedCompositeContentGuard) *NullablePatchedCompositeContentGuard { + return &NullablePatchedCompositeContentGuard{value: val, isSet: true} +} + +func (v NullablePatchedCompositeContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedCompositeContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/test/api_contentguards_composite_test.go b/release/test/api_contentguards_composite_test.go new file mode 100644 index 00000000..ea19d4e6 --- /dev/null +++ b/release/test/api_contentguards_composite_test.go @@ -0,0 +1,164 @@ +/* +Pulp 3 API + +Testing ContentguardsCompositeAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package zest + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/content-services/zest/release/v2023" +) + +func Test_zest_ContentguardsCompositeAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeAddRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeAddRole(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeCreate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var pulpDomain string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeCreate(context.Background(), pulpDomain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeDelete(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var pulpDomain string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeList(context.Background(), pulpDomain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeListRoles", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeListRoles(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeMyPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeMyPermissions(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositePartialUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositePartialUpdate(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeRead", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeRead(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeRemoveRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeRemoveRole(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsCompositeAPIService ContentguardsCoreCompositeUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var compositeContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsCompositeAPI.ContentguardsCoreCompositeUpdate(context.Background(), compositeContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +}