diff --git a/release/.openapi-generator/FILES b/release/.openapi-generator/FILES index 710c07e..575d502 100644 --- a/release/.openapi-generator/FILES +++ b/release/.openapi-generator/FILES @@ -6,6 +6,7 @@ api/openapi.yaml api_access_policies.go api_acs_file.go api_acs_rpm.go +api_api_debug_auth_header.go api_api_pypi.go api_api_pypi_legacy.go api_api_pypi_simple.go @@ -38,6 +39,7 @@ api_content_summaries.go api_contentguards.go api_contentguards_composite.go api_contentguards_content_redirect.go +api_contentguards_feature.go api_contentguards_header.go api_contentguards_rbac.go api_contentguards_rhsm.go @@ -117,6 +119,7 @@ docs/AcsFileAPI.md docs/AcsRpmAPI.md docs/AddonResponse.md docs/ApiAppStatusResponse.md +docs/ApiDebugAuthHeaderAPI.md docs/ApiPypiAPI.md docs/ApiPypiLegacyAPI.md docs/ApiPypiSimpleAPI.md @@ -168,6 +171,7 @@ docs/ContentSummaryResponse.md docs/ContentguardsAPI.md docs/ContentguardsCompositeAPI.md docs/ContentguardsContentRedirectAPI.md +docs/ContentguardsFeatureAPI.md docs/ContentguardsHeaderAPI.md docs/ContentguardsRbacAPI.md docs/ContentguardsRhsmAPI.md @@ -372,6 +376,7 @@ docs/PaginatedrpmRpmRemoteResponseList.md docs/PaginatedrpmRpmRepositoryResponseList.md docs/PaginatedrpmUlnRemoteResponseList.md docs/PaginatedrpmUpdateRecordResponseList.md +docs/PaginatedserviceFeatureContentGuardResponseList.md docs/PatchedAccessPolicy.md docs/PatchedCompositeContentGuard.md docs/PatchedContentRedirectContentGuard.md @@ -408,6 +413,7 @@ docs/PatchedrpmRpmDistribution.md docs/PatchedrpmRpmRemote.md docs/PatchedrpmRpmRepository.md docs/PatchedrpmUlnRemote.md +docs/PatchedserviceFeatureContentGuard.md docs/Policy692Enum.md docs/PolicyBfeEnum.md docs/ProfileArtifactResponse.md @@ -512,6 +518,8 @@ docs/RpmUpdateCollection.md docs/RpmUpdateCollectionResponse.md docs/RpmUpdateRecord.md docs/RpmUpdateRecordResponse.md +docs/ServiceFeatureContentGuard.md +docs/ServiceFeatureContentGuardResponse.md docs/SetLabel.md docs/SetLabelResponse.md docs/SigningServiceResponse.md @@ -757,6 +765,7 @@ model_paginatedrpm_rpm_remote_response_list.go model_paginatedrpm_rpm_repository_response_list.go model_paginatedrpm_uln_remote_response_list.go model_paginatedrpm_update_record_response_list.go +model_paginatedservice_feature_content_guard_response_list.go model_patched_access_policy.go model_patched_composite_content_guard.go model_patched_content_redirect_content_guard.go @@ -793,6 +802,7 @@ model_patchedrpm_rpm_distribution.go model_patchedrpm_rpm_remote.go model_patchedrpm_rpm_repository.go model_patchedrpm_uln_remote.go +model_patchedservice_feature_content_guard.go model_policy692_enum.go model_policy_bfe_enum.go model_profile_artifact_response.go @@ -865,6 +875,8 @@ model_rpm_update_collection.go model_rpm_update_collection_response.go model_rpm_update_record.go model_rpm_update_record_response.go +model_service_feature_content_guard.go +model_service_feature_content_guard_response.go model_set_label.go model_set_label_response.go model_signing_service_response.go @@ -902,6 +914,7 @@ response.go test/api_access_policies_test.go test/api_acs_file_test.go test/api_acs_rpm_test.go +test/api_api_debug_auth_header_test.go test/api_api_pypi_legacy_test.go test/api_api_pypi_simple_test.go test/api_api_pypi_test.go @@ -933,6 +946,7 @@ test/api_content_summaries_test.go test/api_content_test.go test/api_contentguards_composite_test.go test/api_contentguards_content_redirect_test.go +test/api_contentguards_feature_test.go test/api_contentguards_header_test.go test/api_contentguards_rbac_test.go test/api_contentguards_rhsm_test.go diff --git a/release/README.md b/release/README.md index 7bf2291..702f914 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: 9d5beb82a436bd89a92e4d8a965b73996e39be037d2e4353b86e245a563d9642 +- Package version: 9258456e9d3b4a85d3e54836d2b97933dd6233137ae5486b92ad2e96ab328e64 - Generator version: 7.10.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://pulpproject.org](https://pulpproject.org) @@ -106,6 +106,7 @@ Class | Method | HTTP request | Description *AcsRpmAPI* | [**AcsRpmRpmRefresh**](docs/AcsRpmAPI.md#acsrpmrpmrefresh) | **Post** /{rpm_rpm_alternate_content_source_href}refresh/ | *AcsRpmAPI* | [**AcsRpmRpmRemoveRole**](docs/AcsRpmAPI.md#acsrpmrpmremoverole) | **Post** /{rpm_rpm_alternate_content_source_href}remove_role/ | Remove a role *AcsRpmAPI* | [**AcsRpmRpmUpdate**](docs/AcsRpmAPI.md#acsrpmrpmupdate) | **Put** /{rpm_rpm_alternate_content_source_href} | Update a rpm alternate content source +*ApiDebugAuthHeaderAPI* | [**ApiPulpDebugAuthHeaderGet**](docs/ApiDebugAuthHeaderAPI.md#apipulpdebugauthheaderget) | **Get** /api/pulp/debug_auth_header/ | *ApiPypiAPI* | [**ApiPulpPypiRead**](docs/ApiPypiAPI.md#apipulppypiread) | **Get** /api/pulp/pypi/{pulp_domain}/{path}/ | Get index summary *ApiPypiLegacyAPI* | [**ApiPulpPypiLegacyCreate**](docs/ApiPypiLegacyAPI.md#apipulppypilegacycreate) | **Post** /api/pulp/pypi/{pulp_domain}/{path}/legacy/ | Upload a package *ApiPypiSimpleAPI* | [**ApiPulpPypiSimpleCreate**](docs/ApiPypiSimpleAPI.md#apipulppypisimplecreate) | **Post** /api/pulp/pypi/{pulp_domain}/{path}/simple/ | Upload a package @@ -197,6 +198,16 @@ Class | Method | HTTP request | Description *ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectRead**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectread) | **Get** /{content_redirect_content_guard_href} | Inspect a content redirect content guard *ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectRemoveRole**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectremoverole) | **Post** /{content_redirect_content_guard_href}remove_role/ | Remove a role *ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectUpdate**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectupdate) | **Put** /{content_redirect_content_guard_href} | Update a content redirect content guard +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureAddRole**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeatureaddrole) | **Post** /{service_feature_content_guard_href}add_role/ | Add a role +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureCreate**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeaturecreate) | **Post** /api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/ | Create a feature content guard +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureDelete**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeaturedelete) | **Delete** /{service_feature_content_guard_href} | Delete a feature content guard +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureList**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeaturelist) | **Get** /api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/ | List feature content guards +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureListRoles**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeaturelistroles) | **Get** /{service_feature_content_guard_href}list_roles/ | List roles +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureMyPermissions**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeaturemypermissions) | **Get** /{service_feature_content_guard_href}my_permissions/ | List user permissions +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeaturePartialUpdate**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeaturepartialupdate) | **Patch** /{service_feature_content_guard_href} | Update a feature content guard +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureRead**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeatureread) | **Get** /{service_feature_content_guard_href} | Inspect a feature content guard +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureRemoveRole**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeatureremoverole) | **Post** /{service_feature_content_guard_href}remove_role/ | Remove a role +*ContentguardsFeatureAPI* | [**ContentguardsServiceFeatureUpdate**](docs/ContentguardsFeatureAPI.md#contentguardsservicefeatureupdate) | **Put** /{service_feature_content_guard_href} | Update a feature content guard *ContentguardsHeaderAPI* | [**ContentguardsCoreHeaderAddRole**](docs/ContentguardsHeaderAPI.md#contentguardscoreheaderaddrole) | **Post** /{header_content_guard_href}add_role/ | Add a role *ContentguardsHeaderAPI* | [**ContentguardsCoreHeaderCreate**](docs/ContentguardsHeaderAPI.md#contentguardscoreheadercreate) | **Post** /api/pulp/{pulp_domain}/api/v3/contentguards/core/header/ | Create a header content guard *ContentguardsHeaderAPI* | [**ContentguardsCoreHeaderDelete**](docs/ContentguardsHeaderAPI.md#contentguardscoreheaderdelete) | **Delete** /{header_content_guard_href} | Delete a header content guard @@ -844,6 +855,7 @@ Class | Method | HTTP request | Description - [PaginatedrpmRpmRepositoryResponseList](docs/PaginatedrpmRpmRepositoryResponseList.md) - [PaginatedrpmUlnRemoteResponseList](docs/PaginatedrpmUlnRemoteResponseList.md) - [PaginatedrpmUpdateRecordResponseList](docs/PaginatedrpmUpdateRecordResponseList.md) + - [PaginatedserviceFeatureContentGuardResponseList](docs/PaginatedserviceFeatureContentGuardResponseList.md) - [PatchedAccessPolicy](docs/PatchedAccessPolicy.md) - [PatchedCompositeContentGuard](docs/PatchedCompositeContentGuard.md) - [PatchedContentRedirectContentGuard](docs/PatchedContentRedirectContentGuard.md) @@ -880,6 +892,7 @@ Class | Method | HTTP request | Description - [PatchedrpmRpmRemote](docs/PatchedrpmRpmRemote.md) - [PatchedrpmRpmRepository](docs/PatchedrpmRpmRepository.md) - [PatchedrpmUlnRemote](docs/PatchedrpmUlnRemote.md) + - [PatchedserviceFeatureContentGuard](docs/PatchedserviceFeatureContentGuard.md) - [Policy692Enum](docs/Policy692Enum.md) - [PolicyBfeEnum](docs/PolicyBfeEnum.md) - [ProfileArtifactResponse](docs/ProfileArtifactResponse.md) @@ -952,6 +965,8 @@ Class | Method | HTTP request | Description - [RpmUpdateCollectionResponse](docs/RpmUpdateCollectionResponse.md) - [RpmUpdateRecord](docs/RpmUpdateRecord.md) - [RpmUpdateRecordResponse](docs/RpmUpdateRecordResponse.md) + - [ServiceFeatureContentGuard](docs/ServiceFeatureContentGuard.md) + - [ServiceFeatureContentGuardResponse](docs/ServiceFeatureContentGuardResponse.md) - [SetLabel](docs/SetLabel.md) - [SetLabelResponse](docs/SetLabelResponse.md) - [SigningServiceResponse](docs/SigningServiceResponse.md) diff --git a/release/api/openapi.yaml b/release/api/openapi.yaml index f4408cf..cc71830 100644 --- a/release/api/openapi.yaml +++ b/release/api/openapi.yaml @@ -12132,6 +12132,551 @@ paths: summary: Remove a role tags: - "Contentguards: Rbac" + /api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/: + get: + description: Content guard to protect the content guarded by Subscription Features. + operationId: contentguards_service_feature_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 + - description: Multiple values may be separated by commas. + explode: false + in: query + name: prn__in + required: false + schema: + items: + 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 + - description: "Filter results by using NOT, AND and OR operations on other\ + \ filters" + 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/Paginatedservice.FeatureContentGuardResponseList' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: List feature content guards + tags: + - "Contentguards: Feature" + post: + description: Content guard to protect the content guarded by Subscription Features. + operationId: contentguards_service_feature_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/service.FeatureContentGuard' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/service.FeatureContentGuard' + multipart/form-data: + schema: + $ref: '#/components/schemas/service.FeatureContentGuard' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/service.FeatureContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Create a feature content guard + tags: + - "Contentguards: Feature" + '{service_feature_content_guard_href}': + delete: + description: Content guard to protect the content guarded by Subscription Features. + operationId: contentguards_service_feature_delete + parameters: + - explode: false + in: path + name: service_feature_content_guard_href + required: true + schema: + type: string + style: simple + responses: + "204": + description: No response body + security: + - basicAuth: [] + - cookieAuth: [] + summary: Delete a feature content guard + tags: + - "Contentguards: Feature" + get: + description: Content guard to protect the content guarded by Subscription Features. + operationId: contentguards_service_feature_read + parameters: + - explode: false + in: path + name: service_feature_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/service.FeatureContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Inspect a feature content guard + tags: + - "Contentguards: Feature" + patch: + description: Content guard to protect the content guarded by Subscription Features. + operationId: contentguards_service_feature_partial_update + parameters: + - explode: false + in: path + name: service_feature_content_guard_href + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Patchedservice.FeatureContentGuard' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Patchedservice.FeatureContentGuard' + multipart/form-data: + schema: + $ref: '#/components/schemas/Patchedservice.FeatureContentGuard' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/service.FeatureContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Update a feature content guard + tags: + - "Contentguards: Feature" + put: + description: Content guard to protect the content guarded by Subscription Features. + operationId: contentguards_service_feature_update + parameters: + - explode: false + in: path + name: service_feature_content_guard_href + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service.FeatureContentGuard' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/service.FeatureContentGuard' + multipart/form-data: + schema: + $ref: '#/components/schemas/service.FeatureContentGuard' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/service.FeatureContentGuardResponse' + description: "" + security: + - basicAuth: [] + - cookieAuth: [] + summary: Update a feature content guard + tags: + - "Contentguards: Feature" + '{service_feature_content_guard_href}add_role/': + post: + description: Add a role for this object to users/groups. + operationId: contentguards_service_feature_add_role + parameters: + - explode: false + in: path + name: service_feature_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: Feature" + '{service_feature_content_guard_href}list_roles/': + get: + description: List roles assigned to this object. + operationId: contentguards_service_feature_list_roles + parameters: + - explode: false + in: path + name: service_feature_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: Feature" + '{service_feature_content_guard_href}my_permissions/': + get: + description: List permissions available to the current user on this object. + operationId: contentguards_service_feature_my_permissions + parameters: + - explode: false + in: path + name: service_feature_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: Feature" + '{service_feature_content_guard_href}remove_role/': + post: + description: Remove a role for this object from users/groups. + operationId: contentguards_service_feature_remove_role + parameters: + - explode: false + in: path + name: service_feature_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: Feature" /api/pulp/{pulp_domain}/api/v3/distributions/: get: description: Provides base viewset for Distributions. @@ -39142,6 +39687,15 @@ paths: summary: Inspect status of Pulp tags: - Status + /api/pulp/debug_auth_header/: + get: + description: Returns the content of the authentication headers. + operationId: api_pulp_debug_auth_header_get + responses: + "200": + description: No response body + tags: + - "Api: Debug_Auth_Header" /api/pulp/pypi/{pulp_domain}/{path}/: get: description: Gets package summary stats of index. @@ -39673,17 +40227,30 @@ components: key: pulp_labels hidden: false pulp_href: https://openapi-generator.tech - base_url: base_url no_content_change_since: no_content_change_since name: name + base_url: base_url pulp_created: 2000-01-23T04:56:07.000+00:00 base_path: base_path pulp_last_updated: 2000-01-23T04:56:07.000+00:00 prn: prn content_guard: https://openapi-generator.tech properties: - base_url: - description: The URL for accessing the publication as defined by this distribution. + pulp_last_updated: + description: "Timestamp of the last time this resource was updated. Note:\ + \ for immutable resources - like content, repository versions, and publication\ + \ - pulp_created and pulp_last_updated dates will be the same." + format: date-time + readOnly: true + type: string + pulp_labels: + additionalProperties: + nullable: true + type: string + type: object + pulp_created: + description: Timestamp of creation. + format: date-time readOnly: true type: string no_content_change_since: @@ -39692,46 +40259,33 @@ components: \ about content changes." readOnly: true type: string + base_path: + description: The base (relative) path component of the published url. Avoid + paths that overlap with other distribution base paths + (e.g. "foo" and "foo/bar") + type: string content_guard: description: An optional content-guard. format: uri nullable: true type: string - pulp_created: - description: Timestamp of creation. - format: date-time - readOnly: true - type: string - pulp_labels: - additionalProperties: - nullable: true - type: string - type: object - prn: - description: The Pulp Resource Name (PRN). - readOnly: true + name: + description: "A unique name. Ex, `rawhide` and `stable`." 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 - (e.g. "foo" and "foo/bar") + base_url: + description: The URL for accessing the publication as defined by this distribution. + readOnly: true type: string pulp_href: format: uri readOnly: true type: string - name: - description: "A unique name. Ex, `rawhide` and `stable`." - type: string - pulp_last_updated: - description: "Timestamp of the last time this resource was updated. Note:\ - \ for immutable resources - like content, repository versions, and publication\ - \ - pulp_created and pulp_last_updated dates will be the same." - format: date-time + prn: + description: The Pulp Resource Name (PRN). readOnly: true type: string required: @@ -42321,9 +42875,9 @@ components: key: pulp_labels hidden: false pulp_href: https://openapi-generator.tech - base_url: base_url no_content_change_since: no_content_change_since name: name + base_url: base_url pulp_created: 2000-01-23T04:56:07.000+00:00 base_path: base_path pulp_last_updated: 2000-01-23T04:56:07.000+00:00 @@ -42333,9 +42887,9 @@ components: key: pulp_labels hidden: false pulp_href: https://openapi-generator.tech - base_url: base_url no_content_change_since: no_content_change_since name: name + base_url: base_url pulp_created: 2000-01-23T04:56:07.000+00:00 base_path: base_path pulp_last_updated: 2000-01-23T04:56:07.000+00:00 @@ -47415,6 +47969,56 @@ components: - count - results type: object + Paginatedservice.FeatureContentGuardResponseList: + example: + next: http://api.example.org/accounts/?offset=400&limit=100 + previous: http://api.example.org/accounts/?offset=200&limit=100 + count: 123 + results: + - features: + - features + - features + jq_filter: jq_filter + pulp_href: https://openapi-generator.tech + name: name + description: description + pulp_created: 2000-01-23T04:56:07.000+00:00 + pulp_last_updated: 2000-01-23T04:56:07.000+00:00 + header_name: header_name + prn: prn + - features: + - features + - features + jq_filter: jq_filter + pulp_href: https://openapi-generator.tech + name: name + description: description + pulp_created: 2000-01-23T04:56:07.000+00:00 + pulp_last_updated: 2000-01-23T04:56:07.000+00:00 + header_name: header_name + prn: prn + 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/service.FeatureContentGuardResponse' + type: array + required: + - count + - results + type: object PatchedAccessPolicy: description: Serializer for AccessPolicy. example: @@ -49112,22 +49716,263 @@ components: format: int64 nullable: true type: integer - sles_auth_token: - description: Authentication token for SLES repositories. + sles_auth_token: + description: Authentication token for SLES repositories. + minLength: 1 + nullable: true + type: string + type: object + Patchedrpm.RpmRepository: + description: Serializer for Rpm Repositories. + properties: + pulp_labels: + additionalProperties: + nullable: true + type: string + type: object + name: + description: A unique name for this repository. + minLength: 1 + type: string + description: + description: An optional description. + minLength: 1 + nullable: true + type: string + retain_repo_versions: + description: Retain X versions of the repository. Default is null which + retains all versions. + format: int64 + minimum: 1 + nullable: true + type: integer + remote: + description: An optional remote to use by default when syncing. + format: uri + nullable: true + type: string + autopublish: + default: false + description: "Whether to automatically create publications for new repository\ + \ versions, and update any distributions pointing to this repository." + type: boolean + metadata_signing_service: + description: A reference to an associated signing service. + format: uri + nullable: true + type: string + package_signing_service: + description: A reference to an associated package signing service. + format: uri + nullable: true + type: string + package_signing_fingerprint: + default: "" + description: The pubkey V4 fingerprint (160 bits) to be passed to the package + signing service.The signing service will use that on signing operations + related to this repository. + maxLength: 40 + type: string + retain_package_versions: + description: "The number of versions of each package to keep in the repository;\ + \ older versions will be purged. The default is '0', which will disable\ + \ this feature and keep all versions of each package." + format: int64 + minimum: 0 + type: integer + checksum_type: + allOf: + - $ref: '#/components/schemas/PackageChecksumTypeEnum' + description: The preferred checksum type during repo publish.* `unknown` + - unknown* `md5` - md5* `sha1` - sha1* `sha224` - sha224* `sha256` - sha256* + `sha384` - sha384* `sha512` - sha512 + nullable: true + metadata_checksum_type: + allOf: + - $ref: '#/components/schemas/PackageChecksumTypeEnum' + description: "DEPRECATED: use CHECKSUM_TYPE instead.* `unknown` - unknown*\ + \ `md5` - md5* `sha1` - sha1* `sha224` - sha224* `sha256` - sha256* `sha384`\ + \ - sha384* `sha512` - sha512" + nullable: true + package_checksum_type: + allOf: + - $ref: '#/components/schemas/PackageChecksumTypeEnum' + description: "DEPRECATED: use CHECKSUM_TYPE instead.* `unknown` - unknown*\ + \ `md5` - md5* `sha1` - sha1* `sha224` - sha224* `sha256` - sha256* `sha384`\ + \ - sha384* `sha512` - sha512" + nullable: true + gpgcheck: + description: "DEPRECATED: An option specifying whether a client should perform\ + \ a GPG signature check on packages." + format: int64 + maximum: 1 + minimum: 0 + nullable: true + type: integer + repo_gpgcheck: + description: "DEPRECATED: An option specifying whether a client should perform\ + \ a GPG signature check on the repodata." + format: int64 + maximum: 1 + minimum: 0 + nullable: true + type: integer + repo_config: + description: A JSON document describing config.repo file + type: object + compression_type: + allOf: + - $ref: '#/components/schemas/CompressionTypeEnum' + description: The compression type to use for metadata files.* `zstd` - zstd* + `gz` - gz + nullable: true + type: object + Patchedrpm.UlnRemote: + description: A Serializer for UlnRemote. + properties: + name: + description: A unique name for this remote. + minLength: 1 + type: string + url: + description: "The ULN repo URL of the remote content source.\"This is \"\ + uln://\" followed by the channel name. E.g.: \"uln://ol7_x86_64_oracle\"" + minLength: 1 + type: string + ca_cert: + description: A PEM encoded CA certificate used to validate the server certificate + presented by the remote server. + minLength: 1 + nullable: true + type: string + client_cert: + description: A PEM encoded client certificate used for authentication. + minLength: 1 + nullable: true + type: string + client_key: + description: A PEM encoded private key used for authentication. + minLength: 1 + nullable: true + type: string + writeOnly: true + tls_validation: + description: "If True, TLS peer validation must be performed." + type: boolean + proxy_url: + description: "The proxy URL. Format: scheme://host:port" + minLength: 1 + nullable: true + type: string + proxy_username: + description: The username to authenticte to the proxy. + minLength: 1 + nullable: true + type: string + writeOnly: true + proxy_password: + description: The password to authenticate to the proxy. Extra leading and + trailing whitespace characters are not trimmed. + minLength: 1 + nullable: true + type: string + writeOnly: true + username: + description: Your ULN account username. + minLength: 1 + type: string + writeOnly: true + password: + description: Your ULN account password. + minLength: 1 + type: string + writeOnly: true + pulp_labels: + additionalProperties: + nullable: true + type: string + type: object + download_concurrency: + description: Total number of simultaneous connections. If not set then the + default value will be used. + format: int64 + minimum: 1 + nullable: true + type: integer + max_retries: + description: Maximum number of retry attempts after a download failure. + If not set then the default value (3) will be used. + format: int64 + nullable: true + type: integer + policy: + allOf: + - $ref: '#/components/schemas/Policy692Enum' + default: immediate + description: "The policy to use when downloading content. The possible values\ + \ include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the\ + \ default.* `immediate` - When syncing, download all metadata and content\ + \ now.* `on_demand` - When syncing, download metadata, but do not download\ + \ content now. Instead, download content as clients request it, and save\ + \ it in Pulp to be served for future client requests.* `streamed` - When\ + \ syncing, download metadata, but do not download content now. Instead,download\ + \ content as clients request it, but never save it in Pulp. This causes\ + \ future requests for that same content to have to be downloaded again." + total_timeout: + description: "aiohttp.ClientTimeout.total (q.v.) for download-connections.\ + \ The default is null, which will cause the default from the aiohttp library\ + \ to be used." + format: double + minimum: 0 + nullable: true + type: number + connect_timeout: + description: "aiohttp.ClientTimeout.connect (q.v.) for download-connections.\ + \ The default is null, which will cause the default from the aiohttp library\ + \ to be used." + format: double + minimum: 0 + nullable: true + type: number + sock_connect_timeout: + description: "aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections.\ + \ The default is null, which will cause the default from the aiohttp library\ + \ to be used." + format: double + minimum: 0 + nullable: true + type: number + sock_read_timeout: + description: "aiohttp.ClientTimeout.sock_read (q.v.) for download-connections.\ + \ The default is null, which will cause the default from the aiohttp library\ + \ to be used." + format: double + minimum: 0 + nullable: true + type: number + headers: + description: Headers for aiohttp.Clientsession + items: + type: object + type: array + rate_limit: + description: Limits requests per second for each concurrent downloader + format: int64 + nullable: true + type: integer + uln_server_base_url: + description: Base URL of the ULN server. If the uln_server_base_url is not + provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL + setting instead. minLength: 1 nullable: true type: string type: object - Patchedrpm.RpmRepository: - description: Serializer for Rpm Repositories. + Patchedservice.FeatureContentGuard: + description: A serializer for FeatureContentGuard. properties: - pulp_labels: - additionalProperties: - nullable: true - type: string - type: object name: - description: A unique name for this repository. + description: The unique name. minLength: 1 type: string description: @@ -49135,234 +49980,19 @@ components: minLength: 1 nullable: true type: string - retain_repo_versions: - description: Retain X versions of the repository. Default is null which - retains all versions. - format: int64 - minimum: 1 - nullable: true - type: integer - remote: - description: An optional remote to use by default when syncing. - format: uri - nullable: true - type: string - autopublish: - default: false - description: "Whether to automatically create publications for new repository\ - \ versions, and update any distributions pointing to this repository." - type: boolean - metadata_signing_service: - description: A reference to an associated signing service. - format: uri - nullable: true - type: string - package_signing_service: - description: A reference to an associated package signing service. - format: uri - nullable: true - type: string - package_signing_fingerprint: - default: "" - description: The pubkey V4 fingerprint (160 bits) to be passed to the package - signing service.The signing service will use that on signing operations - related to this repository. - maxLength: 40 - type: string - retain_package_versions: - description: "The number of versions of each package to keep in the repository;\ - \ older versions will be purged. The default is '0', which will disable\ - \ this feature and keep all versions of each package." - format: int64 - minimum: 0 - type: integer - checksum_type: - allOf: - - $ref: '#/components/schemas/PackageChecksumTypeEnum' - description: The preferred checksum type during repo publish.* `unknown` - - unknown* `md5` - md5* `sha1` - sha1* `sha224` - sha224* `sha256` - sha256* - `sha384` - sha384* `sha512` - sha512 - nullable: true - metadata_checksum_type: - allOf: - - $ref: '#/components/schemas/PackageChecksumTypeEnum' - description: "DEPRECATED: use CHECKSUM_TYPE instead.* `unknown` - unknown*\ - \ `md5` - md5* `sha1` - sha1* `sha224` - sha224* `sha256` - sha256* `sha384`\ - \ - sha384* `sha512` - sha512" - nullable: true - package_checksum_type: - allOf: - - $ref: '#/components/schemas/PackageChecksumTypeEnum' - description: "DEPRECATED: use CHECKSUM_TYPE instead.* `unknown` - unknown*\ - \ `md5` - md5* `sha1` - sha1* `sha224` - sha224* `sha256` - sha256* `sha384`\ - \ - sha384* `sha512` - sha512" - nullable: true - gpgcheck: - description: "DEPRECATED: An option specifying whether a client should perform\ - \ a GPG signature check on packages." - format: int64 - maximum: 1 - minimum: 0 - nullable: true - type: integer - repo_gpgcheck: - description: "DEPRECATED: An option specifying whether a client should perform\ - \ a GPG signature check on the repodata." - format: int64 - maximum: 1 - minimum: 0 - nullable: true - type: integer - repo_config: - description: A JSON document describing config.repo file - type: object - compression_type: - allOf: - - $ref: '#/components/schemas/CompressionTypeEnum' - description: The compression type to use for metadata files.* `zstd` - zstd* - `gz` - gz - nullable: true - type: object - Patchedrpm.UlnRemote: - description: A Serializer for UlnRemote. - properties: - name: - description: A unique name for this remote. - minLength: 1 - type: string - url: - description: "The ULN repo URL of the remote content source.\"This is \"\ - uln://\" followed by the channel name. E.g.: \"uln://ol7_x86_64_oracle\"" - minLength: 1 - type: string - ca_cert: - description: A PEM encoded CA certificate used to validate the server certificate - presented by the remote server. - minLength: 1 - nullable: true - type: string - client_cert: - description: A PEM encoded client certificate used for authentication. - minLength: 1 - nullable: true - type: string - client_key: - description: A PEM encoded private key used for authentication. - minLength: 1 - nullable: true - type: string - writeOnly: true - tls_validation: - description: "If True, TLS peer validation must be performed." - type: boolean - proxy_url: - description: "The proxy URL. Format: scheme://host:port" - minLength: 1 - nullable: true - type: string - proxy_username: - description: The username to authenticte to the proxy. + header_name: minLength: 1 - nullable: true type: string - writeOnly: true - proxy_password: - description: The password to authenticate to the proxy. Extra leading and - trailing whitespace characters are not trimmed. + jq_filter: minLength: 1 nullable: true type: string - writeOnly: true - username: - description: Your ULN account username. - minLength: 1 - type: string - writeOnly: true - password: - description: Your ULN account password. - minLength: 1 - type: string - writeOnly: true - pulp_labels: - additionalProperties: - nullable: true - type: string - type: object - download_concurrency: - description: Total number of simultaneous connections. If not set then the - default value will be used. - format: int64 - minimum: 1 - nullable: true - type: integer - max_retries: - description: Maximum number of retry attempts after a download failure. - If not set then the default value (3) will be used. - format: int64 - nullable: true - type: integer - policy: - allOf: - - $ref: '#/components/schemas/Policy692Enum' - default: immediate - description: "The policy to use when downloading content. The possible values\ - \ include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the\ - \ default.* `immediate` - When syncing, download all metadata and content\ - \ now.* `on_demand` - When syncing, download metadata, but do not download\ - \ content now. Instead, download content as clients request it, and save\ - \ it in Pulp to be served for future client requests.* `streamed` - When\ - \ syncing, download metadata, but do not download content now. Instead,download\ - \ content as clients request it, but never save it in Pulp. This causes\ - \ future requests for that same content to have to be downloaded again." - total_timeout: - description: "aiohttp.ClientTimeout.total (q.v.) for download-connections.\ - \ The default is null, which will cause the default from the aiohttp library\ - \ to be used." - format: double - minimum: 0 - nullable: true - type: number - connect_timeout: - description: "aiohttp.ClientTimeout.connect (q.v.) for download-connections.\ - \ The default is null, which will cause the default from the aiohttp library\ - \ to be used." - format: double - minimum: 0 - nullable: true - type: number - sock_connect_timeout: - description: "aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections.\ - \ The default is null, which will cause the default from the aiohttp library\ - \ to be used." - format: double - minimum: 0 - nullable: true - type: number - sock_read_timeout: - description: "aiohttp.ClientTimeout.sock_read (q.v.) for download-connections.\ - \ The default is null, which will cause the default from the aiohttp library\ - \ to be used." - format: double - minimum: 0 - nullable: true - type: number - headers: - description: Headers for aiohttp.Clientsession + features: + description: The list of features required to access the content. items: - type: object + minLength: 1 + type: string type: array - rate_limit: - description: Limits requests per second for each concurrent downloader - format: int64 - nullable: true - type: integer - uln_server_base_url: - description: Base URL of the ULN server. If the uln_server_base_url is not - provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL - setting instead. - minLength: 1 - nullable: true - type: string type: object Policy692Enum: description: "* `immediate` - When syncing, download all metadata and content\ @@ -58079,6 +58709,93 @@ components: readOnly: true type: boolean type: object + service.FeatureContentGuard: + description: A serializer for FeatureContentGuard. + properties: + name: + description: The unique name. + minLength: 1 + type: string + description: + description: An optional description. + minLength: 1 + nullable: true + type: string + header_name: + minLength: 1 + type: string + jq_filter: + minLength: 1 + nullable: true + type: string + features: + description: The list of features required to access the content. + items: + minLength: 1 + type: string + type: array + required: + - features + - header_name + - name + type: object + service.FeatureContentGuardResponse: + description: A serializer for FeatureContentGuard. + example: + features: + - features + - features + jq_filter: jq_filter + pulp_href: https://openapi-generator.tech + name: name + description: description + pulp_created: 2000-01-23T04:56:07.000+00:00 + pulp_last_updated: 2000-01-23T04:56:07.000+00:00 + header_name: header_name + prn: prn + properties: + pulp_href: + format: uri + readOnly: true + type: string + prn: + description: The Pulp Resource Name (PRN). + readOnly: true + type: string + pulp_created: + description: Timestamp of creation. + format: date-time + readOnly: true + type: string + pulp_last_updated: + description: "Timestamp of the last time this resource was updated. Note:\ + \ for immutable resources - like content, repository versions, and publication\ + \ - pulp_created and pulp_last_updated dates will be the same." + format: date-time + readOnly: true + type: string + name: + description: The unique name. + type: string + description: + description: An optional description. + nullable: true + type: string + header_name: + type: string + jq_filter: + nullable: true + type: string + features: + description: The list of features required to access the content. + items: + type: string + type: array + required: + - features + - header_name + - name + type: object RemoteResponse_hidden_fields_inner: example: is_set: true diff --git a/release/api_api_debug_auth_header.go b/release/api_api_debug_auth_header.go new file mode 100644 index 0000000..7fdad32 --- /dev/null +++ b/release/api_api_debug_auth_header.go @@ -0,0 +1,111 @@ +/* +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" +) + + +// ApiDebugAuthHeaderAPIService ApiDebugAuthHeaderAPI service +type ApiDebugAuthHeaderAPIService service + +type ApiDebugAuthHeaderAPIApiPulpDebugAuthHeaderGetRequest struct { + ctx context.Context + ApiService *ApiDebugAuthHeaderAPIService +} + +func (r ApiDebugAuthHeaderAPIApiPulpDebugAuthHeaderGetRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiPulpDebugAuthHeaderGetExecute(r) +} + +/* +ApiPulpDebugAuthHeaderGet Method for ApiPulpDebugAuthHeaderGet + +Returns the content of the authentication headers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDebugAuthHeaderAPIApiPulpDebugAuthHeaderGetRequest +*/ +func (a *ApiDebugAuthHeaderAPIService) ApiPulpDebugAuthHeaderGet(ctx context.Context) ApiDebugAuthHeaderAPIApiPulpDebugAuthHeaderGetRequest { + return ApiDebugAuthHeaderAPIApiPulpDebugAuthHeaderGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *ApiDebugAuthHeaderAPIService) ApiPulpDebugAuthHeaderGetExecute(r ApiDebugAuthHeaderAPIApiPulpDebugAuthHeaderGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiDebugAuthHeaderAPIService.ApiPulpDebugAuthHeaderGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/pulp/debug_auth_header/" + 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 +} diff --git a/release/api_contentguards_feature.go b/release/api_contentguards_feature.go new file mode 100644 index 0000000..c63ff3f --- /dev/null +++ b/release/api_contentguards_feature.go @@ -0,0 +1,1414 @@ +/* +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" +) + + +// ContentguardsFeatureAPIService ContentguardsFeatureAPI service +type ContentguardsFeatureAPIService service + +type ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureAddRoleExecute(r) +} + +/* +ContentguardsServiceFeatureAddRole 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 serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureAddRole(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureAddRoleExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -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 ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + pulpDomain string + serviceFeatureContentGuard *ServiceFeatureContentGuard +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest) ServiceFeatureContentGuard(serviceFeatureContentGuard ServiceFeatureContentGuard) ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest { + r.serviceFeatureContentGuard = &serviceFeatureContentGuard + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest) Execute() (*ServiceFeatureContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureCreateExecute(r) +} + +/* +ContentguardsServiceFeatureCreate Create a feature content guard + +Content guard to protect the content guarded by Subscription Features. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpDomain + @return ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureCreate(ctx context.Context, pulpDomain string) ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest{ + ApiService: a, + ctx: ctx, + pulpDomain: pulpDomain, + } +} + +// Execute executes the request +// @return ServiceFeatureContentGuardResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureCreateExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureCreateRequest) (*ServiceFeatureContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceFeatureContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/" + 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.serviceFeatureContentGuard == nil { + return localVarReturnValue, nil, reportError("serviceFeatureContentGuard 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.serviceFeatureContentGuard + 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 ContentguardsFeatureAPIContentguardsServiceFeatureDeleteRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureDeleteExecute(r) +} + +/* +ContentguardsServiceFeatureDelete Delete a feature content guard + +Content guard to protect the content guarded by Subscription Features. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureDeleteRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureDelete(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureDeleteRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureDeleteRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureDeleteExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -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 ContentguardsFeatureAPIContentguardsServiceFeatureListRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + 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 + prnIn *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Limit(limit int32) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Name(name string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameContains(nameContains string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameIcontains(nameIcontains string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name matches value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameIexact(nameIexact string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameIexact = &nameIexact + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameIn(nameIn []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name matches regex value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameIregex(nameIregex string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameIregex = &nameIregex + return r +} + +// Filter results where name starts with value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameIstartswith(nameIstartswith string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameIstartswith = &nameIstartswith + return r +} + +// Filter results where name matches regex value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameRegex(nameRegex string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameRegex = &nameRegex + return r +} + +// Filter results where name starts with value +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) NameStartswith(nameStartswith string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Offset(offset int32) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + 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 ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Ordering(ordering []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) PrnIn(prnIn []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.prnIn = &prnIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) PulpIdIn(pulpIdIn []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results by using NOT, AND and OR operations on other filters +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Q(q string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.q = &q + return r +} + +// A list of fields to include in the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Fields(fields []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) ExcludeFields(excludeFields []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) Execute() (*PaginatedserviceFeatureContentGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureListExecute(r) +} + +/* +ContentguardsServiceFeatureList List feature content guards + +Content guard to protect the content guarded by Subscription Features. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpDomain + @return ContentguardsFeatureAPIContentguardsServiceFeatureListRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureList(ctx context.Context, pulpDomain string) ContentguardsFeatureAPIContentguardsServiceFeatureListRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureListRequest{ + ApiService: a, + ctx: ctx, + pulpDomain: pulpDomain, + } +} + +// Execute executes the request +// @return PaginatedserviceFeatureContentGuardResponseList +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureListExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureListRequest) (*PaginatedserviceFeatureContentGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedserviceFeatureContentGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/" + 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, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "form", "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "form", "") + } + if r.nameIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "form", "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "form", "csv") + } + if r.nameIregex != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iregex", r.nameIregex, "form", "") + } + if r.nameIstartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__istartswith", r.nameIstartswith, "form", "") + } + if r.nameRegex != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__regex", r.nameRegex, "form", "") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "form", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "csv") + } + if r.prnIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "prn__in", r.prnIn, "form", "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "form", "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "form", "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "form", "") + } + 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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "form", "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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "form", "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 ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest) Fields(fields []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest) ExcludeFields(excludeFields []string) ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureListRolesExecute(r) +} + +/* +ContentguardsServiceFeatureListRoles 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 serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureListRoles(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureListRolesExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "form", "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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "form", "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 ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest) Fields(fields []string) ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest) ExcludeFields(excludeFields []string) ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureMyPermissionsExecute(r) +} + +/* +ContentguardsServiceFeatureMyPermissions 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 serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureMyPermissions(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureMyPermissionsExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "form", "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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "form", "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 ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + patchedserviceFeatureContentGuard *PatchedserviceFeatureContentGuard +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest) PatchedserviceFeatureContentGuard(patchedserviceFeatureContentGuard PatchedserviceFeatureContentGuard) ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest { + r.patchedserviceFeatureContentGuard = &patchedserviceFeatureContentGuard + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest) Execute() (*ServiceFeatureContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeaturePartialUpdateExecute(r) +} + +/* +ContentguardsServiceFeaturePartialUpdate Update a feature content guard + +Content guard to protect the content guarded by Subscription Features. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeaturePartialUpdate(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest { + return ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return ServiceFeatureContentGuardResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeaturePartialUpdateExecute(r ContentguardsFeatureAPIContentguardsServiceFeaturePartialUpdateRequest) (*ServiceFeatureContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceFeatureContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeaturePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedserviceFeatureContentGuard == nil { + return localVarReturnValue, nil, reportError("patchedserviceFeatureContentGuard 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.patchedserviceFeatureContentGuard + 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 ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest) Fields(fields []string) ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest) ExcludeFields(excludeFields []string) ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest) Execute() (*ServiceFeatureContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureReadExecute(r) +} + +/* +ContentguardsServiceFeatureRead Inspect a feature content guard + +Content guard to protect the content guarded by Subscription Features. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureRead(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return ServiceFeatureContentGuardResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureReadExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureReadRequest) (*ServiceFeatureContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceFeatureContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "form", "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).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "form", "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 ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureRemoveRoleExecute(r) +} + +/* +ContentguardsServiceFeatureRemoveRole 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 serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureRemoveRole(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureRemoveRoleExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -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 ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsFeatureAPIService + serviceFeatureContentGuardHref string + serviceFeatureContentGuard *ServiceFeatureContentGuard +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest) ServiceFeatureContentGuard(serviceFeatureContentGuard ServiceFeatureContentGuard) ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest { + r.serviceFeatureContentGuard = &serviceFeatureContentGuard + return r +} + +func (r ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest) Execute() (*ServiceFeatureContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsServiceFeatureUpdateExecute(r) +} + +/* +ContentguardsServiceFeatureUpdate Update a feature content guard + +Content guard to protect the content guarded by Subscription Features. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceFeatureContentGuardHref + @return ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest +*/ +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureUpdate(ctx context.Context, serviceFeatureContentGuardHref string) ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest { + return ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest{ + ApiService: a, + ctx: ctx, + serviceFeatureContentGuardHref: serviceFeatureContentGuardHref, + } +} + +// Execute executes the request +// @return ServiceFeatureContentGuardResponse +func (a *ContentguardsFeatureAPIService) ContentguardsServiceFeatureUpdateExecute(r ContentguardsFeatureAPIContentguardsServiceFeatureUpdateRequest) (*ServiceFeatureContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceFeatureContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsFeatureAPIService.ContentguardsServiceFeatureUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/{service_feature_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"service_feature_content_guard_href"+"}", url.PathEscape(parameterValueToString(r.serviceFeatureContentGuardHref, "serviceFeatureContentGuardHref")), -1) + localVarPath = strings.Replace(localVarPath, "/%2F", "/", -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceFeatureContentGuard == nil { + return localVarReturnValue, nil, reportError("serviceFeatureContentGuard 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.serviceFeatureContentGuard + 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 48d94ea..408462a 100644 --- a/release/client.go +++ b/release/client.go @@ -56,6 +56,8 @@ type APIClient struct { AcsRpmAPI *AcsRpmAPIService + ApiDebugAuthHeaderAPI *ApiDebugAuthHeaderAPIService + ApiPypiAPI *ApiPypiAPIService ApiPypiLegacyAPI *ApiPypiLegacyAPIService @@ -120,6 +122,8 @@ type APIClient struct { ContentguardsContentRedirectAPI *ContentguardsContentRedirectAPIService + ContentguardsFeatureAPI *ContentguardsFeatureAPIService + ContentguardsHeaderAPI *ContentguardsHeaderAPIService ContentguardsRbacAPI *ContentguardsRbacAPIService @@ -280,6 +284,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.AccessPoliciesAPI = (*AccessPoliciesAPIService)(&c.common) c.AcsFileAPI = (*AcsFileAPIService)(&c.common) c.AcsRpmAPI = (*AcsRpmAPIService)(&c.common) + c.ApiDebugAuthHeaderAPI = (*ApiDebugAuthHeaderAPIService)(&c.common) c.ApiPypiAPI = (*ApiPypiAPIService)(&c.common) c.ApiPypiLegacyAPI = (*ApiPypiLegacyAPIService)(&c.common) c.ApiPypiSimpleAPI = (*ApiPypiSimpleAPIService)(&c.common) @@ -312,6 +317,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.ContentguardsAPI = (*ContentguardsAPIService)(&c.common) c.ContentguardsCompositeAPI = (*ContentguardsCompositeAPIService)(&c.common) c.ContentguardsContentRedirectAPI = (*ContentguardsContentRedirectAPIService)(&c.common) + c.ContentguardsFeatureAPI = (*ContentguardsFeatureAPIService)(&c.common) c.ContentguardsHeaderAPI = (*ContentguardsHeaderAPIService)(&c.common) c.ContentguardsRbacAPI = (*ContentguardsRbacAPIService)(&c.common) c.ContentguardsRhsmAPI = (*ContentguardsRhsmAPIService)(&c.common) diff --git a/release/configuration.go b/release/configuration.go index 6db873a..b28104d 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/9d5beb82a436bd89a92e4d8a965b73996e39be037d2e4353b86e245a563d9642/go", + UserAgent: "OpenAPI-Generator/9258456e9d3b4a85d3e54836d2b97933dd6233137ae5486b92ad2e96ab328e64/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/release/docs/ApiDebugAuthHeaderAPI.md b/release/docs/ApiDebugAuthHeaderAPI.md new file mode 100644 index 0000000..7ee9fe0 --- /dev/null +++ b/release/docs/ApiDebugAuthHeaderAPI.md @@ -0,0 +1,68 @@ +# \ApiDebugAuthHeaderAPI + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApiPulpDebugAuthHeaderGet**](ApiDebugAuthHeaderAPI.md#ApiPulpDebugAuthHeaderGet) | **Get** /api/pulp/debug_auth_header/ | + + + +## ApiPulpDebugAuthHeaderGet + +> ApiPulpDebugAuthHeaderGet(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ApiDebugAuthHeaderAPI.ApiPulpDebugAuthHeaderGet(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApiDebugAuthHeaderAPI.ApiPulpDebugAuthHeaderGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiApiPulpDebugAuthHeaderGetRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### 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) + diff --git a/release/docs/ArtifactDistributionResponse.md b/release/docs/ArtifactDistributionResponse.md index dd24054..f6a7b12 100644 --- a/release/docs/ArtifactDistributionResponse.md +++ b/release/docs/ArtifactDistributionResponse.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BaseUrl** | Pointer to **string** | The URL for accessing the publication as defined by this distribution. | [optional] [readonly] +**PulpLastUpdated** | Pointer to **time.Time** | Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. | [optional] [readonly] +**PulpLabels** | Pointer to **map[string]string** | | [optional] +**PulpCreated** | Pointer to **time.Time** | Timestamp of creation. | [optional] [readonly] **NoContentChangeSince** | Pointer to **string** | Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes. | [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\") | **ContentGuard** | Pointer to **NullableString** | An optional content-guard. | [optional] -**PulpCreated** | Pointer to **time.Time** | Timestamp of creation. | [optional] [readonly] -**PulpLabels** | Pointer to **map[string]string** | | [optional] -**Prn** | Pointer to **string** | The Pulp Resource Name (PRN). | [optional] [readonly] +**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] -**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\") | +**BaseUrl** | Pointer to **string** | The URL for accessing the publication as defined by this distribution. | [optional] [readonly] **PulpHref** | Pointer to **string** | | [optional] [readonly] -**Name** | **string** | A unique name. Ex, `rawhide` and `stable`. | -**PulpLastUpdated** | Pointer to **time.Time** | Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. | [optional] [readonly] +**Prn** | Pointer to **string** | The Pulp Resource Name (PRN). | [optional] [readonly] ## Methods @@ -35,30 +35,80 @@ 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 -### GetBaseUrl +### GetPulpLastUpdated -`func (o *ArtifactDistributionResponse) GetBaseUrl() string` +`func (o *ArtifactDistributionResponse) GetPulpLastUpdated() time.Time` -GetBaseUrl returns the BaseUrl field if non-nil, zero value otherwise. +GetPulpLastUpdated returns the PulpLastUpdated field if non-nil, zero value otherwise. -### GetBaseUrlOk +### GetPulpLastUpdatedOk -`func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool)` +`func (o *ArtifactDistributionResponse) GetPulpLastUpdatedOk() (*time.Time, bool)` -GetBaseUrlOk returns a tuple with the BaseUrl field if it's non-nil, zero value otherwise +GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetBaseUrl +### SetPulpLastUpdated -`func (o *ArtifactDistributionResponse) SetBaseUrl(v string)` +`func (o *ArtifactDistributionResponse) SetPulpLastUpdated(v time.Time)` -SetBaseUrl sets BaseUrl field to given value. +SetPulpLastUpdated sets PulpLastUpdated field to given value. -### HasBaseUrl +### HasPulpLastUpdated -`func (o *ArtifactDistributionResponse) HasBaseUrl() bool` +`func (o *ArtifactDistributionResponse) HasPulpLastUpdated() bool` -HasBaseUrl returns a boolean if a field has been set. +HasPulpLastUpdated 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. + +### GetPulpCreated + +`func (o *ArtifactDistributionResponse) GetPulpCreated() time.Time` + +GetPulpCreated returns the PulpCreated field if non-nil, zero value otherwise. + +### GetPulpCreatedOk + +`func (o *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) SetPulpCreated(v time.Time)` + +SetPulpCreated sets PulpCreated field to given value. + +### HasPulpCreated + +`func (o *ArtifactDistributionResponse) HasPulpCreated() bool` + +HasPulpCreated returns a boolean if a field has been set. ### GetNoContentChangeSince @@ -85,6 +135,26 @@ SetNoContentChangeSince sets NoContentChangeSince field to given value. HasNoContentChangeSince returns a boolean if a field has been set. +### GetBasePath + +`func (o *ArtifactDistributionResponse) GetBasePath() string` + +GetBasePath returns the BasePath field if non-nil, zero value otherwise. + +### GetBasePathOk + +`func (o *ArtifactDistributionResponse) GetBasePathOk() (*string, bool)` + +GetBasePathOk returns a tuple with the BasePath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBasePath + +`func (o *ArtifactDistributionResponse) SetBasePath(v string)` + +SetBasePath sets BasePath field to given value. + + ### GetContentGuard `func (o *ArtifactDistributionResponse) GetContentGuard() string` @@ -120,80 +190,25 @@ 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 -### GetPulpCreated - -`func (o *ArtifactDistributionResponse) GetPulpCreated() time.Time` - -GetPulpCreated returns the PulpCreated field if non-nil, zero value otherwise. - -### GetPulpCreatedOk - -`func (o *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) SetPulpCreated(v time.Time)` - -SetPulpCreated sets PulpCreated field to given value. - -### HasPulpCreated - -`func (o *ArtifactDistributionResponse) HasPulpCreated() bool` - -HasPulpCreated 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. - -### GetPrn +### GetName -`func (o *ArtifactDistributionResponse) GetPrn() string` +`func (o *ArtifactDistributionResponse) GetName() string` -GetPrn returns the Prn field if non-nil, zero value otherwise. +GetName returns the Name field if non-nil, zero value otherwise. -### GetPrnOk +### GetNameOk -`func (o *ArtifactDistributionResponse) GetPrnOk() (*string, bool)` +`func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool)` -GetPrnOk returns a tuple with the Prn 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. -### SetPrn - -`func (o *ArtifactDistributionResponse) SetPrn(v string)` - -SetPrn sets Prn field to given value. +### SetName -### HasPrn +`func (o *ArtifactDistributionResponse) SetName(v string)` -`func (o *ArtifactDistributionResponse) HasPrn() bool` +SetName sets Name field to given value. -HasPrn returns a boolean if a field has been set. ### GetHidden @@ -220,25 +235,30 @@ SetHidden sets Hidden field to given value. HasHidden returns a boolean if a field has been set. -### GetBasePath +### GetBaseUrl -`func (o *ArtifactDistributionResponse) GetBasePath() string` +`func (o *ArtifactDistributionResponse) GetBaseUrl() string` -GetBasePath returns the BasePath field if non-nil, zero value otherwise. +GetBaseUrl returns the BaseUrl field if non-nil, zero value otherwise. -### GetBasePathOk +### GetBaseUrlOk -`func (o *ArtifactDistributionResponse) GetBasePathOk() (*string, bool)` +`func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool)` -GetBasePathOk returns a tuple with the BasePath 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. -### SetBasePath +### SetBaseUrl -`func (o *ArtifactDistributionResponse) SetBasePath(v string)` +`func (o *ArtifactDistributionResponse) SetBaseUrl(v string)` -SetBasePath sets BasePath field to given value. +SetBaseUrl sets BaseUrl field to given value. + +### HasBaseUrl +`func (o *ArtifactDistributionResponse) HasBaseUrl() bool` + +HasBaseUrl returns a boolean if a field has been set. ### GetPulpHref @@ -265,50 +285,30 @@ SetPulpHref sets PulpHref field to given value. HasPulpHref returns a boolean if a field has been 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. - - -### GetPulpLastUpdated +### GetPrn -`func (o *ArtifactDistributionResponse) GetPulpLastUpdated() time.Time` +`func (o *ArtifactDistributionResponse) GetPrn() string` -GetPulpLastUpdated returns the PulpLastUpdated field if non-nil, zero value otherwise. +GetPrn returns the Prn field if non-nil, zero value otherwise. -### GetPulpLastUpdatedOk +### GetPrnOk -`func (o *ArtifactDistributionResponse) GetPulpLastUpdatedOk() (*time.Time, bool)` +`func (o *ArtifactDistributionResponse) GetPrnOk() (*string, bool)` -GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field if it's non-nil, zero value otherwise +GetPrnOk returns a tuple with the Prn field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPulpLastUpdated +### SetPrn -`func (o *ArtifactDistributionResponse) SetPulpLastUpdated(v time.Time)` +`func (o *ArtifactDistributionResponse) SetPrn(v string)` -SetPulpLastUpdated sets PulpLastUpdated field to given value. +SetPrn sets Prn field to given value. -### HasPulpLastUpdated +### HasPrn -`func (o *ArtifactDistributionResponse) HasPulpLastUpdated() bool` +`func (o *ArtifactDistributionResponse) HasPrn() bool` -HasPulpLastUpdated returns a boolean if a field has been set. +HasPrn 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/ContentguardsFeatureAPI.md b/release/docs/ContentguardsFeatureAPI.md new file mode 100644 index 0000000..37e8adb --- /dev/null +++ b/release/docs/ContentguardsFeatureAPI.md @@ -0,0 +1,774 @@ +# \ContentguardsFeatureAPI + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ContentguardsServiceFeatureAddRole**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureAddRole) | **Post** /{service_feature_content_guard_href}add_role/ | Add a role +[**ContentguardsServiceFeatureCreate**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureCreate) | **Post** /api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/ | Create a feature content guard +[**ContentguardsServiceFeatureDelete**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureDelete) | **Delete** /{service_feature_content_guard_href} | Delete a feature content guard +[**ContentguardsServiceFeatureList**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureList) | **Get** /api/pulp/{pulp_domain}/api/v3/contentguards/service/feature/ | List feature content guards +[**ContentguardsServiceFeatureListRoles**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureListRoles) | **Get** /{service_feature_content_guard_href}list_roles/ | List roles +[**ContentguardsServiceFeatureMyPermissions**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureMyPermissions) | **Get** /{service_feature_content_guard_href}my_permissions/ | List user permissions +[**ContentguardsServiceFeaturePartialUpdate**](ContentguardsFeatureAPI.md#ContentguardsServiceFeaturePartialUpdate) | **Patch** /{service_feature_content_guard_href} | Update a feature content guard +[**ContentguardsServiceFeatureRead**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureRead) | **Get** /{service_feature_content_guard_href} | Inspect a feature content guard +[**ContentguardsServiceFeatureRemoveRole**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureRemoveRole) | **Post** /{service_feature_content_guard_href}remove_role/ | Remove a role +[**ContentguardsServiceFeatureUpdate**](ContentguardsFeatureAPI.md#ContentguardsServiceFeatureUpdate) | **Put** /{service_feature_content_guard_href} | Update a feature content guard + + + +## ContentguardsServiceFeatureAddRole + +> NestedRoleResponse ContentguardsServiceFeatureAddRole(ctx, serviceFeatureContentGuardHref).NestedRole(nestedRole).Execute() + +Add a role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_example" // string | + nestedRole := *openapiclient.NewNestedRole("Role_example") // NestedRole | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureAddRole(context.Background(), serviceFeatureContentGuardHref).NestedRole(nestedRole).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureAddRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureAddRole`: NestedRoleResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureAddRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureAddRoleRequest 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) + + +## ContentguardsServiceFeatureCreate + +> ServiceFeatureContentGuardResponse ContentguardsServiceFeatureCreate(ctx, pulpDomain).ServiceFeatureContentGuard(serviceFeatureContentGuard).Execute() + +Create a feature content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + pulpDomain := "pulpDomain_example" // string | + serviceFeatureContentGuard := *openapiclient.NewServiceFeatureContentGuard("Name_example", "HeaderName_example", []string{"Features_example"}) // ServiceFeatureContentGuard | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureCreate(context.Background(), pulpDomain).ServiceFeatureContentGuard(serviceFeatureContentGuard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureCreate`: ServiceFeatureContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureCreate`: %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 apiContentguardsServiceFeatureCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceFeatureContentGuard** | [**ServiceFeatureContentGuard**](ServiceFeatureContentGuard.md) | | + +### Return type + +[**ServiceFeatureContentGuardResponse**](ServiceFeatureContentGuardResponse.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) + + +## ContentguardsServiceFeatureDelete + +> ContentguardsServiceFeatureDelete(ctx, serviceFeatureContentGuardHref).Execute() + +Delete a feature content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureDelete(context.Background(), serviceFeatureContentGuardHref).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureDelete``: %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. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureDeleteRequest 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) + + +## ContentguardsServiceFeatureList + +> PaginatedserviceFeatureContentGuardResponseList ContentguardsServiceFeatureList(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).PrnIn(prnIn).PulpHrefIn(pulpHrefIn).PulpIdIn(pulpIdIn).Q(q).Fields(fields).ExcludeFields(excludeFields).Execute() + +List feature content guards + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +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) + prnIn := []string{"Inner_example"} // []string | Multiple values may be separated by commas. (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 | Filter results by using NOT, AND and OR operations on other filters (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.ContentguardsFeatureAPI.ContentguardsServiceFeatureList(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).PrnIn(prnIn).PulpHrefIn(pulpHrefIn).PulpIdIn(pulpIdIn).Q(q).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureList`: PaginatedserviceFeatureContentGuardResponseList + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureList`: %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 apiContentguardsServiceFeatureListRequest 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) | + **prnIn** | **[]string** | Multiple values may be separated by commas. | + **pulpHrefIn** | **[]string** | Multiple values may be separated by commas. | + **pulpIdIn** | **[]string** | Multiple values may be separated by commas. | + **q** | **string** | Filter results by using NOT, AND and OR operations on other filters | + **fields** | **[]string** | A list of fields to include in the response. | + **excludeFields** | **[]string** | A list of fields to exclude from the response. | + +### Return type + +[**PaginatedserviceFeatureContentGuardResponseList**](PaginatedserviceFeatureContentGuardResponseList.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) + + +## ContentguardsServiceFeatureListRoles + +> ObjectRolesResponse ContentguardsServiceFeatureListRoles(ctx, serviceFeatureContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + +List roles + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_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.ContentguardsFeatureAPI.ContentguardsServiceFeatureListRoles(context.Background(), serviceFeatureContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureListRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureListRoles`: ObjectRolesResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureListRoles`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureListRolesRequest 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) + + +## ContentguardsServiceFeatureMyPermissions + +> MyPermissionsResponse ContentguardsServiceFeatureMyPermissions(ctx, serviceFeatureContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + +List user permissions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_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.ContentguardsFeatureAPI.ContentguardsServiceFeatureMyPermissions(context.Background(), serviceFeatureContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureMyPermissions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureMyPermissions`: MyPermissionsResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureMyPermissions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureMyPermissionsRequest 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) + + +## ContentguardsServiceFeaturePartialUpdate + +> ServiceFeatureContentGuardResponse ContentguardsServiceFeaturePartialUpdate(ctx, serviceFeatureContentGuardHref).PatchedserviceFeatureContentGuard(patchedserviceFeatureContentGuard).Execute() + +Update a feature content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_example" // string | + patchedserviceFeatureContentGuard := *openapiclient.NewPatchedserviceFeatureContentGuard() // PatchedserviceFeatureContentGuard | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeaturePartialUpdate(context.Background(), serviceFeatureContentGuardHref).PatchedserviceFeatureContentGuard(patchedserviceFeatureContentGuard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeaturePartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeaturePartialUpdate`: ServiceFeatureContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeaturePartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeaturePartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedserviceFeatureContentGuard** | [**PatchedserviceFeatureContentGuard**](PatchedserviceFeatureContentGuard.md) | | + +### Return type + +[**ServiceFeatureContentGuardResponse**](ServiceFeatureContentGuardResponse.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) + + +## ContentguardsServiceFeatureRead + +> ServiceFeatureContentGuardResponse ContentguardsServiceFeatureRead(ctx, serviceFeatureContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + +Inspect a feature content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_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.ContentguardsFeatureAPI.ContentguardsServiceFeatureRead(context.Background(), serviceFeatureContentGuardHref).Fields(fields).ExcludeFields(excludeFields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureRead`: ServiceFeatureContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureReadRequest 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 + +[**ServiceFeatureContentGuardResponse**](ServiceFeatureContentGuardResponse.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) + + +## ContentguardsServiceFeatureRemoveRole + +> NestedRoleResponse ContentguardsServiceFeatureRemoveRole(ctx, serviceFeatureContentGuardHref).NestedRole(nestedRole).Execute() + +Remove a role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_example" // string | + nestedRole := *openapiclient.NewNestedRole("Role_example") // NestedRole | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureRemoveRole(context.Background(), serviceFeatureContentGuardHref).NestedRole(nestedRole).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureRemoveRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureRemoveRole`: NestedRoleResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureRemoveRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureRemoveRoleRequest 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) + + +## ContentguardsServiceFeatureUpdate + +> ServiceFeatureContentGuardResponse ContentguardsServiceFeatureUpdate(ctx, serviceFeatureContentGuardHref).ServiceFeatureContentGuard(serviceFeatureContentGuard).Execute() + +Update a feature content guard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/content-services/zest/release/v2024" +) + +func main() { + serviceFeatureContentGuardHref := "serviceFeatureContentGuardHref_example" // string | + serviceFeatureContentGuard := *openapiclient.NewServiceFeatureContentGuard("Name_example", "HeaderName_example", []string{"Features_example"}) // ServiceFeatureContentGuard | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureUpdate(context.Background(), serviceFeatureContentGuardHref).ServiceFeatureContentGuard(serviceFeatureContentGuard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ContentguardsFeatureAPI.ContentguardsServiceFeatureUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ContentguardsServiceFeatureUpdate`: ServiceFeatureContentGuardResponse + fmt.Fprintf(os.Stdout, "Response from `ContentguardsFeatureAPI.ContentguardsServiceFeatureUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceFeatureContentGuardHref** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiContentguardsServiceFeatureUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceFeatureContentGuard** | [**ServiceFeatureContentGuard**](ServiceFeatureContentGuard.md) | | + +### Return type + +[**ServiceFeatureContentGuardResponse**](ServiceFeatureContentGuardResponse.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/PaginatedserviceFeatureContentGuardResponseList.md b/release/docs/PaginatedserviceFeatureContentGuardResponseList.md new file mode 100644 index 0000000..fdbb0ca --- /dev/null +++ b/release/docs/PaginatedserviceFeatureContentGuardResponseList.md @@ -0,0 +1,144 @@ +# PaginatedserviceFeatureContentGuardResponseList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **int32** | | +**Next** | Pointer to **NullableString** | | [optional] +**Previous** | Pointer to **NullableString** | | [optional] +**Results** | [**[]ServiceFeatureContentGuardResponse**](ServiceFeatureContentGuardResponse.md) | | + +## Methods + +### NewPaginatedserviceFeatureContentGuardResponseList + +`func NewPaginatedserviceFeatureContentGuardResponseList(count int32, results []ServiceFeatureContentGuardResponse, ) *PaginatedserviceFeatureContentGuardResponseList` + +NewPaginatedserviceFeatureContentGuardResponseList instantiates a new PaginatedserviceFeatureContentGuardResponseList 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 + +### NewPaginatedserviceFeatureContentGuardResponseListWithDefaults + +`func NewPaginatedserviceFeatureContentGuardResponseListWithDefaults() *PaginatedserviceFeatureContentGuardResponseList` + +NewPaginatedserviceFeatureContentGuardResponseListWithDefaults instantiates a new PaginatedserviceFeatureContentGuardResponseList 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 *PaginatedserviceFeatureContentGuardResponseList) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) SetCount(v int32)` + +SetCount sets Count field to given value. + + +### GetNext + +`func (o *PaginatedserviceFeatureContentGuardResponseList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedserviceFeatureContentGuardResponseList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedserviceFeatureContentGuardResponseList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedserviceFeatureContentGuardResponseList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedserviceFeatureContentGuardResponseList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedserviceFeatureContentGuardResponseList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedserviceFeatureContentGuardResponseList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedserviceFeatureContentGuardResponseList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedserviceFeatureContentGuardResponseList) GetResults() []ServiceFeatureContentGuardResponse` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedserviceFeatureContentGuardResponseList) GetResultsOk() (*[]ServiceFeatureContentGuardResponse, 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 *PaginatedserviceFeatureContentGuardResponseList) SetResults(v []ServiceFeatureContentGuardResponse)` + +SetResults sets Results field to given value. + + + +[[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/PatchedserviceFeatureContentGuard.md b/release/docs/PatchedserviceFeatureContentGuard.md new file mode 100644 index 0000000..699d56d --- /dev/null +++ b/release/docs/PatchedserviceFeatureContentGuard.md @@ -0,0 +1,180 @@ +# PatchedserviceFeatureContentGuard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The unique name. | [optional] +**Description** | Pointer to **NullableString** | An optional description. | [optional] +**HeaderName** | Pointer to **string** | | [optional] +**JqFilter** | Pointer to **NullableString** | | [optional] +**Features** | Pointer to **[]string** | The list of features required to access the content. | [optional] + +## Methods + +### NewPatchedserviceFeatureContentGuard + +`func NewPatchedserviceFeatureContentGuard() *PatchedserviceFeatureContentGuard` + +NewPatchedserviceFeatureContentGuard instantiates a new PatchedserviceFeatureContentGuard 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 + +### NewPatchedserviceFeatureContentGuardWithDefaults + +`func NewPatchedserviceFeatureContentGuardWithDefaults() *PatchedserviceFeatureContentGuard` + +NewPatchedserviceFeatureContentGuardWithDefaults instantiates a new PatchedserviceFeatureContentGuard 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 *PatchedserviceFeatureContentGuard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedserviceFeatureContentGuard) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedserviceFeatureContentGuard) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedserviceFeatureContentGuard) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *PatchedserviceFeatureContentGuard) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *PatchedserviceFeatureContentGuard) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetHeaderName + +`func (o *PatchedserviceFeatureContentGuard) GetHeaderName() string` + +GetHeaderName returns the HeaderName field if non-nil, zero value otherwise. + +### GetHeaderNameOk + +`func (o *PatchedserviceFeatureContentGuard) GetHeaderNameOk() (*string, bool)` + +GetHeaderNameOk returns a tuple with the HeaderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaderName + +`func (o *PatchedserviceFeatureContentGuard) SetHeaderName(v string)` + +SetHeaderName sets HeaderName field to given value. + +### HasHeaderName + +`func (o *PatchedserviceFeatureContentGuard) HasHeaderName() bool` + +HasHeaderName returns a boolean if a field has been set. + +### GetJqFilter + +`func (o *PatchedserviceFeatureContentGuard) GetJqFilter() string` + +GetJqFilter returns the JqFilter field if non-nil, zero value otherwise. + +### GetJqFilterOk + +`func (o *PatchedserviceFeatureContentGuard) GetJqFilterOk() (*string, bool)` + +GetJqFilterOk returns a tuple with the JqFilter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJqFilter + +`func (o *PatchedserviceFeatureContentGuard) SetJqFilter(v string)` + +SetJqFilter sets JqFilter field to given value. + +### HasJqFilter + +`func (o *PatchedserviceFeatureContentGuard) HasJqFilter() bool` + +HasJqFilter returns a boolean if a field has been set. + +### SetJqFilterNil + +`func (o *PatchedserviceFeatureContentGuard) SetJqFilterNil(b bool)` + + SetJqFilterNil sets the value for JqFilter to be an explicit nil + +### UnsetJqFilter +`func (o *PatchedserviceFeatureContentGuard) UnsetJqFilter()` + +UnsetJqFilter ensures that no value is present for JqFilter, not even an explicit nil +### GetFeatures + +`func (o *PatchedserviceFeatureContentGuard) GetFeatures() []string` + +GetFeatures returns the Features field if non-nil, zero value otherwise. + +### GetFeaturesOk + +`func (o *PatchedserviceFeatureContentGuard) GetFeaturesOk() (*[]string, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *PatchedserviceFeatureContentGuard) SetFeatures(v []string)` + +SetFeatures sets Features field to given value. + +### HasFeatures + +`func (o *PatchedserviceFeatureContentGuard) HasFeatures() bool` + +HasFeatures 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/ServiceFeatureContentGuard.md b/release/docs/ServiceFeatureContentGuard.md new file mode 100644 index 0000000..4472c4d --- /dev/null +++ b/release/docs/ServiceFeatureContentGuard.md @@ -0,0 +1,165 @@ +# ServiceFeatureContentGuard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The unique name. | +**Description** | Pointer to **NullableString** | An optional description. | [optional] +**HeaderName** | **string** | | +**JqFilter** | Pointer to **NullableString** | | [optional] +**Features** | **[]string** | The list of features required to access the content. | + +## Methods + +### NewServiceFeatureContentGuard + +`func NewServiceFeatureContentGuard(name string, headerName string, features []string, ) *ServiceFeatureContentGuard` + +NewServiceFeatureContentGuard instantiates a new ServiceFeatureContentGuard 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 + +### NewServiceFeatureContentGuardWithDefaults + +`func NewServiceFeatureContentGuardWithDefaults() *ServiceFeatureContentGuard` + +NewServiceFeatureContentGuardWithDefaults instantiates a new ServiceFeatureContentGuard 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 *ServiceFeatureContentGuard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ServiceFeatureContentGuard) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceFeatureContentGuard) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *ServiceFeatureContentGuard) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *ServiceFeatureContentGuard) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetHeaderName + +`func (o *ServiceFeatureContentGuard) GetHeaderName() string` + +GetHeaderName returns the HeaderName field if non-nil, zero value otherwise. + +### GetHeaderNameOk + +`func (o *ServiceFeatureContentGuard) GetHeaderNameOk() (*string, bool)` + +GetHeaderNameOk returns a tuple with the HeaderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaderName + +`func (o *ServiceFeatureContentGuard) SetHeaderName(v string)` + +SetHeaderName sets HeaderName field to given value. + + +### GetJqFilter + +`func (o *ServiceFeatureContentGuard) GetJqFilter() string` + +GetJqFilter returns the JqFilter field if non-nil, zero value otherwise. + +### GetJqFilterOk + +`func (o *ServiceFeatureContentGuard) GetJqFilterOk() (*string, bool)` + +GetJqFilterOk returns a tuple with the JqFilter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJqFilter + +`func (o *ServiceFeatureContentGuard) SetJqFilter(v string)` + +SetJqFilter sets JqFilter field to given value. + +### HasJqFilter + +`func (o *ServiceFeatureContentGuard) HasJqFilter() bool` + +HasJqFilter returns a boolean if a field has been set. + +### SetJqFilterNil + +`func (o *ServiceFeatureContentGuard) SetJqFilterNil(b bool)` + + SetJqFilterNil sets the value for JqFilter to be an explicit nil + +### UnsetJqFilter +`func (o *ServiceFeatureContentGuard) UnsetJqFilter()` + +UnsetJqFilter ensures that no value is present for JqFilter, not even an explicit nil +### GetFeatures + +`func (o *ServiceFeatureContentGuard) GetFeatures() []string` + +GetFeatures returns the Features field if non-nil, zero value otherwise. + +### GetFeaturesOk + +`func (o *ServiceFeatureContentGuard) GetFeaturesOk() (*[]string, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *ServiceFeatureContentGuard) SetFeatures(v []string)` + +SetFeatures sets Features field to given value. + + + +[[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/ServiceFeatureContentGuardResponse.md b/release/docs/ServiceFeatureContentGuardResponse.md new file mode 100644 index 0000000..43ae7f7 --- /dev/null +++ b/release/docs/ServiceFeatureContentGuardResponse.md @@ -0,0 +1,269 @@ +# ServiceFeatureContentGuardResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PulpHref** | Pointer to **string** | | [optional] [readonly] +**Prn** | Pointer to **string** | The Pulp Resource Name (PRN). | [optional] [readonly] +**PulpCreated** | Pointer to **time.Time** | Timestamp of creation. | [optional] [readonly] +**PulpLastUpdated** | Pointer to **time.Time** | Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. | [optional] [readonly] +**Name** | **string** | The unique name. | +**Description** | Pointer to **NullableString** | An optional description. | [optional] +**HeaderName** | **string** | | +**JqFilter** | Pointer to **NullableString** | | [optional] +**Features** | **[]string** | The list of features required to access the content. | + +## Methods + +### NewServiceFeatureContentGuardResponse + +`func NewServiceFeatureContentGuardResponse(name string, headerName string, features []string, ) *ServiceFeatureContentGuardResponse` + +NewServiceFeatureContentGuardResponse instantiates a new ServiceFeatureContentGuardResponse 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 + +### NewServiceFeatureContentGuardResponseWithDefaults + +`func NewServiceFeatureContentGuardResponseWithDefaults() *ServiceFeatureContentGuardResponse` + +NewServiceFeatureContentGuardResponseWithDefaults instantiates a new ServiceFeatureContentGuardResponse 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 *ServiceFeatureContentGuardResponse) GetPulpHref() string` + +GetPulpHref returns the PulpHref field if non-nil, zero value otherwise. + +### GetPulpHrefOk + +`func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetPulpHref(v string)` + +SetPulpHref sets PulpHref field to given value. + +### HasPulpHref + +`func (o *ServiceFeatureContentGuardResponse) HasPulpHref() bool` + +HasPulpHref returns a boolean if a field has been set. + +### GetPrn + +`func (o *ServiceFeatureContentGuardResponse) GetPrn() string` + +GetPrn returns the Prn field if non-nil, zero value otherwise. + +### GetPrnOk + +`func (o *ServiceFeatureContentGuardResponse) GetPrnOk() (*string, bool)` + +GetPrnOk returns a tuple with the Prn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrn + +`func (o *ServiceFeatureContentGuardResponse) SetPrn(v string)` + +SetPrn sets Prn field to given value. + +### HasPrn + +`func (o *ServiceFeatureContentGuardResponse) HasPrn() bool` + +HasPrn returns a boolean if a field has been set. + +### GetPulpCreated + +`func (o *ServiceFeatureContentGuardResponse) GetPulpCreated() time.Time` + +GetPulpCreated returns the PulpCreated field if non-nil, zero value otherwise. + +### GetPulpCreatedOk + +`func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetPulpCreated(v time.Time)` + +SetPulpCreated sets PulpCreated field to given value. + +### HasPulpCreated + +`func (o *ServiceFeatureContentGuardResponse) HasPulpCreated() bool` + +HasPulpCreated returns a boolean if a field has been set. + +### GetPulpLastUpdated + +`func (o *ServiceFeatureContentGuardResponse) GetPulpLastUpdated() time.Time` + +GetPulpLastUpdated returns the PulpLastUpdated field if non-nil, zero value otherwise. + +### GetPulpLastUpdatedOk + +`func (o *ServiceFeatureContentGuardResponse) GetPulpLastUpdatedOk() (*time.Time, bool)` + +GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPulpLastUpdated + +`func (o *ServiceFeatureContentGuardResponse) SetPulpLastUpdated(v time.Time)` + +SetPulpLastUpdated sets PulpLastUpdated field to given value. + +### HasPulpLastUpdated + +`func (o *ServiceFeatureContentGuardResponse) HasPulpLastUpdated() bool` + +HasPulpLastUpdated returns a boolean if a field has been set. + +### GetName + +`func (o *ServiceFeatureContentGuardResponse) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ServiceFeatureContentGuardResponse) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceFeatureContentGuardResponse) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *ServiceFeatureContentGuardResponse) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *ServiceFeatureContentGuardResponse) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetHeaderName + +`func (o *ServiceFeatureContentGuardResponse) GetHeaderName() string` + +GetHeaderName returns the HeaderName field if non-nil, zero value otherwise. + +### GetHeaderNameOk + +`func (o *ServiceFeatureContentGuardResponse) GetHeaderNameOk() (*string, bool)` + +GetHeaderNameOk returns a tuple with the HeaderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaderName + +`func (o *ServiceFeatureContentGuardResponse) SetHeaderName(v string)` + +SetHeaderName sets HeaderName field to given value. + + +### GetJqFilter + +`func (o *ServiceFeatureContentGuardResponse) GetJqFilter() string` + +GetJqFilter returns the JqFilter field if non-nil, zero value otherwise. + +### GetJqFilterOk + +`func (o *ServiceFeatureContentGuardResponse) GetJqFilterOk() (*string, bool)` + +GetJqFilterOk returns a tuple with the JqFilter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJqFilter + +`func (o *ServiceFeatureContentGuardResponse) SetJqFilter(v string)` + +SetJqFilter sets JqFilter field to given value. + +### HasJqFilter + +`func (o *ServiceFeatureContentGuardResponse) HasJqFilter() bool` + +HasJqFilter returns a boolean if a field has been set. + +### SetJqFilterNil + +`func (o *ServiceFeatureContentGuardResponse) SetJqFilterNil(b bool)` + + SetJqFilterNil sets the value for JqFilter to be an explicit nil + +### UnsetJqFilter +`func (o *ServiceFeatureContentGuardResponse) UnsetJqFilter()` + +UnsetJqFilter ensures that no value is present for JqFilter, not even an explicit nil +### GetFeatures + +`func (o *ServiceFeatureContentGuardResponse) GetFeatures() []string` + +GetFeatures returns the Features field if non-nil, zero value otherwise. + +### GetFeaturesOk + +`func (o *ServiceFeatureContentGuardResponse) GetFeaturesOk() (*[]string, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *ServiceFeatureContentGuardResponse) SetFeatures(v []string)` + +SetFeatures sets Features field to given value. + + + +[[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 e7763d1..31c5844 100644 --- a/release/model_artifact_distribution_response.go +++ b/release/model_artifact_distribution_response.go @@ -22,26 +22,26 @@ var _ MappedNullable = &ArtifactDistributionResponse{} // ArtifactDistributionResponse A serializer for ArtifactDistribution. type ArtifactDistributionResponse struct { - // The URL for accessing the publication as defined by this distribution. - BaseUrl *string `json:"base_url,omitempty"` + // Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` // Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes. NoContentChangeSince *string `json:"no_content_change_since,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"` // An optional content-guard. ContentGuard NullableString `json:"content_guard,omitempty"` - // Timestamp of creation. - PulpCreated *time.Time `json:"pulp_created,omitempty"` - PulpLabels *map[string]string `json:"pulp_labels,omitempty"` - // The Pulp Resource Name (PRN). - Prn *string `json:"prn,omitempty"` + // 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"` - // 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"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` PulpHref *string `json:"pulp_href,omitempty"` - // A unique name. Ex, `rawhide` and `stable`. - Name string `json:"name"` - // Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. - PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // The Pulp Resource Name (PRN). + Prn *string `json:"prn,omitempty"` AdditionalProperties map[string]interface{} } @@ -53,10 +53,10 @@ type _ArtifactDistributionResponse ArtifactDistributionResponse // will change when the set of required properties is changed func NewArtifactDistributionResponse(basePath string, name string) *ArtifactDistributionResponse { this := ArtifactDistributionResponse{} - var hidden bool = false - this.Hidden = &hidden this.BasePath = basePath this.Name = name + var hidden bool = false + this.Hidden = &hidden return &this } @@ -70,36 +70,100 @@ func NewArtifactDistributionResponseWithDefaults() *ArtifactDistributionResponse return &this } -// 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 +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time return ret } - return *o.BaseUrl + return *o.PulpLastUpdated } -// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated 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) { +func (o *ArtifactDistributionResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { return nil, false } - return o.BaseUrl, true + return o.PulpLastUpdated, true } -// HasBaseUrl returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasBaseUrl() bool { - if o != nil && !IsNil(o.BaseUrl) { +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { 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 +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *ArtifactDistributionResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &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 +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v } // GetNoContentChangeSince returns the NoContentChangeSince field value if set, zero value otherwise. @@ -134,6 +198,30 @@ func (o *ArtifactDistributionResponse) SetNoContentChangeSince(v string) { o.NoContentChangeSince = &v } +// GetBasePath returns the BasePath field value +func (o *ArtifactDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *ArtifactDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + // GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ArtifactDistributionResponse) GetContentGuard() string { if o == nil || IsNil(o.ContentGuard.Get()) { @@ -176,100 +264,28 @@ func (o *ArtifactDistributionResponse) UnsetContentGuard() { o.ContentGuard.Unset() } -// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) 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 *ArtifactDistributionResponse) SetPulpCreated(v time.Time) { - o.PulpCreated = &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 -} - -// GetPrn returns the Prn field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) GetPrn() string { - if o == nil || IsNil(o.Prn) { +// GetName returns the Name field value +func (o *ArtifactDistributionResponse) GetName() string { + if o == nil { var ret string return ret } - return *o.Prn + + return o.Name } -// GetPrnOk returns a tuple with the Prn 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) GetPrnOk() (*string, bool) { - if o == nil || IsNil(o.Prn) { +func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { return nil, false } - return o.Prn, true -} - -// HasPrn returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasPrn() bool { - if o != nil && !IsNil(o.Prn) { - return true - } - - return false + return &o.Name, true } -// SetPrn gets a reference to the given string and assigns it to the Prn field. -func (o *ArtifactDistributionResponse) SetPrn(v string) { - o.Prn = &v +// SetName sets field value +func (o *ArtifactDistributionResponse) SetName(v string) { + o.Name = v } // GetHidden returns the Hidden field value if set, zero value otherwise. @@ -304,28 +320,36 @@ func (o *ArtifactDistributionResponse) SetHidden(v bool) { o.Hidden = &v } -// GetBasePath returns the BasePath field value -func (o *ArtifactDistributionResponse) GetBasePath() string { - if o == nil { +// 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.BasePath + return *o.BaseUrl } -// GetBasePathOk returns a tuple with the BasePath field value +// 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) GetBasePathOk() (*string, bool) { - if o == nil { +func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { return nil, false } - return &o.BasePath, true + return o.BaseUrl, true } -// SetBasePath sets field value -func (o *ArtifactDistributionResponse) SetBasePath(v string) { - o.BasePath = v +// 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 } // GetPulpHref returns the PulpHref field value if set, zero value otherwise. @@ -360,60 +384,36 @@ func (o *ArtifactDistributionResponse) SetPulpHref(v string) { o.PulpHref = &v } -// GetName returns the Name field value -func (o *ArtifactDistributionResponse) GetName() string { - if o == nil { +// GetPrn returns the Prn field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPrn() string { + if o == nil || IsNil(o.Prn) { 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 -} - -// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. -func (o *ArtifactDistributionResponse) GetPulpLastUpdated() time.Time { - if o == nil || IsNil(o.PulpLastUpdated) { - var ret time.Time - return ret - } - return *o.PulpLastUpdated + return *o.Prn } -// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// GetPrnOk returns a tuple with the Prn field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArtifactDistributionResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { - if o == nil || IsNil(o.PulpLastUpdated) { +func (o *ArtifactDistributionResponse) GetPrnOk() (*string, bool) { + if o == nil || IsNil(o.Prn) { return nil, false } - return o.PulpLastUpdated, true + return o.Prn, true } -// HasPulpLastUpdated returns a boolean if a field has been set. -func (o *ArtifactDistributionResponse) HasPulpLastUpdated() bool { - if o != nil && !IsNil(o.PulpLastUpdated) { +// HasPrn returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPrn() bool { + if o != nil && !IsNil(o.Prn) { return true } return false } -// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. -func (o *ArtifactDistributionResponse) SetPulpLastUpdated(v time.Time) { - o.PulpLastUpdated = &v +// SetPrn gets a reference to the given string and assigns it to the Prn field. +func (o *ArtifactDistributionResponse) SetPrn(v string) { + o.Prn = &v } func (o ArtifactDistributionResponse) MarshalJSON() ([]byte, error) { @@ -426,34 +426,34 @@ func (o ArtifactDistributionResponse) MarshalJSON() ([]byte, error) { func (o ArtifactDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.BaseUrl) { - toSerialize["base_url"] = o.BaseUrl - } - if !IsNil(o.NoContentChangeSince) { - toSerialize["no_content_change_since"] = o.NoContentChangeSince + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated } - if o.ContentGuard.IsSet() { - toSerialize["content_guard"] = o.ContentGuard.Get() + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels } if !IsNil(o.PulpCreated) { toSerialize["pulp_created"] = o.PulpCreated } - if !IsNil(o.PulpLabels) { - toSerialize["pulp_labels"] = o.PulpLabels + if !IsNil(o.NoContentChangeSince) { + toSerialize["no_content_change_since"] = o.NoContentChangeSince } - if !IsNil(o.Prn) { - toSerialize["prn"] = o.Prn + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() } + toSerialize["name"] = o.Name if !IsNil(o.Hidden) { toSerialize["hidden"] = o.Hidden } - toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } if !IsNil(o.PulpHref) { toSerialize["pulp_href"] = o.PulpHref } - toSerialize["name"] = o.Name - if !IsNil(o.PulpLastUpdated) { - toSerialize["pulp_last_updated"] = o.PulpLastUpdated + if !IsNil(o.Prn) { + toSerialize["prn"] = o.Prn } for key, value := range o.AdditionalProperties { @@ -499,17 +499,17 @@ func (o *ArtifactDistributionResponse) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "base_url") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_created") delete(additionalProperties, "no_content_change_since") + delete(additionalProperties, "base_path") delete(additionalProperties, "content_guard") - delete(additionalProperties, "pulp_created") - delete(additionalProperties, "pulp_labels") - delete(additionalProperties, "prn") + delete(additionalProperties, "name") delete(additionalProperties, "hidden") - delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") delete(additionalProperties, "pulp_href") - delete(additionalProperties, "name") - delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "prn") o.AdditionalProperties = additionalProperties } diff --git a/release/model_paginatedservice_feature_content_guard_response_list.go b/release/model_paginatedservice_feature_content_guard_response_list.go new file mode 100644 index 0000000..d6a5ef2 --- /dev/null +++ b/release/model_paginatedservice_feature_content_guard_response_list.go @@ -0,0 +1,292 @@ +/* +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 PaginatedserviceFeatureContentGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedserviceFeatureContentGuardResponseList{} + +// PaginatedserviceFeatureContentGuardResponseList struct for PaginatedserviceFeatureContentGuardResponseList +type PaginatedserviceFeatureContentGuardResponseList struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ServiceFeatureContentGuardResponse `json:"results"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedserviceFeatureContentGuardResponseList PaginatedserviceFeatureContentGuardResponseList + +// NewPaginatedserviceFeatureContentGuardResponseList instantiates a new PaginatedserviceFeatureContentGuardResponseList 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 NewPaginatedserviceFeatureContentGuardResponseList(count int32, results []ServiceFeatureContentGuardResponse) *PaginatedserviceFeatureContentGuardResponseList { + this := PaginatedserviceFeatureContentGuardResponseList{} + this.Count = count + this.Results = results + return &this +} + +// NewPaginatedserviceFeatureContentGuardResponseListWithDefaults instantiates a new PaginatedserviceFeatureContentGuardResponseList 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 NewPaginatedserviceFeatureContentGuardResponseListWithDefaults() *PaginatedserviceFeatureContentGuardResponseList { + this := PaginatedserviceFeatureContentGuardResponseList{} + return &this +} + +// GetCount returns the Count field value +func (o *PaginatedserviceFeatureContentGuardResponseList) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *PaginatedserviceFeatureContentGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedserviceFeatureContentGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) 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 *PaginatedserviceFeatureContentGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedserviceFeatureContentGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedserviceFeatureContentGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *PaginatedserviceFeatureContentGuardResponseList) GetResults() []ServiceFeatureContentGuardResponse { + if o == nil { + var ret []ServiceFeatureContentGuardResponse + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *PaginatedserviceFeatureContentGuardResponseList) GetResultsOk() ([]ServiceFeatureContentGuardResponse, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *PaginatedserviceFeatureContentGuardResponseList) SetResults(v []ServiceFeatureContentGuardResponse) { + o.Results = v +} + +func (o PaginatedserviceFeatureContentGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedserviceFeatureContentGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedserviceFeatureContentGuardResponseList) UnmarshalJSON(data []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{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &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) + } + } + + varPaginatedserviceFeatureContentGuardResponseList := _PaginatedserviceFeatureContentGuardResponseList{} + + err = json.Unmarshal(data, &varPaginatedserviceFeatureContentGuardResponseList) + + if err != nil { + return err + } + + *o = PaginatedserviceFeatureContentGuardResponseList(varPaginatedserviceFeatureContentGuardResponseList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedserviceFeatureContentGuardResponseList struct { + value *PaginatedserviceFeatureContentGuardResponseList + isSet bool +} + +func (v NullablePaginatedserviceFeatureContentGuardResponseList) Get() *PaginatedserviceFeatureContentGuardResponseList { + return v.value +} + +func (v *NullablePaginatedserviceFeatureContentGuardResponseList) Set(val *PaginatedserviceFeatureContentGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedserviceFeatureContentGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedserviceFeatureContentGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedserviceFeatureContentGuardResponseList(val *PaginatedserviceFeatureContentGuardResponseList) *NullablePaginatedserviceFeatureContentGuardResponseList { + return &NullablePaginatedserviceFeatureContentGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedserviceFeatureContentGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedserviceFeatureContentGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/model_patchedservice_feature_content_guard.go b/release/model_patchedservice_feature_content_guard.go new file mode 100644 index 0000000..a0f7d72 --- /dev/null +++ b/release/model_patchedservice_feature_content_guard.go @@ -0,0 +1,327 @@ +/* +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 PatchedserviceFeatureContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedserviceFeatureContentGuard{} + +// PatchedserviceFeatureContentGuard A serializer for FeatureContentGuard. +type PatchedserviceFeatureContentGuard struct { + // The unique name. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + HeaderName *string `json:"header_name,omitempty"` + JqFilter NullableString `json:"jq_filter,omitempty"` + // The list of features required to access the content. + Features []string `json:"features,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedserviceFeatureContentGuard PatchedserviceFeatureContentGuard + +// NewPatchedserviceFeatureContentGuard instantiates a new PatchedserviceFeatureContentGuard 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 NewPatchedserviceFeatureContentGuard() *PatchedserviceFeatureContentGuard { + this := PatchedserviceFeatureContentGuard{} + return &this +} + +// NewPatchedserviceFeatureContentGuardWithDefaults instantiates a new PatchedserviceFeatureContentGuard 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 NewPatchedserviceFeatureContentGuardWithDefaults() *PatchedserviceFeatureContentGuard { + this := PatchedserviceFeatureContentGuard{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) 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 *PatchedserviceFeatureContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedserviceFeatureContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedserviceFeatureContentGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetHeaderName returns the HeaderName field value if set, zero value otherwise. +func (o *PatchedserviceFeatureContentGuard) GetHeaderName() string { + if o == nil || IsNil(o.HeaderName) { + var ret string + return ret + } + return *o.HeaderName +} + +// GetHeaderNameOk returns a tuple with the HeaderName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedserviceFeatureContentGuard) GetHeaderNameOk() (*string, bool) { + if o == nil || IsNil(o.HeaderName) { + return nil, false + } + return o.HeaderName, true +} + +// HasHeaderName returns a boolean if a field has been set. +func (o *PatchedserviceFeatureContentGuard) HasHeaderName() bool { + if o != nil && !IsNil(o.HeaderName) { + return true + } + + return false +} + +// SetHeaderName gets a reference to the given string and assigns it to the HeaderName field. +func (o *PatchedserviceFeatureContentGuard) SetHeaderName(v string) { + o.HeaderName = &v +} + +// GetJqFilter returns the JqFilter field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedserviceFeatureContentGuard) GetJqFilter() string { + if o == nil || IsNil(o.JqFilter.Get()) { + var ret string + return ret + } + return *o.JqFilter.Get() +} + +// GetJqFilterOk returns a tuple with the JqFilter 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 *PatchedserviceFeatureContentGuard) GetJqFilterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JqFilter.Get(), o.JqFilter.IsSet() +} + +// HasJqFilter returns a boolean if a field has been set. +func (o *PatchedserviceFeatureContentGuard) HasJqFilter() bool { + if o != nil && o.JqFilter.IsSet() { + return true + } + + return false +} + +// SetJqFilter gets a reference to the given NullableString and assigns it to the JqFilter field. +func (o *PatchedserviceFeatureContentGuard) SetJqFilter(v string) { + o.JqFilter.Set(&v) +} +// SetJqFilterNil sets the value for JqFilter to be an explicit nil +func (o *PatchedserviceFeatureContentGuard) SetJqFilterNil() { + o.JqFilter.Set(nil) +} + +// UnsetJqFilter ensures that no value is present for JqFilter, not even an explicit nil +func (o *PatchedserviceFeatureContentGuard) UnsetJqFilter() { + o.JqFilter.Unset() +} + +// GetFeatures returns the Features field value if set, zero value otherwise. +func (o *PatchedserviceFeatureContentGuard) GetFeatures() []string { + if o == nil || IsNil(o.Features) { + var ret []string + return ret + } + return o.Features +} + +// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedserviceFeatureContentGuard) GetFeaturesOk() ([]string, bool) { + if o == nil || IsNil(o.Features) { + return nil, false + } + return o.Features, true +} + +// HasFeatures returns a boolean if a field has been set. +func (o *PatchedserviceFeatureContentGuard) HasFeatures() bool { + if o != nil && !IsNil(o.Features) { + return true + } + + return false +} + +// SetFeatures gets a reference to the given []string and assigns it to the Features field. +func (o *PatchedserviceFeatureContentGuard) SetFeatures(v []string) { + o.Features = v +} + +func (o PatchedserviceFeatureContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedserviceFeatureContentGuard) 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.HeaderName) { + toSerialize["header_name"] = o.HeaderName + } + if o.JqFilter.IsSet() { + toSerialize["jq_filter"] = o.JqFilter.Get() + } + if !IsNil(o.Features) { + toSerialize["features"] = o.Features + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedserviceFeatureContentGuard) UnmarshalJSON(data []byte) (err error) { + varPatchedserviceFeatureContentGuard := _PatchedserviceFeatureContentGuard{} + + err = json.Unmarshal(data, &varPatchedserviceFeatureContentGuard) + + if err != nil { + return err + } + + *o = PatchedserviceFeatureContentGuard(varPatchedserviceFeatureContentGuard) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "header_name") + delete(additionalProperties, "jq_filter") + delete(additionalProperties, "features") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedserviceFeatureContentGuard struct { + value *PatchedserviceFeatureContentGuard + isSet bool +} + +func (v NullablePatchedserviceFeatureContentGuard) Get() *PatchedserviceFeatureContentGuard { + return v.value +} + +func (v *NullablePatchedserviceFeatureContentGuard) Set(val *PatchedserviceFeatureContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedserviceFeatureContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedserviceFeatureContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedserviceFeatureContentGuard(val *PatchedserviceFeatureContentGuard) *NullablePatchedserviceFeatureContentGuard { + return &NullablePatchedserviceFeatureContentGuard{value: val, isSet: true} +} + +func (v NullablePatchedserviceFeatureContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedserviceFeatureContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/model_service_feature_content_guard.go b/release/model_service_feature_content_guard.go new file mode 100644 index 0000000..11a4a3f --- /dev/null +++ b/release/model_service_feature_content_guard.go @@ -0,0 +1,324 @@ +/* +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 ServiceFeatureContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceFeatureContentGuard{} + +// ServiceFeatureContentGuard A serializer for FeatureContentGuard. +type ServiceFeatureContentGuard struct { + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + HeaderName string `json:"header_name"` + JqFilter NullableString `json:"jq_filter,omitempty"` + // The list of features required to access the content. + Features []string `json:"features"` + AdditionalProperties map[string]interface{} +} + +type _ServiceFeatureContentGuard ServiceFeatureContentGuard + +// NewServiceFeatureContentGuard instantiates a new ServiceFeatureContentGuard 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 NewServiceFeatureContentGuard(name string, headerName string, features []string) *ServiceFeatureContentGuard { + this := ServiceFeatureContentGuard{} + this.Name = name + this.HeaderName = headerName + this.Features = features + return &this +} + +// NewServiceFeatureContentGuardWithDefaults instantiates a new ServiceFeatureContentGuard 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 NewServiceFeatureContentGuardWithDefaults() *ServiceFeatureContentGuard { + this := ServiceFeatureContentGuard{} + return &this +} + +// GetName returns the Name field value +func (o *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) 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 *ServiceFeatureContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ServiceFeatureContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ServiceFeatureContentGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetHeaderName returns the HeaderName field value +func (o *ServiceFeatureContentGuard) GetHeaderName() string { + if o == nil { + var ret string + return ret + } + + return o.HeaderName +} + +// GetHeaderNameOk returns a tuple with the HeaderName field value +// and a boolean to check if the value has been set. +func (o *ServiceFeatureContentGuard) GetHeaderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HeaderName, true +} + +// SetHeaderName sets field value +func (o *ServiceFeatureContentGuard) SetHeaderName(v string) { + o.HeaderName = v +} + +// GetJqFilter returns the JqFilter field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ServiceFeatureContentGuard) GetJqFilter() string { + if o == nil || IsNil(o.JqFilter.Get()) { + var ret string + return ret + } + return *o.JqFilter.Get() +} + +// GetJqFilterOk returns a tuple with the JqFilter 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 *ServiceFeatureContentGuard) GetJqFilterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JqFilter.Get(), o.JqFilter.IsSet() +} + +// HasJqFilter returns a boolean if a field has been set. +func (o *ServiceFeatureContentGuard) HasJqFilter() bool { + if o != nil && o.JqFilter.IsSet() { + return true + } + + return false +} + +// SetJqFilter gets a reference to the given NullableString and assigns it to the JqFilter field. +func (o *ServiceFeatureContentGuard) SetJqFilter(v string) { + o.JqFilter.Set(&v) +} +// SetJqFilterNil sets the value for JqFilter to be an explicit nil +func (o *ServiceFeatureContentGuard) SetJqFilterNil() { + o.JqFilter.Set(nil) +} + +// UnsetJqFilter ensures that no value is present for JqFilter, not even an explicit nil +func (o *ServiceFeatureContentGuard) UnsetJqFilter() { + o.JqFilter.Unset() +} + +// GetFeatures returns the Features field value +func (o *ServiceFeatureContentGuard) GetFeatures() []string { + if o == nil { + var ret []string + return ret + } + + return o.Features +} + +// GetFeaturesOk returns a tuple with the Features field value +// and a boolean to check if the value has been set. +func (o *ServiceFeatureContentGuard) GetFeaturesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Features, true +} + +// SetFeatures sets field value +func (o *ServiceFeatureContentGuard) SetFeatures(v []string) { + o.Features = v +} + +func (o ServiceFeatureContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceFeatureContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["header_name"] = o.HeaderName + if o.JqFilter.IsSet() { + toSerialize["jq_filter"] = o.JqFilter.Get() + } + toSerialize["features"] = o.Features + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServiceFeatureContentGuard) UnmarshalJSON(data []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", + "header_name", + "features", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &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) + } + } + + varServiceFeatureContentGuard := _ServiceFeatureContentGuard{} + + err = json.Unmarshal(data, &varServiceFeatureContentGuard) + + if err != nil { + return err + } + + *o = ServiceFeatureContentGuard(varServiceFeatureContentGuard) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "header_name") + delete(additionalProperties, "jq_filter") + delete(additionalProperties, "features") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServiceFeatureContentGuard struct { + value *ServiceFeatureContentGuard + isSet bool +} + +func (v NullableServiceFeatureContentGuard) Get() *ServiceFeatureContentGuard { + return v.value +} + +func (v *NullableServiceFeatureContentGuard) Set(val *ServiceFeatureContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullableServiceFeatureContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceFeatureContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceFeatureContentGuard(val *ServiceFeatureContentGuard) *NullableServiceFeatureContentGuard { + return &NullableServiceFeatureContentGuard{value: val, isSet: true} +} + +func (v NullableServiceFeatureContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceFeatureContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/model_service_feature_content_guard_response.go b/release/model_service_feature_content_guard_response.go new file mode 100644 index 0000000..01baf23 --- /dev/null +++ b/release/model_service_feature_content_guard_response.go @@ -0,0 +1,476 @@ +/* +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 ServiceFeatureContentGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceFeatureContentGuardResponse{} + +// ServiceFeatureContentGuardResponse A serializer for FeatureContentGuard. +type ServiceFeatureContentGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // The Pulp Resource Name (PRN). + Prn *string `json:"prn,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + HeaderName string `json:"header_name"` + JqFilter NullableString `json:"jq_filter,omitempty"` + // The list of features required to access the content. + Features []string `json:"features"` + AdditionalProperties map[string]interface{} +} + +type _ServiceFeatureContentGuardResponse ServiceFeatureContentGuardResponse + +// NewServiceFeatureContentGuardResponse instantiates a new ServiceFeatureContentGuardResponse 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 NewServiceFeatureContentGuardResponse(name string, headerName string, features []string) *ServiceFeatureContentGuardResponse { + this := ServiceFeatureContentGuardResponse{} + this.Name = name + this.HeaderName = headerName + this.Features = features + return &this +} + +// NewServiceFeatureContentGuardResponseWithDefaults instantiates a new ServiceFeatureContentGuardResponse 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 NewServiceFeatureContentGuardResponseWithDefaults() *ServiceFeatureContentGuardResponse { + this := ServiceFeatureContentGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPrn returns the Prn field value if set, zero value otherwise. +func (o *ServiceFeatureContentGuardResponse) GetPrn() string { + if o == nil || IsNil(o.Prn) { + var ret string + return ret + } + return *o.Prn +} + +// GetPrnOk returns a tuple with the Prn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceFeatureContentGuardResponse) GetPrnOk() (*string, bool) { + if o == nil || IsNil(o.Prn) { + return nil, false + } + return o.Prn, true +} + +// HasPrn returns a boolean if a field has been set. +func (o *ServiceFeatureContentGuardResponse) HasPrn() bool { + if o != nil && !IsNil(o.Prn) { + return true + } + + return false +} + +// SetPrn gets a reference to the given string and assigns it to the Prn field. +func (o *ServiceFeatureContentGuardResponse) SetPrn(v string) { + o.Prn = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *ServiceFeatureContentGuardResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceFeatureContentGuardResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *ServiceFeatureContentGuardResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *ServiceFeatureContentGuardResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetName returns the Name field value +func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) 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 *ServiceFeatureContentGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ServiceFeatureContentGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ServiceFeatureContentGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetHeaderName returns the HeaderName field value +func (o *ServiceFeatureContentGuardResponse) GetHeaderName() string { + if o == nil { + var ret string + return ret + } + + return o.HeaderName +} + +// GetHeaderNameOk returns a tuple with the HeaderName field value +// and a boolean to check if the value has been set. +func (o *ServiceFeatureContentGuardResponse) GetHeaderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HeaderName, true +} + +// SetHeaderName sets field value +func (o *ServiceFeatureContentGuardResponse) SetHeaderName(v string) { + o.HeaderName = v +} + +// GetJqFilter returns the JqFilter field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ServiceFeatureContentGuardResponse) GetJqFilter() string { + if o == nil || IsNil(o.JqFilter.Get()) { + var ret string + return ret + } + return *o.JqFilter.Get() +} + +// GetJqFilterOk returns a tuple with the JqFilter 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 *ServiceFeatureContentGuardResponse) GetJqFilterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JqFilter.Get(), o.JqFilter.IsSet() +} + +// HasJqFilter returns a boolean if a field has been set. +func (o *ServiceFeatureContentGuardResponse) HasJqFilter() bool { + if o != nil && o.JqFilter.IsSet() { + return true + } + + return false +} + +// SetJqFilter gets a reference to the given NullableString and assigns it to the JqFilter field. +func (o *ServiceFeatureContentGuardResponse) SetJqFilter(v string) { + o.JqFilter.Set(&v) +} +// SetJqFilterNil sets the value for JqFilter to be an explicit nil +func (o *ServiceFeatureContentGuardResponse) SetJqFilterNil() { + o.JqFilter.Set(nil) +} + +// UnsetJqFilter ensures that no value is present for JqFilter, not even an explicit nil +func (o *ServiceFeatureContentGuardResponse) UnsetJqFilter() { + o.JqFilter.Unset() +} + +// GetFeatures returns the Features field value +func (o *ServiceFeatureContentGuardResponse) GetFeatures() []string { + if o == nil { + var ret []string + return ret + } + + return o.Features +} + +// GetFeaturesOk returns a tuple with the Features field value +// and a boolean to check if the value has been set. +func (o *ServiceFeatureContentGuardResponse) GetFeaturesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Features, true +} + +// SetFeatures sets field value +func (o *ServiceFeatureContentGuardResponse) SetFeatures(v []string) { + o.Features = v +} + +func (o ServiceFeatureContentGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceFeatureContentGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.Prn) { + toSerialize["prn"] = o.Prn + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["header_name"] = o.HeaderName + if o.JqFilter.IsSet() { + toSerialize["jq_filter"] = o.JqFilter.Get() + } + toSerialize["features"] = o.Features + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServiceFeatureContentGuardResponse) UnmarshalJSON(data []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", + "header_name", + "features", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &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) + } + } + + varServiceFeatureContentGuardResponse := _ServiceFeatureContentGuardResponse{} + + err = json.Unmarshal(data, &varServiceFeatureContentGuardResponse) + + if err != nil { + return err + } + + *o = ServiceFeatureContentGuardResponse(varServiceFeatureContentGuardResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "prn") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "header_name") + delete(additionalProperties, "jq_filter") + delete(additionalProperties, "features") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServiceFeatureContentGuardResponse struct { + value *ServiceFeatureContentGuardResponse + isSet bool +} + +func (v NullableServiceFeatureContentGuardResponse) Get() *ServiceFeatureContentGuardResponse { + return v.value +} + +func (v *NullableServiceFeatureContentGuardResponse) Set(val *ServiceFeatureContentGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableServiceFeatureContentGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceFeatureContentGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceFeatureContentGuardResponse(val *ServiceFeatureContentGuardResponse) *NullableServiceFeatureContentGuardResponse { + return &NullableServiceFeatureContentGuardResponse{value: val, isSet: true} +} + +func (v NullableServiceFeatureContentGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceFeatureContentGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/release/test/api_api_debug_auth_header_test.go b/release/test/api_api_debug_auth_header_test.go new file mode 100644 index 0000000..94f455c --- /dev/null +++ b/release/test/api_api_debug_auth_header_test.go @@ -0,0 +1,36 @@ +/* +Pulp 3 API + +Testing ApiDebugAuthHeaderAPIService + +*/ + +// 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/v2024" +) + +func Test_zest_ApiDebugAuthHeaderAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApiDebugAuthHeaderAPIService ApiPulpDebugAuthHeaderGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.ApiDebugAuthHeaderAPI.ApiPulpDebugAuthHeaderGet(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/release/test/api_contentguards_feature_test.go b/release/test/api_contentguards_feature_test.go new file mode 100644 index 0000000..bb623b7 --- /dev/null +++ b/release/test/api_contentguards_feature_test.go @@ -0,0 +1,164 @@ +/* +Pulp 3 API + +Testing ContentguardsFeatureAPIService + +*/ + +// 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/v2024" +) + +func Test_zest_ContentguardsFeatureAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureAddRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureAddRole(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureCreate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var pulpDomain string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureCreate(context.Background(), pulpDomain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureDelete(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var pulpDomain string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureList(context.Background(), pulpDomain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureListRoles", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureListRoles(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureMyPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureMyPermissions(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeaturePartialUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeaturePartialUpdate(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureRead", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureRead(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureRemoveRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureRemoveRole(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ContentguardsFeatureAPIService ContentguardsServiceFeatureUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceFeatureContentGuardHref string + + resp, httpRes, err := apiClient.ContentguardsFeatureAPI.ContentguardsServiceFeatureUpdate(context.Background(), serviceFeatureContentGuardHref).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +}