diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0a025ac44f..b34b74bbb6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -25,6 +25,10 @@ updates: directory: "/python-sdk" schedule: interval: daily + - package-ecosystem: nuget + directory: "/go-sdk" + schedule: + interval: daily - package-ecosystem: maven directory: "/" diff --git a/.github/workflows/operator.yaml b/.github/workflows/operator.yaml index 6fce849994..405f516f9a 100644 --- a/.github/workflows/operator.yaml +++ b/.github/workflows/operator.yaml @@ -28,6 +28,11 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 + + - name: Enable port-forwarding + run: | + sudo apt-get -y install socat + - name: Setup Minikube-Kubernetes uses: manusa/actions-setup-minikube@v2.9.0 with: @@ -35,6 +40,15 @@ jobs: kubernetes version: v1.25.0 github token: ${{ secrets.GITHUB_TOKEN }} start args: '--force' + + - name: Enable minikube ingress + run: | + minikube addons enable ingress + + - name: Setup minikube tunnel + run: | + minikube tunnel & + - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -49,7 +63,6 @@ jobs: mkdir -p /tmp/coreutils-workaround ( cd /tmp/coreutils-workaround && mvn dependency:get -DremoteRepositories=https://repo1.maven.org/maven2 -Dartifact=com.github.java-json-tools:jackson-coreutils:2.0 ) - - name: Run the tests in local mode run: ./mvnw clean verify -P '!external_repos' -DskipOperatorTests=false -pl operator/controller -am diff --git a/.github/workflows/qodana.yaml b/.github/workflows/qodana.yaml index 2459a818c9..e22b9a2720 100644 --- a/.github/workflows/qodana.yaml +++ b/.github/workflows/qodana.yaml @@ -24,9 +24,7 @@ jobs: name: Qodana runs-on: ubuntu-latest if: > - github.repository_owner == 'Apicurio' && - !contains(github.event.*.labels.*.name, 'DO NOT MERGE') && - github.event.pull_request.user.login != 'dependabot[bot]' + github.repository_owner == 'Apicurio' && contains(github.event.*.labels.*.name, 'QODANA') permissions: checks: write contents: write diff --git a/.github/workflows/release-images.yaml b/.github/workflows/release-images.yaml index c62bc2c104..286896e040 100644 --- a/.github/workflows/release-images.yaml +++ b/.github/workflows/release-images.yaml @@ -154,17 +154,19 @@ jobs: SKIP_TESTS: "true" run: | cd registry - ./mvnw package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -DskipTests=true + ./mvnw package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -DskipTests=true - name: Build and Push Native image for testing run: | - docker build --push -f ./distro/docker/target/docker/Dockerfile.native app/ \ + cd registry + docker build --push -f ./distro/docker/target/docker/Dockerfile.native \ -t docker.io/apicurio/apicurio-registry-native:latest \ -t docker.io/apicurio/apicurio-registry-native:latest-release \ -t docker.io/apicurio/apicurio-registry-native:$RELEASE_VERSION \ -t quay.io/apicurio/apicurio-registry-native:latest \ -t quay.io/apicurio/apicurio-registry-native:latest-release \ - -t quay.io/apicurio/apicurio-registry-native:$RELEASE_VERSION + -t quay.io/apicurio/apicurio-registry-native:$RELEASE_VERSION \ + app/ - name: Google Chat Notification if: ${{ failure() }} diff --git a/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/AbstractResource.java b/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/AbstractResource.java index 655c5debbd..25254bd8eb 100644 --- a/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/AbstractResource.java +++ b/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/AbstractResource.java @@ -25,6 +25,7 @@ import io.apicurio.registry.storage.error.ArtifactNotFoundException; import io.apicurio.registry.storage.error.RuleNotFoundException; import io.apicurio.registry.storage.error.VersionNotFoundException; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ArtifactType; import io.apicurio.registry.types.ContentTypes; import io.apicurio.registry.types.Current; @@ -104,7 +105,8 @@ protected ArtifactVersionMetaDataDto createOrUpdateArtifact(String artifactId, S .map(dto -> ArtifactReference.builder().name(dto.getName()).groupId(dto.getGroupId()) .artifactId(dto.getArtifactId()).version(dto.getVersion()).build()) .collect(Collectors.toList()); - final Map resolvedReferences = storage.resolveReferences(parsedReferences); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(parsedReferences, storage::getContentByReference); try { ContentHandle schemaContent; schemaContent = ContentHandle.create(schema); @@ -175,8 +177,9 @@ protected ArtifactVersionMetaDataDto lookupSchema(String groupId, String artifac .getArtifactVersionContent(groupId, artifactId, version); TypedContent typedArtifactVersion = TypedContent .create(artifactVersion.getContent(), artifactVersion.getContentType()); - Map artifactVersionReferences = storage - .resolveReferences(artifactVersion.getReferences()); + Map artifactVersionReferences = RegistryContentUtils + .recursivelyResolveReferences(artifactVersion.getReferences(), + storage::getContentByReference); String dereferencedExistingContentSha = DigestUtils .sha256Hex(artifactTypeProvider.getContentDereferencer() .dereference(typedArtifactVersion, artifactVersionReferences) @@ -215,7 +218,8 @@ protected Map resolveReferences(List refe return artifactReferenceDto; }).collect(Collectors.toList()); - resolvedReferences = storage.resolveReferences(referencesAsDtos); + resolvedReferences = RegistryContentUtils.recursivelyResolveReferences(referencesAsDtos, + storage::getContentByReference); if (references.size() > resolvedReferences.size()) { // There are unresolvable references, which is not allowed. diff --git a/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/SchemasResourceImpl.java b/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/SchemasResourceImpl.java index 0fac97e67b..b3c39b5216 100644 --- a/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/SchemasResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/ccompat/rest/v7/impl/SchemasResourceImpl.java @@ -15,6 +15,7 @@ import io.apicurio.registry.storage.dto.ArtifactVersionMetaDataDto; import io.apicurio.registry.storage.dto.ContentWrapperDto; import io.apicurio.registry.storage.dto.StoredArtifactVersionDto; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ArtifactType; import io.apicurio.registry.types.VersionState; import io.apicurio.registry.util.ArtifactTypeUtil; @@ -47,8 +48,10 @@ public SchemaInfo getSchema(int id, String subject, String groupId) { references = contentWrapper.getReferences(); } TypedContent typedContent = TypedContent.create(contentHandle, contentType); - return converter.convert(contentHandle, ArtifactTypeUtil.determineArtifactType(typedContent, null, - storage.resolveReferences(references), factory), references); + return converter.convert(contentHandle, + ArtifactTypeUtil.determineArtifactType(typedContent, null, RegistryContentUtils + .recursivelyResolveReferences(references, storage::getContentByReference), factory), + references); } @Override diff --git a/app/src/main/java/io/apicurio/registry/rest/AuthenticationFailedExceptionMapper.java b/app/src/main/java/io/apicurio/registry/rest/AuthenticationFailedExceptionMapper.java index 1effb9f912..299ceab38a 100644 --- a/app/src/main/java/io/apicurio/registry/rest/AuthenticationFailedExceptionMapper.java +++ b/app/src/main/java/io/apicurio/registry/rest/AuthenticationFailedExceptionMapper.java @@ -1,12 +1,23 @@ package io.apicurio.registry.rest; -import io.quarkus.security.AuthenticationFailedException; +import io.quarkus.security.UnauthorizedException; +import jakarta.annotation.Priority; +import jakarta.inject.Inject; +import jakarta.ws.rs.Priorities; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ExceptionMapper; +import jakarta.ws.rs.ext.Provider; + +@Provider +@Priority(Priorities.AUTHENTICATION) +public class AuthenticationFailedExceptionMapper implements ExceptionMapper { + + @Inject + RegistryExceptionMapper exceptionMapperService; -public class AuthenticationFailedExceptionMapper implements ExceptionMapper { @Override - public Response toResponse(AuthenticationFailedException exception) { - return Response.status(401).build(); + public Response toResponse(UnauthorizedException exception) { + Response errorHttpResponse = exceptionMapperService.toResponse(exception); + return Response.status(401).entity(errorHttpResponse).build(); } } diff --git a/app/src/main/java/io/apicurio/registry/rest/RegistryExceptionMapper.java b/app/src/main/java/io/apicurio/registry/rest/RegistryExceptionMapper.java index fe0b1a44af..6ed1806868 100644 --- a/app/src/main/java/io/apicurio/registry/rest/RegistryExceptionMapper.java +++ b/app/src/main/java/io/apicurio/registry/rest/RegistryExceptionMapper.java @@ -10,7 +10,6 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ExceptionMapper; import jakarta.ws.rs.ext.Provider; -import org.slf4j.Logger; /** * TODO use v1 beans when appropriate (when handling REST API v1 calls) @@ -19,9 +18,6 @@ @Provider public class RegistryExceptionMapper implements ExceptionMapper { - @Inject - Logger log; - @Inject CoreRegistryExceptionMapperService coreMapper; diff --git a/app/src/main/java/io/apicurio/registry/rest/v2/AbstractResourceImpl.java b/app/src/main/java/io/apicurio/registry/rest/v2/AbstractResourceImpl.java index fd405a9fb6..32ac42acca 100644 --- a/app/src/main/java/io/apicurio/registry/rest/v2/AbstractResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/rest/v2/AbstractResourceImpl.java @@ -1,143 +1,10 @@ package io.apicurio.registry.rest.v2; -import io.apicurio.common.apps.config.Info; -import io.apicurio.registry.content.TypedContent; -import io.apicurio.registry.content.dereference.ContentDereferencer; -import io.apicurio.registry.content.refs.JsonPointerExternalReference; -import io.apicurio.registry.storage.RegistryStorage; -import io.apicurio.registry.storage.dto.ArtifactReferenceDto; -import io.apicurio.registry.types.Current; -import io.apicurio.registry.types.provider.ArtifactTypeUtilProvider; -import io.apicurio.registry.types.provider.ArtifactTypeUtilProviderFactory; -import io.apicurio.registry.utils.StringUtil; -import jakarta.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import jakarta.ws.rs.core.Context; -import org.eclipse.microprofile.config.inject.ConfigProperty; -import org.slf4j.Logger; - -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.List; -import java.util.Map; public abstract class AbstractResourceImpl { - @Inject - Logger log; - - @Inject - @Current - RegistryStorage storage; - - @Inject - ArtifactTypeUtilProviderFactory factory; - @Context HttpServletRequest request; - - @ConfigProperty(name = "apicurio.apis.v2.base-href", defaultValue = "_") - @Info(category = "api", description = "API base href (URI)", availableSince = "2.5.0.Final") - String apiBaseHref; - - /** - * Handle the content references based on the value of "dereference" - this can mean we need to fully - * dereference the content. - * - * @param dereference - * @param content - */ - protected TypedContent handleContentReferences(boolean dereference, String artifactType, - TypedContent content, List references) { - // Dereference or rewrite references - if (!references.isEmpty() && dereference) { - ArtifactTypeUtilProvider artifactTypeProvider = factory.getArtifactTypeProvider(artifactType); - ContentDereferencer contentDereferencer = artifactTypeProvider.getContentDereferencer(); - Map resolvedReferences = storage.resolveReferences(references); - content = contentDereferencer.dereference(content, resolvedReferences); - } - return content; - } - - /** - * Convert the list of references into a list of REST API URLs that point to the content. This means that - * we generate a REST API URL from the GAV (groupId, artifactId, version) information found in each - * reference. - * - * @param references - */ - protected Map resolveReferenceUrls(List references) { - Map rval = new HashMap<>(); - for (ArtifactReferenceDto reference : references) { - String resolvedReferenceUrl = resolveReferenceUrl(reference); - if (reference.getName().contains("#")) { - JsonPointerExternalReference jpRef = new JsonPointerExternalReference(reference.getName()); - resolvedReferenceUrl = resolvedReferenceUrl + jpRef.getComponent(); - } - if (resolvedReferenceUrl != null) { - rval.put(reference.getName(), resolvedReferenceUrl); - } - } - return rval; - } - - /** - * Convert a single artifact reference to a REST API URL. This means that we generate a REST API URL from - * the GAV (groupId, artifactId, version) information found in the reference. - * - * @param reference - */ - protected String resolveReferenceUrl(ArtifactReferenceDto reference) { - URI baseHref = null; - try { - if (!"_".equals(apiBaseHref)) { - baseHref = new URI(apiBaseHref); - } else { - baseHref = getApiBaseHrefFromXForwarded(request); - if (baseHref == null) { - baseHref = getApiBaseHrefFromRequest(request); - } - } - } catch (URISyntaxException e) { - this.log.error("Error trying to determine the baseHref of the REST API.", e); - return null; - } - - if (baseHref == null) { - this.log.warn("Failed to determine baseHref for the REST API."); - return null; - } - - String path = String.format("/apis/registry/v2/groups/%s/artifacts/%s/versions/%s?references=REWRITE", - URLEncoder.encode(reference.getGroupId(), StandardCharsets.UTF_8), - URLEncoder.encode(reference.getArtifactId(), StandardCharsets.UTF_8), - URLEncoder.encode(reference.getVersion(), StandardCharsets.UTF_8)); - return baseHref.resolve(path).toString(); - } - - /** - * Resolves a host name from the information found in X-Forwarded-Host and X-Forwarded-Proto. - */ - private static URI getApiBaseHrefFromXForwarded(HttpServletRequest request) throws URISyntaxException { - String fproto = request.getHeader("X-Forwarded-Proto"); - String fhost = request.getHeader("X-Forwarded-Host"); - if (!StringUtil.isEmpty(fproto) && !StringUtil.isEmpty(fhost)) { - return new URI(fproto + "://" + fhost); - } else { - return null; - } - } - - /** - * Resolves a host name from the request information. - */ - private static URI getApiBaseHrefFromRequest(HttpServletRequest request) throws URISyntaxException { - String requestUrl = request.getRequestURL().toString(); - URI requestUri = new URI(requestUrl); - return requestUri.resolve("/"); - } - } diff --git a/app/src/main/java/io/apicurio/registry/rest/v2/GroupsResourceImpl.java b/app/src/main/java/io/apicurio/registry/rest/v2/GroupsResourceImpl.java index eecd5fac1e..4751ae1032 100644 --- a/app/src/main/java/io/apicurio/registry/rest/v2/GroupsResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/rest/v2/GroupsResourceImpl.java @@ -38,9 +38,9 @@ import io.apicurio.registry.rest.v2.beans.UpdateState; import io.apicurio.registry.rest.v2.beans.VersionMetaData; import io.apicurio.registry.rest.v2.beans.VersionSearchResults; -import io.apicurio.registry.rest.v2.shared.CommonResourceOperations; import io.apicurio.registry.rules.RuleApplicationType; import io.apicurio.registry.rules.RulesService; +import io.apicurio.registry.storage.RegistryStorage; import io.apicurio.registry.storage.RegistryStorage.RetrievalBehavior; import io.apicurio.registry.storage.dto.ArtifactMetaDataDto; import io.apicurio.registry.storage.dto.ArtifactReferenceDto; @@ -63,12 +63,15 @@ import io.apicurio.registry.storage.error.InvalidArtifactIdException; import io.apicurio.registry.storage.error.InvalidGroupIdException; import io.apicurio.registry.storage.error.VersionNotFoundException; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ArtifactState; import io.apicurio.registry.types.ContentTypes; +import io.apicurio.registry.types.Current; import io.apicurio.registry.types.ReferenceType; import io.apicurio.registry.types.RuleType; import io.apicurio.registry.types.VersionState; import io.apicurio.registry.types.provider.ArtifactTypeUtilProvider; +import io.apicurio.registry.types.provider.ArtifactTypeUtilProviderFactory; import io.apicurio.registry.util.ArtifactIdGenerator; import io.apicurio.registry.util.ArtifactTypeUtil; import io.apicurio.registry.utils.ArtifactIdValidator; @@ -78,10 +81,12 @@ import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.interceptor.Interceptors; +import jakarta.servlet.http.HttpServletRequest; import jakarta.ws.rs.BadRequestException; import jakarta.ws.rs.HttpMethod; import jakarta.ws.rs.NotAllowedException; import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.Response; import org.apache.commons.lang3.tuple.Pair; import org.jose4j.base64url.Base64; @@ -130,7 +135,7 @@ @ApplicationScoped @Interceptors({ ResponseErrorLivenessCheck.class, ResponseTimeoutReadinessCheck.class }) @Logged -public class GroupsResourceImpl extends AbstractResourceImpl implements GroupsResource { +public class GroupsResourceImpl implements GroupsResource { private static final String EMPTY_CONTENT_ERROR_MESSAGE = "Empty content is not allowed."; @SuppressWarnings("unused") @@ -149,11 +154,18 @@ public class GroupsResourceImpl extends AbstractResourceImpl implements GroupsRe SecurityIdentity securityIdentity; @Inject - CommonResourceOperations common; + @Current + RegistryStorage storage; + + @Inject + ArtifactTypeUtilProviderFactory factory; @Inject io.apicurio.registry.rest.v3.GroupsResourceImpl v3; + @Context + HttpServletRequest request; + /** * @see io.apicurio.registry.rest.v2.GroupsResource#getLatestArtifact(java.lang.String, java.lang.String, * Boolean) @@ -179,8 +191,25 @@ public Response getLatestArtifact(String groupId, String artifactId, Boolean der TypedContent contentToReturn = TypedContent.create(artifact.getContent(), artifact.getContentType()); - contentToReturn = handleContentReferences(dereference, metaData.getArtifactType(), - contentToReturn, artifact.getReferences()); + + ArtifactTypeUtilProvider artifactTypeProvider = factory + .getArtifactTypeProvider(metaData.getArtifactType()); + + if (dereference && !artifact.getReferences().isEmpty()) { + if (artifactTypeProvider.supportsReferencesWithContext()) { + RegistryContentUtils.RewrittenContentHolder rewrittenContent = RegistryContentUtils + .recursivelyResolveReferencesWithContext(contentToReturn, + metaData.getArtifactType(), artifact.getReferences(), + storage::getContentByReference); + + contentToReturn = artifactTypeProvider.getContentDereferencer().dereference( + rewrittenContent.getRewrittenContent(), rewrittenContent.getResolvedReferences()); + } else { + contentToReturn = artifactTypeProvider.getContentDereferencer() + .dereference(contentToReturn, RegistryContentUtils.recursivelyResolveReferences( + artifact.getReferences(), storage::getContentByReference)); + } + } Response.ResponseBuilder builder = Response.ok(contentToReturn.getContent(), contentToReturn.getContentType()); @@ -642,8 +671,24 @@ public Response getArtifactVersion(String groupId, String artifactId, String ver artifactId, version); TypedContent contentToReturn = TypedContent.create(artifact.getContent(), artifact.getContentType()); - contentToReturn = handleContentReferences(dereference, metaData.getArtifactType(), contentToReturn, - artifact.getReferences()); + + ArtifactTypeUtilProvider artifactTypeProvider = factory + .getArtifactTypeProvider(metaData.getArtifactType()); + + if (dereference && !artifact.getReferences().isEmpty()) { + if (artifactTypeProvider.supportsReferencesWithContext()) { + RegistryContentUtils.RewrittenContentHolder rewrittenContent = RegistryContentUtils + .recursivelyResolveReferencesWithContext(contentToReturn, metaData.getArtifactType(), + artifact.getReferences(), storage::getContentByReference); + + contentToReturn = artifactTypeProvider.getContentDereferencer().dereference( + rewrittenContent.getRewrittenContent(), rewrittenContent.getResolvedReferences()); + } else { + contentToReturn = artifactTypeProvider.getContentDereferencer().dereference(contentToReturn, + RegistryContentUtils.recursivelyResolveReferences(artifact.getReferences(), + storage::getContentByReference)); + } + } Response.ResponseBuilder builder = Response.ok(contentToReturn.getContent(), contentToReturn.getContentType()); @@ -1064,7 +1109,8 @@ private ArtifactMetaData createArtifactWithRefs(String groupId, String xRegistry final List referencesAsDtos = toReferenceDtos(references); // Try to resolve the new artifact references and the nested ones (if any) - final Map resolvedReferences = storage.resolveReferences(referencesAsDtos); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(referencesAsDtos, storage::getContentByReference); rulesService.applyRules(defaultGroupIdToNull(groupId), artifactId, artifactType, typedContent, RuleApplicationType.CREATE, toV3Refs(references), resolvedReferences); @@ -1200,7 +1246,8 @@ private VersionMetaData createArtifactVersionWithRefs(String groupId, String art final List referencesAsDtos = toReferenceDtos(references); // Try to resolve the new artifact references and the nested ones (if any) - final Map resolvedReferences = storage.resolveReferences(referencesAsDtos); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(referencesAsDtos, storage::getContentByReference); String artifactType = lookupArtifactType(groupId, artifactId); TypedContent typedContent = TypedContent.create(content, ct); @@ -1325,7 +1372,8 @@ private ArtifactMetaData updateArtifactInternal(String groupId, String artifactI // passed references does not exist. final List referencesAsDtos = toReferenceDtos(references); - final Map resolvedReferences = storage.resolveReferences(referencesAsDtos); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(referencesAsDtos, storage::getContentByReference); TypedContent typedContent = TypedContent.create(content, contentType); rulesService.applyRules(defaultGroupIdToNull(groupId), artifactId, artifactType, typedContent, diff --git a/app/src/main/java/io/apicurio/registry/rest/v2/IdsResourceImpl.java b/app/src/main/java/io/apicurio/registry/rest/v2/IdsResourceImpl.java index d8d810b93e..584f5d1ffb 100644 --- a/app/src/main/java/io/apicurio/registry/rest/v2/IdsResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/rest/v2/IdsResourceImpl.java @@ -11,14 +11,19 @@ import io.apicurio.registry.rest.HeadersHack; import io.apicurio.registry.rest.v2.beans.ArtifactReference; import io.apicurio.registry.rest.v2.shared.CommonResourceOperations; +import io.apicurio.registry.storage.RegistryStorage; import io.apicurio.registry.storage.dto.ArtifactVersionMetaDataDto; import io.apicurio.registry.storage.dto.ContentWrapperDto; import io.apicurio.registry.storage.dto.StoredArtifactVersionDto; import io.apicurio.registry.storage.error.ArtifactNotFoundException; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ArtifactMediaTypes; import io.apicurio.registry.types.ArtifactState; +import io.apicurio.registry.types.Current; import io.apicurio.registry.types.ReferenceType; import io.apicurio.registry.types.VersionState; +import io.apicurio.registry.types.provider.ArtifactTypeUtilProvider; +import io.apicurio.registry.types.provider.ArtifactTypeUtilProviderFactory; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.interceptor.Interceptors; @@ -31,11 +36,18 @@ @ApplicationScoped @Interceptors({ ResponseErrorLivenessCheck.class, ResponseTimeoutReadinessCheck.class }) @Logged -public class IdsResourceImpl extends AbstractResourceImpl implements IdsResource { +public class IdsResourceImpl implements IdsResource { @Inject CommonResourceOperations common; + @Inject + @Current + RegistryStorage storage; + + @Inject + ArtifactTypeUtilProviderFactory factory; + private void checkIfDeprecated(Supplier stateSupplier, String artifactId, String version, Response.ResponseBuilder builder) { HeadersHack.checkIfDeprecated(stateSupplier, null, artifactId, version, builder); @@ -70,8 +82,24 @@ public Response getContentByGlobalId(long globalId, Boolean dereference) { StoredArtifactVersionDto artifact = storage.getArtifactVersionContent(globalId); TypedContent contentToReturn = TypedContent.create(artifact.getContent(), artifact.getContentType()); - handleContentReferences(dereference, metaData.getArtifactType(), contentToReturn, - artifact.getReferences()); + + ArtifactTypeUtilProvider artifactTypeProvider = factory + .getArtifactTypeProvider(metaData.getArtifactType()); + + if (dereference && !artifact.getReferences().isEmpty()) { + if (artifactTypeProvider.supportsReferencesWithContext()) { + RegistryContentUtils.RewrittenContentHolder rewrittenContent = RegistryContentUtils + .recursivelyResolveReferencesWithContext(contentToReturn, metaData.getArtifactType(), + artifact.getReferences(), storage::getContentByReference); + + contentToReturn = artifactTypeProvider.getContentDereferencer().dereference( + rewrittenContent.getRewrittenContent(), rewrittenContent.getResolvedReferences()); + } else { + contentToReturn = artifactTypeProvider.getContentDereferencer().dereference(contentToReturn, + RegistryContentUtils.recursivelyResolveReferences(artifact.getReferences(), + storage::getContentByReference)); + } + } Response.ResponseBuilder builder = Response.ok(contentToReturn.getContent(), contentToReturn.getContentType()); diff --git a/app/src/main/java/io/apicurio/registry/rest/v3/AbstractResourceImpl.java b/app/src/main/java/io/apicurio/registry/rest/v3/AbstractResourceImpl.java index 629cccd375..63399b58c0 100644 --- a/app/src/main/java/io/apicurio/registry/rest/v3/AbstractResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/rest/v3/AbstractResourceImpl.java @@ -7,6 +7,7 @@ import io.apicurio.registry.rest.v3.beans.HandleReferencesType; import io.apicurio.registry.storage.RegistryStorage; import io.apicurio.registry.storage.dto.ArtifactReferenceDto; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.Current; import io.apicurio.registry.types.provider.ArtifactTypeUtilProvider; import io.apicurio.registry.types.provider.ArtifactTypeUtilProviderFactory; @@ -50,13 +51,22 @@ public abstract class AbstractResourceImpl { */ protected TypedContent handleContentReferences(HandleReferencesType referencesType, String artifactType, TypedContent content, List references) { - // Dereference or rewrite references if (!references.isEmpty()) { if (referencesType == HandleReferencesType.DEREFERENCE) { ArtifactTypeUtilProvider artifactTypeProvider = factory.getArtifactTypeProvider(artifactType); - ContentDereferencer contentDereferencer = artifactTypeProvider.getContentDereferencer(); - Map resolvedReferences = storage.resolveReferences(references); - content = contentDereferencer.dereference(content, resolvedReferences); + + if (artifactTypeProvider.supportsReferencesWithContext()) { + RegistryContentUtils.RewrittenContentHolder rewrittenContent = RegistryContentUtils + .recursivelyResolveReferencesWithContext(content, artifactType, references, + storage::getContentByReference); + + content = artifactTypeProvider.getContentDereferencer().dereference( + rewrittenContent.getRewrittenContent(), rewrittenContent.getResolvedReferences()); + } else { + content = artifactTypeProvider.getContentDereferencer().dereference(content, + RegistryContentUtils.recursivelyResolveReferences(references, + storage::getContentByReference)); + } } else if (referencesType == HandleReferencesType.REWRITE) { ArtifactTypeUtilProvider artifactTypeProvider = factory.getArtifactTypeProvider(artifactType); ContentDereferencer contentDereferencer = artifactTypeProvider.getContentDereferencer(); @@ -71,7 +81,7 @@ protected TypedContent handleContentReferences(HandleReferencesType referencesTy * Convert the list of references into a list of REST API URLs that point to the content. This means that * we generate a REST API URL from the GAV (groupId, artifactId, version) information found in each * reference. - * + * * @param references */ protected Map resolveReferenceUrls(List references) { @@ -92,7 +102,7 @@ protected Map resolveReferenceUrls(List re /** * Convert a single artifact reference to a REST API URL. This means that we generate a REST API URL from * the GAV (groupId, artifactId, version) information found in the reference. - * + * * @param reference */ protected String resolveReferenceUrl(ArtifactReferenceDto reference) { diff --git a/app/src/main/java/io/apicurio/registry/rest/v3/GroupsResourceImpl.java b/app/src/main/java/io/apicurio/registry/rest/v3/GroupsResourceImpl.java index 6247e18ee1..203728a9cf 100644 --- a/app/src/main/java/io/apicurio/registry/rest/v3/GroupsResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/rest/v3/GroupsResourceImpl.java @@ -57,6 +57,7 @@ import io.apicurio.registry.storage.error.InvalidArtifactIdException; import io.apicurio.registry.storage.error.InvalidGroupIdException; import io.apicurio.registry.storage.error.VersionNotFoundException; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ReferenceType; import io.apicurio.registry.types.RuleType; import io.apicurio.registry.types.VersionState; @@ -773,7 +774,8 @@ public CreateArtifactResponse createArtifact(String groupId, IfArtifactExists if final List referencesAsDtos = toReferenceDtos(references); // Try to resolve the references - final Map resolvedReferences = storage.resolveReferences(referencesAsDtos); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(referencesAsDtos, storage::getContentByReference); // Apply any configured rules if (content != null) { @@ -874,7 +876,8 @@ public VersionMetaData createArtifactVersion(String groupId, String artifactId, data.getContent().getReferences()); // Try to resolve the new artifact references and the nested ones (if any) - final Map resolvedReferences = storage.resolveReferences(referencesAsDtos); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(referencesAsDtos, storage::getContentByReference); String artifactType = lookupArtifactType(groupId, artifactId); TypedContent typedContent = TypedContent.create(content, ct); @@ -1145,7 +1148,8 @@ private CreateArtifactResponse updateArtifactInternal(String groupId, String art // passed references does not exist. final List referencesAsDtos = toReferenceDtos(references); - final Map resolvedReferences = storage.resolveReferences(referencesAsDtos); + final Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(referencesAsDtos, storage::getContentByReference); final TypedContent typedContent = TypedContent.create(content, contentType); rulesService.applyRules(new GroupId(groupId).getRawGroupIdWithNull(), artifactId, artifactType, typedContent, RuleApplicationType.UPDATE, references, resolvedReferences); diff --git a/app/src/main/java/io/apicurio/registry/storage/RegistryStorage.java b/app/src/main/java/io/apicurio/registry/storage/RegistryStorage.java index 25aceb3b2c..80b6b72499 100644 --- a/app/src/main/java/io/apicurio/registry/storage/RegistryStorage.java +++ b/app/src/main/java/io/apicurio/registry/storage/RegistryStorage.java @@ -34,7 +34,6 @@ import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.Function; @@ -749,11 +748,7 @@ void createRoleMapping(String principalId, String role, String principalName) */ List getStaleConfigProperties(Instant since); - /** - * @return The artifact references resolved as a map containing the reference name as key and the - * referenced artifact content. - */ - Map resolveReferences(List references); + ContentWrapperDto getContentByReference(ArtifactReferenceDto reference); /** * Quickly checks for the existence of a given artifact. diff --git a/app/src/main/java/io/apicurio/registry/storage/decorator/ReadOnlyRegistryStorageDecorator.java b/app/src/main/java/io/apicurio/registry/storage/decorator/ReadOnlyRegistryStorageDecorator.java index 6965cf01ea..e944ffa8e2 100644 --- a/app/src/main/java/io/apicurio/registry/storage/decorator/ReadOnlyRegistryStorageDecorator.java +++ b/app/src/main/java/io/apicurio/registry/storage/decorator/ReadOnlyRegistryStorageDecorator.java @@ -464,4 +464,10 @@ public String createEvent(OutboxEvent event) { checkReadOnly(); return delegate.createEvent(event); } + + @Override + public ContentWrapperDto getContentByReference(ArtifactReferenceDto reference) { + checkReadOnly(); + return delegate.getContentByReference(reference); + } } diff --git a/app/src/main/java/io/apicurio/registry/storage/decorator/RegistryStorageDecoratorReadOnlyBase.java b/app/src/main/java/io/apicurio/registry/storage/decorator/RegistryStorageDecoratorReadOnlyBase.java index 87b744daa5..c28bf6d58c 100644 --- a/app/src/main/java/io/apicurio/registry/storage/decorator/RegistryStorageDecoratorReadOnlyBase.java +++ b/app/src/main/java/io/apicurio/registry/storage/decorator/RegistryStorageDecoratorReadOnlyBase.java @@ -35,7 +35,6 @@ import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.Function; @@ -272,11 +271,6 @@ public DynamicConfigPropertyDto getRawConfigProperty(String propertyName) { return delegate.getRawConfigProperty(propertyName); } - @Override - public Map resolveReferences(List references) { - return delegate.resolveReferences(references); - } - @Override public boolean isEmpty() { return delegate.isEmpty(); @@ -353,6 +347,11 @@ public Optional contentIdFromHash(String contentHash) { return delegate.contentIdFromHash(contentHash); } + @Override + public ContentWrapperDto getContentByReference(ArtifactReferenceDto reference) { + return delegate.getContentByReference(reference); + } + @Override public List getEnabledArtifactContentIds(String groupId, String artifactId) { return delegate.getEnabledArtifactContentIds(groupId, artifactId); diff --git a/app/src/main/java/io/apicurio/registry/storage/dto/ContentWrapperDto.java b/app/src/main/java/io/apicurio/registry/storage/dto/ContentWrapperDto.java index 5515535eb8..e1da307bad 100644 --- a/app/src/main/java/io/apicurio/registry/storage/dto/ContentWrapperDto.java +++ b/app/src/main/java/io/apicurio/registry/storage/dto/ContentWrapperDto.java @@ -17,4 +17,5 @@ public class ContentWrapperDto { private String contentType; private ContentHandle content; private List references; + private String artifactType; } diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/gitops/GitOpsRegistryStorage.java b/app/src/main/java/io/apicurio/registry/storage/impl/gitops/GitOpsRegistryStorage.java index 2585512624..97408b01de 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/gitops/GitOpsRegistryStorage.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/gitops/GitOpsRegistryStorage.java @@ -26,7 +26,6 @@ import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.concurrent.TimeUnit; @@ -374,6 +373,11 @@ public List getStaleConfigProperties(Instant since) { return proxy(storage -> storage.getStaleConfigProperties(since)); } + @Override + public ContentWrapperDto getContentByReference(ArtifactReferenceDto reference) { + return proxy(storage -> storage.getContentByReference(reference)); + } + @Override public boolean isContentExists(String contentHash) { return proxy(storage -> storage.isContentExists(contentHash)); @@ -394,11 +398,6 @@ public boolean isRoleMappingExists(String principalId) { return proxy(storage -> storage.isRoleMappingExists(principalId)); } - @Override - public Map resolveReferences(List references) { - return proxy(storage -> storage.resolveReferences(references)); - } - @Override public Optional contentIdFromHash(String contentHash) { return proxy(storage -> storage.contentIdFromHash(contentHash)); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/kafkasql/KafkaSqlRegistryStorage.java b/app/src/main/java/io/apicurio/registry/storage/impl/kafkasql/KafkaSqlRegistryStorage.java index 510603fc3e..43cdd701fa 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/kafkasql/KafkaSqlRegistryStorage.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/kafkasql/KafkaSqlRegistryStorage.java @@ -807,6 +807,11 @@ public void deleteAllExpiredDownloads() throws RegistryStorageException { coordinator.waitForResponse(uuid); } + @Override + public ContentWrapperDto getContentByReference(ArtifactReferenceDto reference) { + return sqlStore.getContentByReference(reference); + } + /** * @see io.apicurio.registry.storage.RegistryStorage#createArtifactVersionComment(java.lang.String, * java.lang.String, java.lang.String, java.lang.String) diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java index 08b7518549..e35108144f 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java @@ -92,6 +92,7 @@ import io.quarkus.security.identity.SecurityIdentity; import jakarta.enterprise.event.Event; import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import jakarta.validation.ValidationException; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -119,8 +120,8 @@ import java.util.function.Function; import java.util.stream.Stream; +import static io.apicurio.registry.storage.impl.sql.RegistryContentUtils.normalizeGroupId; import static io.apicurio.registry.storage.impl.sql.RegistryStorageContentUtils.notEmpty; -import static io.apicurio.registry.storage.impl.sql.SqlUtil.normalizeGroupId; import static io.apicurio.registry.utils.StringUtil.asLowerCase; import static io.apicurio.registry.utils.StringUtil.limitStr; import static java.util.stream.Collectors.toList; @@ -501,7 +502,7 @@ public Pair createArtifact(Stri } Map labels = amd.getLabels(); - String labelsStr = SqlUtil.serializeLabels(labels); + String labelsStr = RegistryContentUtils.serializeLabels(labels); // Create a row in the artifacts table. handle.createUpdate(sqlStatements.insertArtifact()).bind(0, normalizeGroupId(groupId)) @@ -559,7 +560,7 @@ private ArtifactVersionMetaDataDto createArtifactVersionRaw(Handle handle, boole } ArtifactState state = ArtifactState.ENABLED; - String labelsStr = SqlUtil.serializeLabels(metaData.getLabels()); + String labelsStr = RegistryContentUtils.serializeLabels(metaData.getLabels()); Long globalId = nextGlobalIdRaw(handle); GAV gav; @@ -694,7 +695,7 @@ private Long ensureContentAndGetId(String artifactType, ContentWrapperDto conten contentHash = utils.getContentHash(content, references); canonicalContentHash = utils.getCanonicalContentHash(content, artifactType, references, referenceResolver); - serializedReferences = SqlUtil.serializeReferences(references); + serializedReferences = RegistryContentUtils.serializeReferences(references); } else { contentHash = utils.getContentHash(content, null); canonicalContentHash = utils.getCanonicalContentHash(content, artifactType, null, null); @@ -1164,7 +1165,7 @@ public void updateArtifactMetaData(String groupId, String artifactId, // Update labels if (metaData.getLabels() != null) { int rowCount = handle.createUpdate(sqlStatements.updateArtifactLabels()) - .bind(0, SqlUtil.serializeLabels(metaData.getLabels())) + .bind(0, RegistryContentUtils.serializeLabels(metaData.getLabels())) .bind(1, normalizeGroupId(groupId)).bind(2, artifactId).execute(); modified = true; if (rowCount == 0) { @@ -1801,7 +1802,7 @@ public void updateArtifactVersionMetaData(String groupId, String artifactId, Str if (editableMetadata.getLabels() != null) { int rowCount = handle.createUpdate(sqlStatements.updateArtifactVersionLabelsByGAV()) - .bind(0, SqlUtil.serializeLabels(editableMetadata.getLabels())) + .bind(0, RegistryContentUtils.serializeLabels(editableMetadata.getLabels())) .bind(1, normalizeGroupId(groupId)).bind(2, artifactId).bind(3, version).execute(); if (rowCount == 0) { throw new VersionNotFoundException(groupId, artifactId, version); @@ -2108,7 +2109,7 @@ public void createGroup(GroupMetaDataDto group) .bind(4, group.getCreatedOn() == 0 ? new Date() : new Date(group.getCreatedOn())) .bind(5, group.getModifiedBy()) .bind(6, group.getModifiedOn() == 0 ? new Date() : new Date(group.getModifiedOn())) - .bind(7, SqlUtil.serializeLabels(group.getLabels())).execute(); + .bind(7, RegistryContentUtils.serializeLabels(group.getLabels())).execute(); // Insert new labels into the "group_labels" table Map labels = group.getLabels(); @@ -2175,8 +2176,9 @@ public void updateGroupMetaData(String groupId, EditableGroupMetaDataDto dto) { handles.withHandleNoException(handle -> { // Update the row in the groups table int rows = handle.createUpdate(sqlStatements.updateGroup()).bind(0, dto.getDescription()) - .bind(1, modifiedBy).bind(2, modifiedOn).bind(3, SqlUtil.serializeLabels(dto.getLabels())) - .bind(4, groupId).execute(); + .bind(1, modifiedBy).bind(2, modifiedOn) + .bind(3, RegistryContentUtils.serializeLabels(dto.getLabels())).bind(4, groupId) + .execute(); if (rows == 0) { throw new GroupNotFoundException(groupId); } @@ -2567,13 +2569,6 @@ public void deleteAllUserData() { } - @Override - public Map resolveReferences(List references) { - return handles.withHandleNoException(handle -> { - return resolveReferencesRaw(handle, references); - }); - } - private Map resolveReferencesRaw(Handle handle, List references) { if (references == null || references.isEmpty()) { @@ -2772,6 +2767,20 @@ public GroupSearchResultsDto searchGroups(Set filters, OrderBy ord }); } + @Override + @Transactional + public ContentWrapperDto getContentByReference(ArtifactReferenceDto reference) { + try { + var meta = getArtifactVersionMetaData(reference.getGroupId(), reference.getArtifactId(), + reference.getVersion()); + ContentWrapperDto artifactByContentId = getContentById(meta.getContentId()); + artifactByContentId.setArtifactType(meta.getArtifactType()); + return artifactByContentId; + } catch (VersionNotFoundException e) { + return null; + } + } + private void resolveReferencesRaw(Handle handle, Map resolvedReferences, List references) { if (references != null && !references.isEmpty()) { @@ -2925,7 +2934,7 @@ public void importArtifactRule(ArtifactRuleEntity entity) { public void importArtifact(ArtifactEntity entity) { handles.withHandleNoException(handle -> { if (!isArtifactExistsRaw(handle, entity.groupId, entity.artifactId)) { - String labelsStr = SqlUtil.serializeLabels(entity.labels); + String labelsStr = RegistryContentUtils.serializeLabels(entity.labels); handle.createUpdate(sqlStatements.insertArtifact()).bind(0, normalizeGroupId(entity.groupId)) .bind(1, entity.artifactId).bind(2, entity.artifactType).bind(3, entity.owner) .bind(4, new Date(entity.createdOn)).bind(5, entity.modifiedBy) @@ -2964,8 +2973,8 @@ public void importArtifactVersion(ArtifactVersionEntity entity) { .bind(6, entity.name).bind(7, entity.description).bind(8, entity.owner) .bind(9, new Date(entity.createdOn)).bind(10, entity.modifiedBy) .bind(11, new Date(entity.modifiedOn)) - .bind(12, SqlUtil.serializeLabels(entity.labels)).bind(13, entity.contentId) - .execute(); + .bind(12, RegistryContentUtils.serializeLabels(entity.labels)) + .bind(13, entity.contentId).execute(); // Insert labels into the "version_labels" table if (entity.labels != null && !entity.labels.isEmpty()) { @@ -2993,7 +3002,7 @@ public void importContent(ContentEntity entity) { .bind(4, entity.contentBytes).bind(5, entity.serializedReferences).execute(); insertReferencesRaw(handle, entity.contentId, - SqlUtil.deserializeReferences(entity.serializedReferences)); + RegistryContentUtils.deserializeReferences(entity.serializedReferences)); } else { throw new ContentAlreadyExistsException(entity.contentId); } @@ -3017,11 +3026,12 @@ public void importGroup(GroupEntity entity) { throw new GroupAlreadyExistsException(entity.groupId); } - handle.createUpdate(sqlStatements.importGroup()).bind(0, SqlUtil.normalizeGroupId(entity.groupId)) + handle.createUpdate(sqlStatements.importGroup()) + .bind(0, RegistryContentUtils.normalizeGroupId(entity.groupId)) .bind(1, entity.description).bind(2, entity.artifactsType).bind(3, entity.owner) .bind(4, new Date(entity.createdOn)).bind(5, entity.modifiedBy) - .bind(6, new Date(entity.modifiedOn)).bind(7, SqlUtil.serializeLabels(entity.labels)) - .execute(); + .bind(6, new Date(entity.modifiedOn)) + .bind(7, RegistryContentUtils.serializeLabels(entity.labels)).execute(); // Insert labels into the "group_labels" table if (entity.labels != null && !entity.labels.isEmpty()) { diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtils.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtils.java new file mode 100644 index 0000000000..f7f5db6fef --- /dev/null +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtils.java @@ -0,0 +1,356 @@ +package io.apicurio.registry.storage.impl.sql; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.apicurio.registry.content.ContentHandle; +import io.apicurio.registry.content.TypedContent; +import io.apicurio.registry.content.refs.JsonPointerExternalReference; +import io.apicurio.registry.storage.dto.ArtifactReferenceDto; +import io.apicurio.registry.storage.dto.ContentWrapperDto; +import io.apicurio.registry.types.RegistryException; +import io.apicurio.registry.types.provider.ArtifactTypeUtilProvider; +import io.apicurio.registry.types.provider.ArtifactTypeUtilProviderFactory; +import io.apicurio.registry.types.provider.DefaultArtifactTypeUtilProviderImpl; +import io.apicurio.registry.utils.StringUtil; +import org.apache.commons.codec.digest.DigestUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +public class RegistryContentUtils { + + private static final Logger log = LoggerFactory.getLogger(RegistryContentUtils.class); + + private static final String NULL_GROUP_ID = "__$GROUPID$__"; + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + public static final ArtifactTypeUtilProviderFactory ARTIFACT_TYPE_UTIL = new DefaultArtifactTypeUtilProviderImpl(); + + private RegistryContentUtils() { + } + + /** + * Recursively resolve the references. + */ + public static Map recursivelyResolveReferences( + List references, Function loader) { + if (references == null || references.isEmpty()) { + return Map.of(); + } else { + Map result = new LinkedHashMap<>(); + resolveReferences(result, references, loader); + return result; + } + } + + /** + * Recursively resolve the references. Instead of using the reference name as the key, it uses the full + * coordinates of the artifact version. Re-writes each schema node content to use the full coordinates of + * the artifact version instead of just using the original reference name. + * + * @return the main content rewritten to use the full coordinates of the artifact version and the full + * tree of dependencies, also rewritten to use coordinates instead of the reference name. + */ + public static RewrittenContentHolder recursivelyResolveReferencesWithContext(TypedContent mainContent, + String mainContentType, List references, + Function loader) { + if (references == null || references.isEmpty()) { + return new RewrittenContentHolder(mainContent, Collections.emptyMap()); + } else { + Map resolvedReferences = new LinkedHashMap<>(); + // First we resolve all the references tree, re-writing the nested contents to use the artifact + // version coordinates instead of the reference name. + return resolveReferencesWithContext(mainContent, mainContentType, resolvedReferences, references, + loader); + } + } + + /** + * Recursively resolve the references. Instead of using the reference name as the key, it uses the full + * coordinates of the artifact version. Re-writes each schema node content to use the full coordinates of + * the artifact version instead of just using the original reference name. This allows to dereference json + * schema artifacts where there might be duplicate file names in a single hierarchy. + */ + private static RewrittenContentHolder resolveReferencesWithContext(TypedContent mainContent, + String schemaType, Map partialRecursivelyResolvedReferences, + List references, Function loader) { + Map referencesRewrites = new HashMap<>(); + if (references != null && !references.isEmpty()) { + for (ArtifactReferenceDto reference : references) { + if (reference.getArtifactId() == null || reference.getName() == null + || reference.getVersion() == null) { + throw new IllegalStateException("Invalid reference: " + reference); + } else { + String refName = reference.getName(); + String referenceCoordinates = concatArtifactVersionCoordinatesWithRefName( + reference.getGroupId(), reference.getArtifactId(), reference.getVersion(), + refName); + + JsonPointerExternalReference refPointer = new JsonPointerExternalReference(refName); + JsonPointerExternalReference coordinatePointer = new JsonPointerExternalReference( + referenceCoordinates, refPointer.getComponent()); + + String newRefName = coordinatePointer.toString(); + + if (!partialRecursivelyResolvedReferences.containsKey(newRefName)) { + try { + var nested = loader.apply(reference); + if (nested != null) { + ArtifactTypeUtilProvider typeUtilProvider = ARTIFACT_TYPE_UTIL + .getArtifactTypeProvider(nested.getArtifactType()); + RewrittenContentHolder rewrittenContentHolder = resolveReferencesWithContext( + TypedContent.create(nested.getContent(), nested.getArtifactType()), + nested.getArtifactType(), partialRecursivelyResolvedReferences, + nested.getReferences(), loader); + referencesRewrites.put(refName, referenceCoordinates); + TypedContent rewrittenContent = typeUtilProvider.getContentDereferencer() + .rewriteReferences(rewrittenContentHolder.getRewrittenContent(), + referencesRewrites); + partialRecursivelyResolvedReferences.put(newRefName, rewrittenContent); + } + } catch (Exception ex) { + log.error("Could not resolve reference " + reference + ".", ex); + } + } + } + } + } + ArtifactTypeUtilProvider typeUtilProvider = ARTIFACT_TYPE_UTIL.getArtifactTypeProvider(schemaType); + TypedContent rewrittenContent = typeUtilProvider.getContentDereferencer() + .rewriteReferences(mainContent, referencesRewrites); + return new RewrittenContentHolder(rewrittenContent, partialRecursivelyResolvedReferences); + } + + private static void resolveReferences(Map partialRecursivelyResolvedReferences, + List references, Function loader) { + if (references != null && !references.isEmpty()) { + for (ArtifactReferenceDto reference : references) { + if (reference.getArtifactId() == null || reference.getName() == null + || reference.getVersion() == null) { + throw new IllegalStateException("Invalid reference: " + reference); + } else { + if (!partialRecursivelyResolvedReferences.containsKey(reference.getName())) { + try { + var nested = loader.apply(reference); + if (nested != null) { + resolveReferences(partialRecursivelyResolvedReferences, + nested.getReferences(), loader); + partialRecursivelyResolvedReferences.put(reference.getName(), + TypedContent.create(nested.getContent(), nested.getArtifactType())); + } + } catch (Exception ex) { + log.error("Could not resolve reference " + reference + ".", ex); + } + } + } + } + } + } + + /** + * Canonicalize the given content. + *

+ * WARNING: Fails silently. + */ + private static TypedContent canonicalizeContent(String artifactType, TypedContent content, + Map recursivelyResolvedReferences) { + try { + return ARTIFACT_TYPE_UTIL.getArtifactTypeProvider(artifactType).getContentCanonicalizer() + .canonicalize(content, recursivelyResolvedReferences); + } catch (Exception ex) { + // TODO: We should consider explicitly failing when a content could not be canonicalized. + // throw new RegistryException("Failed to canonicalize content.", ex); + log.debug("Failed to canonicalize content: {}", content.getContent()); + return content; + } + } + + /** + * Canonicalize the given content. + * + * @throws RegistryException in the case of an error. + */ + public static TypedContent canonicalizeContent(String artifactType, ContentWrapperDto data, + Function loader) { + try { + return canonicalizeContent(artifactType, + TypedContent.create(data.getContent(), data.getArtifactType()), + recursivelyResolveReferences(data.getReferences(), loader)); + } catch (Exception ex) { + throw new RegistryException("Failed to canonicalize content.", ex); + } + } + + /** + * @param loader can be null *if and only if* references are empty. + */ + public static String canonicalContentHash(String artifactType, ContentWrapperDto data, + Function loader) { + try { + if (notEmpty(data.getReferences())) { + String serializedReferences = serializeReferences(data.getReferences()); + TypedContent canonicalContent = canonicalizeContent(artifactType, data, loader); + return DigestUtils.sha256Hex(concatContentAndReferences(canonicalContent.getContent().bytes(), + serializedReferences)); + } else { + TypedContent canonicalContent = canonicalizeContent(artifactType, + TypedContent.create(data.getContent(), data.getArtifactType()), Map.of()); + return DigestUtils.sha256Hex(canonicalContent.getContent().bytes()); + } + } catch (IOException ex) { + throw new RegistryException("Failed to compute canonical content hash.", ex); + } + } + + /** + * data.references may be null + */ + public static String contentHash(ContentWrapperDto data) { + try { + if (notEmpty(data.getReferences())) { + String serializedReferences = serializeReferences(data.getReferences()); + return DigestUtils.sha256Hex( + concatContentAndReferences(data.getContent().bytes(), serializedReferences)); + } else { + return data.getContent().getSha256Hash(); + } + } catch (IOException ex) { + throw new RegistryException("Failed to compute content hash.", ex); + } + } + + private static byte[] concatContentAndReferences(byte[] contentBytes, String serializedReferences) + throws IOException { + if (serializedReferences != null && !serializedReferences.isEmpty()) { + var serializedReferencesBytes = ContentHandle.create(serializedReferences).bytes(); + var bytes = ByteBuffer.allocate(contentBytes.length + serializedReferencesBytes.length); + bytes.put(contentBytes); + bytes.put(serializedReferencesBytes); + return bytes.array(); + } else { + throw new IllegalArgumentException("serializedReferences is null or empty"); + } + } + + /** + * Serializes the given collection of labels to a string for artifactStore in the DB. + * + * @param labels + */ + public static String serializeLabels(Map labels) { + try { + if (labels == null) { + return null; + } + if (labels.isEmpty()) { + return null; + } + return MAPPER.writeValueAsString(labels); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Deserialize the labels from their string form to a List<String> form. + * + * @param labelsStr + */ + @SuppressWarnings("unchecked") + public static Map deserializeLabels(String labelsStr) { + try { + if (StringUtil.isEmpty(labelsStr)) { + return null; + } + return MAPPER.readValue(labelsStr, Map.class); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Serializes the given collection of references to a string for artifactStore in the DB. + * + * @param references + */ + public static String serializeReferences(List references) { + try { + if (references == null || references.isEmpty()) { + return null; + } + return MAPPER.writeValueAsString(references); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * Deserialize the references from their string form to a List form. + * + * @param references + */ + public static List deserializeReferences(String references) { + try { + if (StringUtil.isEmpty(references)) { + return Collections.emptyList(); + } + return MAPPER.readValue(references, new TypeReference>() { + }); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + public static String normalizeGroupId(String groupId) { + if (groupId == null || "default".equals(groupId)) { + return NULL_GROUP_ID; + } + return groupId; + } + + public static String denormalizeGroupId(String groupId) { + if (NULL_GROUP_ID.equals(groupId)) { + return null; + } + return groupId; + } + + public static boolean notEmpty(Collection collection) { + return collection != null && !collection.isEmpty(); + } + + public static String concatArtifactVersionCoordinatesWithRefName(String groupId, String artifactId, + String version, String referenceName) { + return groupId + ":" + artifactId + ":" + version + ":" + referenceName; + } + + public static class RewrittenContentHolder { + final TypedContent rewrittenContent; + final Map resolvedReferences; + + public RewrittenContentHolder(TypedContent rewrittenContent, + Map resolvedReferences) { + this.rewrittenContent = rewrittenContent; + this.resolvedReferences = resolvedReferences; + } + + public TypedContent getRewrittenContent() { + return rewrittenContent; + } + + public Map getResolvedReferences() { + return resolvedReferences; + } + } +} diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryStorageContentUtils.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryStorageContentUtils.java index a7d23c7b72..aec118e087 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryStorageContentUtils.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryStorageContentUtils.java @@ -72,7 +72,7 @@ public String getCanonicalContentHash(TypedContent content, String artifactType, Function, Map> referenceResolver) { try { if (notEmpty(references)) { - String referencesSerialized = SqlUtil.serializeReferences(references); + String referencesSerialized = RegistryContentUtils.serializeReferences(references); TypedContent canonicalContent = canonicalizeContent(artifactType, content, referenceResolver.apply(references)); return DigestUtils.sha256Hex(concatContentAndReferences(canonicalContent.getContent().bytes(), @@ -92,7 +92,7 @@ public String getCanonicalContentHash(TypedContent content, String artifactType, public String getContentHash(TypedContent content, List references) { try { if (notEmpty(references)) { - String referencesSerialized = SqlUtil.serializeReferences(references); + String referencesSerialized = RegistryContentUtils.serializeReferences(references); return DigestUtils.sha256Hex( concatContentAndReferences(content.getContent().bytes(), referencesSerialized)); } else { diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/SqlUtil.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/SqlUtil.java deleted file mode 100644 index 81652c9e09..0000000000 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/SqlUtil.java +++ /dev/null @@ -1,95 +0,0 @@ -package io.apicurio.registry.storage.impl.sql; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.apicurio.registry.model.GroupId; -import io.apicurio.registry.storage.dto.ArtifactReferenceDto; -import io.apicurio.registry.utils.StringUtil; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class SqlUtil { - - private static final ObjectMapper mapper = new ObjectMapper(); - - /** - * Serializes the given collection of labels to a string for artifactStore in the DB. - * - * @param labels - */ - public static String serializeLabels(Map labels) { - try { - if (labels == null) { - return null; - } - if (labels.isEmpty()) { - return null; - } - return mapper.writeValueAsString(labels); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Deserialize the labels from their string form to a Map form. - * - * @param labelsStr - */ - @SuppressWarnings("unchecked") - public static Map deserializeLabels(String labelsStr) { - try { - if (StringUtil.isEmpty(labelsStr)) { - return null; - } - return mapper.readValue(labelsStr, Map.class); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Serializes the given collection of references to a string for artifactStore in the DB. - * - * @param references - */ - public static String serializeReferences(List references) { - try { - if (references == null || references.isEmpty()) { - return null; - } - return mapper.writeValueAsString(references); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - /** - * Deserialize the references from their string form to a List form. - * - * @param references - */ - public static List deserializeReferences(String references) { - try { - if (StringUtil.isEmpty(references)) { - return Collections.emptyList(); - } - return mapper.readValue(references, new TypeReference>() { - }); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - public static String normalizeGroupId(String groupId) { - return new GroupId(groupId).getRawGroupId(); - } - - public static String denormalizeGroupId(String groupId) { - return new GroupId(groupId).getRawGroupIdWithNull(); - } - -} diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactEntityMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactEntityMapper.java index 9adfbe7545..dc0e57537f 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactEntityMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactEntityMapper.java @@ -1,6 +1,6 @@ package io.apicurio.registry.storage.impl.sql.mappers; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.utils.impexp.v3.ArtifactEntity; @@ -23,12 +23,12 @@ private ArtifactEntityMapper() { @Override public ArtifactEntity map(ResultSet rs) throws SQLException { ArtifactEntity entity = new ArtifactEntity(); - entity.groupId = SqlUtil.denormalizeGroupId(rs.getString("groupId")); + entity.groupId = RegistryContentUtils.denormalizeGroupId(rs.getString("groupId")); entity.artifactId = rs.getString("artifactId"); entity.artifactType = rs.getString("type"); entity.name = rs.getString("name"); entity.description = rs.getString("description"); - entity.labels = SqlUtil.deserializeLabels(rs.getString("labels")); + entity.labels = RegistryContentUtils.deserializeLabels(rs.getString("labels")); entity.owner = rs.getString("owner"); entity.createdOn = rs.getTimestamp("createdOn").getTime(); entity.modifiedBy = rs.getString("modifiedBy"); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactMetaDataDtoMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactMetaDataDtoMapper.java index 5ae0f59c81..d82eac0682 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactMetaDataDtoMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactMetaDataDtoMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.ArtifactMetaDataDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -23,13 +23,13 @@ private ArtifactMetaDataDtoMapper() { @Override public ArtifactMetaDataDto map(ResultSet rs) throws SQLException { ArtifactMetaDataDto dto = new ArtifactMetaDataDto(); - dto.setGroupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))); + dto.setGroupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))); dto.setArtifactId(rs.getString("artifactId")); dto.setOwner(rs.getString("owner")); dto.setCreatedOn(rs.getTimestamp("createdOn").getTime()); dto.setName(rs.getString("name")); dto.setDescription(rs.getString("description")); - dto.setLabels(SqlUtil.deserializeLabels(rs.getString("labels"))); + dto.setLabels(RegistryContentUtils.deserializeLabels(rs.getString("labels"))); dto.setModifiedBy(rs.getString("modifiedBy")); dto.setModifiedOn(rs.getTimestamp("modifiedOn").getTime()); dto.setArtifactType(rs.getString("type")); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactReferenceDtoMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactReferenceDtoMapper.java index a01ad09d4b..47a531d71a 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactReferenceDtoMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactReferenceDtoMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.ArtifactReferenceDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -23,7 +23,7 @@ private ArtifactReferenceDtoMapper() { @Override public ArtifactReferenceDto map(ResultSet rs) throws SQLException { ArtifactReferenceDto dto = new ArtifactReferenceDto(); - dto.setGroupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))); + dto.setGroupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))); dto.setArtifactId(rs.getString("artifactId")); dto.setVersion(rs.getString("version")); dto.setName(rs.getString("name")); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactRuleEntityMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactRuleEntityMapper.java index 7da74f6adb..fa99452231 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactRuleEntityMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactRuleEntityMapper.java @@ -1,6 +1,6 @@ package io.apicurio.registry.storage.impl.sql.mappers; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.types.RuleType; import io.apicurio.registry.utils.impexp.v3.ArtifactRuleEntity; @@ -24,7 +24,7 @@ private ArtifactRuleEntityMapper() { @Override public ArtifactRuleEntity map(ResultSet rs) throws SQLException { ArtifactRuleEntity entity = new ArtifactRuleEntity(); - entity.groupId = SqlUtil.denormalizeGroupId(rs.getString("groupId")); + entity.groupId = RegistryContentUtils.denormalizeGroupId(rs.getString("groupId")); entity.artifactId = rs.getString("artifactId"); entity.type = RuleType.fromValue(rs.getString("type")); entity.configuration = rs.getString("configuration"); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionEntityMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionEntityMapper.java index 7ac5480b0c..06d7cf9006 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionEntityMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionEntityMapper.java @@ -1,6 +1,6 @@ package io.apicurio.registry.storage.impl.sql.mappers; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.types.VersionState; import io.apicurio.registry.utils.impexp.v3.ArtifactVersionEntity; @@ -25,7 +25,7 @@ private ArtifactVersionEntityMapper() { public ArtifactVersionEntity map(ResultSet rs) throws SQLException { ArtifactVersionEntity entity = new ArtifactVersionEntity(); entity.globalId = rs.getLong("globalId"); - entity.groupId = SqlUtil.denormalizeGroupId(rs.getString("groupId")); + entity.groupId = RegistryContentUtils.denormalizeGroupId(rs.getString("groupId")); entity.artifactId = rs.getString("artifactId"); entity.version = rs.getString("version"); entity.versionOrder = rs.getInt("versionOrder"); @@ -36,7 +36,7 @@ public ArtifactVersionEntity map(ResultSet rs) throws SQLException { entity.modifiedBy = rs.getString("modifiedBy"); entity.modifiedOn = rs.getTimestamp("modifiedOn").getTime(); entity.state = VersionState.valueOf(rs.getString("state")); - entity.labels = SqlUtil.deserializeLabels(rs.getString("labels")); + entity.labels = RegistryContentUtils.deserializeLabels(rs.getString("labels")); entity.contentId = rs.getLong("contentId"); return entity; } diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionMetaDataDtoMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionMetaDataDtoMapper.java index 5dbdc59a1c..b8bbb037b4 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionMetaDataDtoMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ArtifactVersionMetaDataDtoMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.ArtifactVersionMetaDataDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.types.VersionState; @@ -27,7 +27,7 @@ private ArtifactVersionMetaDataDtoMapper() { @Override public ArtifactVersionMetaDataDto map(ResultSet rs) throws SQLException { ArtifactVersionMetaDataDto dto = new ArtifactVersionMetaDataDto(); - dto.setGroupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))); + dto.setGroupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))); dto.setArtifactId(rs.getString("artifactId")); dto.setGlobalId(rs.getLong("globalId")); dto.setContentId(rs.getLong("contentId")); @@ -39,7 +39,7 @@ public ArtifactVersionMetaDataDto map(ResultSet rs) throws SQLException { dto.setVersion(rs.getString("version")); dto.setVersionOrder(rs.getInt("versionOrder")); dto.setArtifactType(rs.getString("type")); - dto.setLabels(SqlUtil.deserializeLabels(rs.getString("labels"))); + dto.setLabels(RegistryContentUtils.deserializeLabels(rs.getString("labels"))); return dto; } diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchEntityMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchEntityMapper.java index e0a6fc1a3b..637291b6b8 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchEntityMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchEntityMapper.java @@ -1,6 +1,6 @@ package io.apicurio.registry.storage.impl.sql.mappers; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.utils.impexp.v3.BranchEntity; @@ -16,7 +16,8 @@ private BranchEntityMapper() { @Override public BranchEntity map(ResultSet rs) throws SQLException { - return BranchEntity.builder().groupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))) + return BranchEntity.builder() + .groupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))) .artifactId(rs.getString("artifactId")).branchId(rs.getString("branchId")) .description(rs.getString("description")).systemDefined(rs.getBoolean("systemDefined")) .owner(rs.getString("owner")).createdOn(rs.getTimestamp("createdOn").getTime()) diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchMetaDataDtoMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchMetaDataDtoMapper.java index 9a8ab6aef3..1c86f0b1a5 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchMetaDataDtoMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/BranchMetaDataDtoMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.BranchMetaDataDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -22,7 +22,8 @@ private BranchMetaDataDtoMapper() { */ @Override public BranchMetaDataDto map(ResultSet rs) throws SQLException { - return BranchMetaDataDto.builder().groupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))) + return BranchMetaDataDto.builder() + .groupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))) .artifactId(rs.getString("artifactId")).branchId(rs.getString("branchId")) .description(rs.getString("description")).systemDefined(rs.getBoolean("systemDefined")) .owner(rs.getString("owner")).createdOn(rs.getTimestamp("createdOn").getTime()) diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ContentMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ContentMapper.java index 3271df93dc..ef6951e0a7 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ContentMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/ContentMapper.java @@ -2,7 +2,7 @@ import io.apicurio.registry.content.ContentHandle; import io.apicurio.registry.storage.dto.ContentWrapperDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -28,7 +28,7 @@ public ContentWrapperDto map(ResultSet rs) throws SQLException { ContentHandle content = ContentHandle.create(contentBytes); contentWrapperDto.setContent(content); contentWrapperDto.setContentType(rs.getString("contentType")); - contentWrapperDto.setReferences(SqlUtil.deserializeReferences(rs.getString("refs"))); + contentWrapperDto.setReferences(RegistryContentUtils.deserializeReferences(rs.getString("refs"))); return contentWrapperDto; } diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupEntityMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupEntityMapper.java index 0ae4baa70f..7a9308dce4 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupEntityMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupEntityMapper.java @@ -1,6 +1,6 @@ package io.apicurio.registry.storage.impl.sql.mappers; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.utils.impexp.v3.GroupEntity; @@ -26,7 +26,7 @@ private GroupEntityMapper() { @Override public GroupEntity map(ResultSet rs) throws SQLException { GroupEntity entity = new GroupEntity(); - entity.groupId = SqlUtil.denormalizeGroupId(rs.getString("groupId")); + entity.groupId = RegistryContentUtils.denormalizeGroupId(rs.getString("groupId")); entity.description = rs.getString("description"); String type = rs.getString("artifactsType"); entity.artifactsType = type; @@ -34,7 +34,7 @@ public GroupEntity map(ResultSet rs) throws SQLException { entity.createdOn = rs.getTimestamp("createdOn").getTime(); entity.modifiedBy = rs.getString("modifiedBy"); entity.modifiedOn = ofNullable(rs.getTimestamp("modifiedOn")).map(Timestamp::getTime).orElse(0L); - entity.labels = SqlUtil.deserializeLabels(rs.getString("labels")); + entity.labels = RegistryContentUtils.deserializeLabels(rs.getString("labels")); return entity; } diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupMetaDataDtoMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupMetaDataDtoMapper.java index 49b7dc47fd..a94a584f04 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupMetaDataDtoMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupMetaDataDtoMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.GroupMetaDataDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -24,7 +24,7 @@ private GroupMetaDataDtoMapper() { @Override public GroupMetaDataDto map(ResultSet rs) throws SQLException { GroupMetaDataDto dto = new GroupMetaDataDto(); - dto.setGroupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))); + dto.setGroupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))); dto.setDescription(rs.getString("description")); String type = rs.getString("artifactsType"); @@ -37,7 +37,7 @@ public GroupMetaDataDto map(ResultSet rs) throws SQLException { Timestamp modifiedOn = rs.getTimestamp("modifiedOn"); dto.setModifiedOn(modifiedOn == null ? 0 : modifiedOn.getTime()); - dto.setLabels(SqlUtil.deserializeLabels(rs.getString("labels"))); + dto.setLabels(RegistryContentUtils.deserializeLabels(rs.getString("labels"))); return dto; } diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupRuleEntityMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupRuleEntityMapper.java index 2c33b923e4..c86dfe57b7 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupRuleEntityMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/GroupRuleEntityMapper.java @@ -1,6 +1,6 @@ package io.apicurio.registry.storage.impl.sql.mappers; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.types.RuleType; import io.apicurio.registry.utils.impexp.v3.GroupRuleEntity; @@ -24,7 +24,7 @@ private GroupRuleEntityMapper() { @Override public GroupRuleEntity map(ResultSet rs) throws SQLException { GroupRuleEntity entity = new GroupRuleEntity(); - entity.groupId = SqlUtil.denormalizeGroupId(rs.getString("groupId")); + entity.groupId = RegistryContentUtils.denormalizeGroupId(rs.getString("groupId")); entity.type = RuleType.fromValue(rs.getString("type")); entity.configuration = rs.getString("configuration"); return entity; diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedArtifactMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedArtifactMapper.java index d81a0e67d6..ef95cf0ce2 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedArtifactMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedArtifactMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.SearchedArtifactDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -23,7 +23,7 @@ private SearchedArtifactMapper() { @Override public SearchedArtifactDto map(ResultSet rs) throws SQLException { SearchedArtifactDto dto = new SearchedArtifactDto(); - dto.setGroupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))); + dto.setGroupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))); dto.setArtifactId(rs.getString("artifactId")); dto.setOwner(rs.getString("owner")); dto.setCreatedOn(rs.getTimestamp("createdOn")); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedBranchMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedBranchMapper.java index d394c91226..f39167e78c 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedBranchMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedBranchMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.SearchedBranchDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -22,7 +22,8 @@ private SearchedBranchMapper() { */ @Override public SearchedBranchDto map(ResultSet rs) throws SQLException { - return SearchedBranchDto.builder().groupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))) + return SearchedBranchDto.builder() + .groupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))) .artifactId(rs.getString("artifactId")).branchId(rs.getString("branchId")) .description(rs.getString("description")).systemDefined(rs.getBoolean("systemDefined")) .owner(rs.getString("owner")).createdOn(rs.getTimestamp("createdOn").getTime()) diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedVersionMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedVersionMapper.java index 48cec20018..f021747bce 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedVersionMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/SearchedVersionMapper.java @@ -1,7 +1,7 @@ package io.apicurio.registry.storage.impl.sql.mappers; import io.apicurio.registry.storage.dto.SearchedVersionDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import io.apicurio.registry.types.VersionState; @@ -24,7 +24,7 @@ private SearchedVersionMapper() { @Override public SearchedVersionDto map(ResultSet rs) throws SQLException { SearchedVersionDto dto = new SearchedVersionDto(); - dto.setGroupId(SqlUtil.denormalizeGroupId(rs.getString("groupId"))); + dto.setGroupId(RegistryContentUtils.denormalizeGroupId(rs.getString("groupId"))); dto.setArtifactId(rs.getString("artifactId")); dto.setVersion(rs.getString("version")); dto.setVersionOrder(rs.getInt("versionOrder")); diff --git a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/StoredArtifactMapper.java b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/StoredArtifactMapper.java index e51d3204f7..b9009c97b3 100644 --- a/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/StoredArtifactMapper.java +++ b/app/src/main/java/io/apicurio/registry/storage/impl/sql/mappers/StoredArtifactMapper.java @@ -2,7 +2,7 @@ import io.apicurio.registry.content.ContentHandle; import io.apicurio.registry.storage.dto.StoredArtifactVersionDto; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.jdb.RowMapper; import java.sql.ResultSet; @@ -27,6 +27,6 @@ public StoredArtifactVersionDto map(ResultSet rs) throws SQLException { .contentType(rs.getString("contentType")).contentId(rs.getLong("contentId")) .globalId(rs.getLong("globalId")).version(rs.getString("version")) .versionOrder(rs.getInt("versionOrder")) - .references(SqlUtil.deserializeReferences(rs.getString("refs"))).build(); + .references(RegistryContentUtils.deserializeReferences(rs.getString("refs"))).build(); } } diff --git a/app/src/main/java/io/apicurio/registry/storage/importing/v2/SqlDataUpgrader.java b/app/src/main/java/io/apicurio/registry/storage/importing/v2/SqlDataUpgrader.java index 981bb5f74a..1d588d4781 100644 --- a/app/src/main/java/io/apicurio/registry/storage/importing/v2/SqlDataUpgrader.java +++ b/app/src/main/java/io/apicurio/registry/storage/importing/v2/SqlDataUpgrader.java @@ -9,8 +9,8 @@ import io.apicurio.registry.storage.dto.EditableArtifactMetaDataDto; import io.apicurio.registry.storage.error.InvalidArtifactTypeException; import io.apicurio.registry.storage.error.VersionAlreadyExistsException; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.RegistryStorageContentUtils; -import io.apicurio.registry.storage.impl.sql.SqlUtil; import io.apicurio.registry.types.ContentTypes; import io.apicurio.registry.types.RegistryException; import io.apicurio.registry.types.VersionState; @@ -160,7 +160,7 @@ public void importContent(ContentEntity entity) { entity.contentId = storage.nextContentId(); } - List references = SqlUtil + List references = RegistryContentUtils .deserializeReferences(entity.serializedReferences); // Recalculate the hash using the current algorithm @@ -169,7 +169,8 @@ public void importContent(ContentEntity entity) { // Try to recalculate the canonical hash - this may fail if the content has references try { - Map resolvedReferences = storage.resolveReferences(references); + Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(references, storage::getContentByReference); entity.artifactType = utils.determineArtifactType(typedContent, null, resolvedReferences); // First we have to recalculate both the canonical hash and the contentHash @@ -299,7 +300,8 @@ private void recalculateCanonicalHash(Long contentId) { TypedContent content = TypedContent.create(wrapperDto.getContent(), wrapperDto.getContentType()); String artifactType = versions.get(0).getArtifactType(); - Map resolvedReferences = storage.resolveReferences(references); + Map resolvedReferences = RegistryContentUtils + .recursivelyResolveReferences(references, storage::getContentByReference); TypedContent canonicalContent = utils.canonicalizeContent(artifactType, content, resolvedReferences); String canonicalHash = DigestUtils.sha256Hex(canonicalContent.getContent().bytes()); diff --git a/app/src/main/java/io/apicurio/registry/storage/importing/v3/SqlDataImporter.java b/app/src/main/java/io/apicurio/registry/storage/importing/v3/SqlDataImporter.java index 396c8df3cc..41650a3db6 100644 --- a/app/src/main/java/io/apicurio/registry/storage/importing/v3/SqlDataImporter.java +++ b/app/src/main/java/io/apicurio/registry/storage/importing/v3/SqlDataImporter.java @@ -5,8 +5,8 @@ import io.apicurio.registry.storage.RegistryStorage; import io.apicurio.registry.storage.dto.ArtifactReferenceDto; import io.apicurio.registry.storage.error.VersionAlreadyExistsException; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.storage.impl.sql.RegistryStorageContentUtils; -import io.apicurio.registry.storage.impl.sql.SqlUtil; import io.apicurio.registry.types.RegistryException; import io.apicurio.registry.utils.impexp.Entity; import io.apicurio.registry.utils.impexp.EntityInputStream; @@ -99,7 +99,7 @@ public void importArtifactVersion(ArtifactVersionEntity entity) { @Override public void importContent(ContentEntity entity) { try { - List references = SqlUtil + List references = RegistryContentUtils .deserializeReferences(entity.serializedReferences); if (entity.contentType == null) { @@ -112,7 +112,8 @@ public void importContent(ContentEntity entity) { // We do not need canonicalHash if we have artifactType if (entity.canonicalHash == null && entity.artifactType != null) { TypedContent canonicalContent = utils.canonicalizeContent(entity.artifactType, typedContent, - storage.resolveReferences(references)); + RegistryContentUtils.recursivelyResolveReferences(references, + storage::getContentByReference)); entity.canonicalHash = DigestUtils.sha256Hex(canonicalContent.getContent().bytes()); } diff --git a/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/ccompat/v7/openapi.json b/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/ccompat/v7/openapi.json index c452339a3b..105e41130f 100644 --- a/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/ccompat/v7/openapi.json +++ b/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/ccompat/v7/openapi.json @@ -1264,6 +1264,9 @@ { "name": "subject", "description": "subject (string) – the name of the subject", + "schema": { + "type": "string" + }, "in": "path", "required": true }, diff --git a/app/src/test/java/io/apicurio/registry/auth/SimpleAuthTest.java b/app/src/test/java/io/apicurio/registry/auth/SimpleAuthTest.java index 109a3b89aa..e0f1d77589 100644 --- a/app/src/test/java/io/apicurio/registry/auth/SimpleAuthTest.java +++ b/app/src/test/java/io/apicurio/registry/auth/SimpleAuthTest.java @@ -23,6 +23,7 @@ import io.kiota.http.vertx.VertXRequestAdapter; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.TestProfile; +import io.vertx.core.Vertx; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Tag; @@ -90,6 +91,16 @@ public void testWrongCreds() throws Exception { assertTrue(exception.getMessage().contains("Unauthorized")); } + @Test + public void testNoCreds() throws Exception { + var adapter = new VertXRequestAdapter(Vertx.vertx()); + adapter.setBaseUrl(registryV3ApiUrl); + RegistryClient client = new RegistryClient(adapter); + Assertions.assertThrows(Exception.class, () -> { + client.groups().byGroupId(groupId).artifacts().get(); + }); + } + @Test public void testReadOnly() throws Exception { var adapter = new VertXRequestAdapter( diff --git a/app/src/test/java/io/apicurio/registry/limits/LimitsTest.java b/app/src/test/java/io/apicurio/registry/limits/LimitsTest.java index d9009ebd28..4dc360c3c7 100644 --- a/app/src/test/java/io/apicurio/registry/limits/LimitsTest.java +++ b/app/src/test/java/io/apicurio/registry/limits/LimitsTest.java @@ -87,8 +87,8 @@ public void testLimits() throws Exception { Assertions.assertEquals(409, exception1.getResponseStatusCode()); // schema number 3 , exceeds the max number of schemas - var exception2 = Assertions.assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, - () -> { + var exception2 = Assertions.assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { CreateArtifact createArtifact = new CreateArtifact(); createArtifact.setArtifactId(artifactId); createArtifact.setArtifactType(ArtifactType.JSON); diff --git a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/ConcurrentCreateTest.java b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/ConcurrentCreateTest.java index c8ad445ae8..8bb66482f5 100644 --- a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/ConcurrentCreateTest.java +++ b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/ConcurrentCreateTest.java @@ -11,10 +11,10 @@ import io.apicurio.registry.utils.tests.TestUtils; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.TestProfile; +import io.vertx.core.impl.ConcurrentHashSet; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import java.util.HashSet; import java.util.Set; import java.util.concurrent.CountDownLatch; @@ -27,8 +27,7 @@ public void testMultipleArtifacts() throws Exception { String oaiArtifactContent = resourceToString("openapi-empty.json"); String groupId = TestUtils.generateGroupId(); - Set created = new HashSet<>(); - Set failed = new HashSet<>(); + Set created = new ConcurrentHashSet<>(); CountDownLatch latch = new CountDownLatch(5); CreateGroup createGroup = new CreateGroup(); @@ -64,9 +63,10 @@ public void testMultipleArtifacts() throws Exception { .byVersionExpression("1"); created.add(artifactId); + System.out.println("[Fork-" + forkId + "] Succeeded"); } catch (Exception e) { System.out.println("[Fork-" + forkId + "] FAILED: " + e.getMessage()); - failed.add(artifactId); + Assertions.fail("Failure detected in fork " + forkId, e); } latch.countDown(); }); @@ -75,7 +75,6 @@ public void testMultipleArtifacts() throws Exception { latch.await(); Assertions.assertEquals(5, created.size()); - Assertions.assertEquals(0, failed.size()); } @Test @@ -83,8 +82,7 @@ public void testSameArtifact() throws Exception { String oaiArtifactContent = resourceToString("openapi-empty.json"); String groupId = "testMultipleArtifacts";// TestUtils.generateGroupId(); - Set created = new HashSet<>(); - Set failed = new HashSet<>(); + Set created = new ConcurrentHashSet<>(); CountDownLatch latch = new CountDownLatch(5); CreateGroup createGroup = new CreateGroup(); @@ -119,10 +117,11 @@ public void testSameArtifact() throws Exception { clientV3.groups().byGroupId(groupId).artifacts().byArtifactId(artifactId).versions() .byVersionExpression("1"); - created.add("" + forkId); + created.add(forkId); + System.out.println("[Fork-" + forkId + "] Succeeded"); } catch (Exception e) { System.out.println("[Fork-" + forkId + "] FAILED: " + e.getMessage()); - failed.add("" + forkId); + Assertions.fail("Failure detected in fork " + forkId, e); } latch.countDown(); }); @@ -131,7 +130,6 @@ public void testSameArtifact() throws Exception { latch.await(); Assertions.assertEquals(5, created.size()); - Assertions.assertEquals(0, failed.size()); } } diff --git a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DryRunTest.java b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DryRunTest.java index d915a4719f..245f933d67 100644 --- a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DryRunTest.java +++ b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DryRunTest.java @@ -1,5 +1,6 @@ package io.apicurio.registry.noprofile.rest.v3; +import com.microsoft.kiota.ApiException; import io.apicurio.registry.AbstractResourceTestBase; import io.apicurio.registry.rest.client.models.ArtifactSearchResults; import io.apicurio.registry.rest.client.models.CreateArtifact; @@ -10,6 +11,7 @@ import io.apicurio.registry.rest.client.models.IfArtifactExists; import io.apicurio.registry.rest.client.models.ProblemDetails; import io.apicurio.registry.rest.client.models.RuleType; +import io.apicurio.registry.rest.client.models.RuleViolationProblemDetails; import io.apicurio.registry.rest.client.models.VersionMetaData; import io.apicurio.registry.rest.client.models.VersionSearchResults; import io.apicurio.registry.rules.validity.ValidityLevel; @@ -71,22 +73,23 @@ public void testCreateArtifactDryRun() throws Exception { ArtifactSearchResults results = clientV3.groups().byGroupId(groupId).artifacts().get(); Assertions.assertEquals(0, results.getCount()); Assertions.assertEquals(0, results.getArtifacts().size()); - ProblemDetails error = Assertions.assertThrows(ProblemDetails.class, () -> { + ApiException error = Assertions.assertThrows(ProblemDetails.class, () -> { clientV3.groups().byGroupId(groupId).artifacts().byArtifactId("valid-artifact").get(); }); Assertions.assertEquals( "No artifact with ID 'valid-artifact' in group 'testCreateArtifactDryRun' was found.", - error.getTitle()); + ((ProblemDetails) error).getTitle()); // Dry run: invalid artifact that should NOT be created. - error = Assertions.assertThrows(ProblemDetails.class, () -> { + error = Assertions.assertThrows(RuleViolationProblemDetails.class, () -> { CreateArtifact ca = TestUtils.clientCreateArtifact("invalid-artifact", ArtifactType.AVRO, INVALID_SCHEMA, ContentTypes.APPLICATION_JSON); clientV3.groups().byGroupId(groupId).artifacts().post(ca, config -> { config.queryParameters.dryRun = true; }); }); - Assertions.assertEquals("Syntax violation for Avro artifact.", error.getTitle()); + Assertions.assertEquals("Syntax violation for Avro artifact.", + ((RuleViolationProblemDetails) error).getTitle()); Assertions.assertNotNull(car); Assertions.assertEquals(groupId, car.getArtifact().getGroupId()); Assertions.assertEquals("valid-artifact", car.getArtifact().getArtifactId()); @@ -101,7 +104,7 @@ public void testCreateArtifactDryRun() throws Exception { }); Assertions.assertEquals( "No artifact with ID 'invalid-artifact' in group 'testCreateArtifactDryRun' was found.", - error.getTitle()); + ((ProblemDetails) error).getTitle()); // Actually create an artifact in the group. createArtifact(groupId, "actual-artifact", ArtifactType.AVRO, SCHEMA_SIMPLE, @@ -111,7 +114,7 @@ public void testCreateArtifactDryRun() throws Exception { Assertions.assertEquals(1, results.getArtifacts().size()); // DryRun: Try to create the *same* artifact (conflict) - error = Assertions.assertThrows(ProblemDetails.class, () -> { + error = Assertions.assertThrows(RuleViolationProblemDetails.class, () -> { CreateArtifact ca = TestUtils.clientCreateArtifact("actual-artifact", ArtifactType.AVRO, SCHEMA_SIMPLE, ContentTypes.APPLICATION_JSON); clientV3.groups().byGroupId(groupId).artifacts().post(ca, config -> { @@ -120,7 +123,7 @@ public void testCreateArtifactDryRun() throws Exception { }); Assertions.assertEquals( "An artifact with ID 'actual-artifact' in group 'testCreateArtifactDryRun' already exists.", - error.getTitle()); + ((RuleViolationProblemDetails) error).getTitle()); // DryRun: Try to create the *same* artifact but with ifExists set (success) createArtifact = TestUtils.clientCreateArtifact("actual-artifact", ArtifactType.AVRO, SCHEMA_SIMPLE, @@ -165,7 +168,7 @@ public void testCreateVersionDryRun() throws Exception { createArtifact(groupId, artifactId, ArtifactType.AVRO, SCHEMA_SIMPLE, ContentTypes.APPLICATION_JSON); // DryRun: try to create an invalid version - ProblemDetails error = Assertions.assertThrows(ProblemDetails.class, () -> { + RuleViolationProblemDetails error = Assertions.assertThrows(RuleViolationProblemDetails.class, () -> { CreateVersion createVersion = TestUtils.clientCreateVersion(INVALID_SCHEMA, ContentTypes.APPLICATION_JSON); clientV3.groups().byGroupId(groupId).artifacts().byArtifactId(artifactId).versions() diff --git a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/GroupsResourceTest.java b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/GroupsResourceTest.java index 3eb1f5ea0e..a29e7cfbde 100644 --- a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/GroupsResourceTest.java +++ b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/GroupsResourceTest.java @@ -15,7 +15,7 @@ import io.apicurio.registry.rest.v3.beans.VersionMetaData; import io.apicurio.registry.rules.compatibility.jsonschema.diff.DiffType; import io.apicurio.registry.rules.integrity.IntegrityLevel; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ArtifactType; import io.apicurio.registry.types.ContentTypes; import io.apicurio.registry.types.ReferenceType; @@ -1613,7 +1613,8 @@ void testArtifactWithReferences() throws Exception { .extract().as(new TypeRef>() { }); - final String referencesSerialized = SqlUtil.serializeReferences(toReferenceDtos(references)); + final String referencesSerialized = RegistryContentUtils + .serializeReferences(toReferenceDtos(references)); // We calculate the hash using the content itself and the references String contentHash = DigestUtils @@ -1804,10 +1805,11 @@ public void testCreateArtifactIntegrityRuleViolation() throws Exception { createVersion.getContent().setReferences(List.of(reference)); CreateVersion f_createVersion = createVersion; - var exception_1 = assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, () -> { - clientV3.groups().byGroupId(GROUP).artifacts().byArtifactId(artifactId).versions() - .post(f_createVersion); - }); + var exception_1 = assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { + clientV3.groups().byGroupId(GROUP).artifacts().byArtifactId(artifactId).versions() + .post(f_createVersion); + }); Assertions.assertEquals(409, exception_1.getStatus()); Assertions.assertEquals("RuleViolationException", exception_1.getName()); @@ -1830,10 +1832,11 @@ public void testCreateArtifactIntegrityRuleViolation() throws Exception { createVersion.getContent().setReferences(List.of(validRef, invalidRef)); CreateVersion f_createVersion2 = createVersion; - var exception_2 = assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, () -> { - clientV3.groups().byGroupId(GROUP).artifacts().byArtifactId(artifactId).versions() - .post(f_createVersion2); - }); + var exception_2 = assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { + clientV3.groups().byGroupId(GROUP).artifacts().byArtifactId(artifactId).versions() + .post(f_createVersion2); + }); Assertions.assertEquals(409, exception_2.getStatus()); Assertions.assertEquals("RuleViolationException", exception_2.getName()); @@ -1843,10 +1846,11 @@ public void testCreateArtifactIntegrityRuleViolation() throws Exception { createVersion.getContent().setReferences(List.of(validRef, validRef)); CreateVersion f_createVersion3 = createVersion; - var exception_3 = assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, () -> { - clientV3.groups().byGroupId(GROUP).artifacts().byArtifactId(artifactId).versions() - .post(f_createVersion3); - }); + var exception_3 = assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { + clientV3.groups().byGroupId(GROUP).artifacts().byArtifactId(artifactId).versions() + .post(f_createVersion3); + }); Assertions.assertEquals(409, exception_3.getStatus()); Assertions.assertEquals("RuleViolationException", exception_3.getName()); } @@ -1890,8 +1894,8 @@ public void testGetArtifactVersionWithReferences() throws Exception { .queryParam("references", "DEREFERENCE") .get("/registry/v3/groups/{groupId}/artifacts/{artifactId}/versions/branch=latest/content") .then().statusCode(200).body("openapi", equalTo("3.0.2")) - .body("paths.widgets.get.responses.200.content.json.schema.items.$ref", - equalTo("#/components/schemas/Widget")); + .body("paths.widgets.get.responses.200.content.json.schema.items.$ref", equalTo( + "GroupsResourceTest:testGetArtifactVersionWithReferences/ReferencedTypes:1:./referenced-types.json#/components/schemas/Widget")); } } diff --git a/app/src/test/java/io/apicurio/registry/noprofile/serde/JsonSchemaSerdeTest.java b/app/src/test/java/io/apicurio/registry/noprofile/serde/JsonSchemaSerdeTest.java index 4c0e54cde3..94015f749f 100644 --- a/app/src/test/java/io/apicurio/registry/noprofile/serde/JsonSchemaSerdeTest.java +++ b/app/src/test/java/io/apicurio/registry/noprofile/serde/JsonSchemaSerdeTest.java @@ -25,6 +25,8 @@ import io.apicurio.registry.support.Citizen; import io.apicurio.registry.support.CitizenIdentifier; import io.apicurio.registry.support.City; +import io.apicurio.registry.support.CityQualification; +import io.apicurio.registry.support.IdentifierQualification; import io.apicurio.registry.support.Person; import io.apicurio.registry.support.Qualification; import io.apicurio.registry.types.ArtifactType; @@ -270,10 +272,11 @@ public void testJsonSchemaSerdeMagicByte() throws Exception { @Test public void testJsonSchemaSerdeWithReferences() throws Exception { - InputStream citySchema = getClass().getResourceAsStream("/io/apicurio/registry/util/city.json"); - InputStream citizenSchema = getClass().getResourceAsStream("/io/apicurio/registry/util/citizen.json"); + InputStream citySchema = getClass().getResourceAsStream("/io/apicurio/registry/util/city1.json"); + InputStream citizenSchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/citizen1.json"); InputStream citizenIdentifier = getClass() - .getResourceAsStream("/io/apicurio/registry/util/citizenIdentifier.json"); + .getResourceAsStream("/io/apicurio/registry/util/citizenIdentifier1.json"); InputStream qualificationSchema = getClass() .getResourceAsStream("/io/apicurio/registry/util/qualification.json"); @@ -415,6 +418,320 @@ public void testJsonSchemaSerdeWithReferences() throws Exception { } } + @Test + public void testJsonSchemaSerdeWithReferencesDeserializerDereferenced() throws Exception { + InputStream citySchema = getClass().getResourceAsStream("/io/apicurio/registry/util/city1.json"); + InputStream citizenSchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/citizen1.json"); + InputStream citizenIdentifier = getClass() + .getResourceAsStream("/io/apicurio/registry/util/citizenIdentifier1.json"); + InputStream qualificationSchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/qualification.json"); + + InputStream addressSchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/sample.address.json"); + + Assertions.assertNotNull(citizenSchema); + Assertions.assertNotNull(citySchema); + Assertions.assertNotNull(citizenIdentifier); + Assertions.assertNotNull(qualificationSchema); + Assertions.assertNotNull(addressSchema); + + String groupId = TestUtils.generateGroupId(); + String cityArtifactId = generateArtifactId(); + String qualificationsId = generateArtifactId(); + String identifierArtifactId = generateArtifactId(); + String addressId = generateArtifactId(); + + createArtifact(groupId, cityArtifactId, ArtifactType.JSON, IoUtil.toString(citySchema), + ContentTypes.APPLICATION_JSON); + + createArtifact(groupId, qualificationsId, ArtifactType.JSON, IoUtil.toString(qualificationSchema), + ContentTypes.APPLICATION_JSON); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference qualificationsReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + qualificationsReference.setVersion("1"); + qualificationsReference.setGroupId(groupId); + qualificationsReference.setArtifactId(qualificationsId); + qualificationsReference.setName("qualification.json"); + + createArtifact(groupId, addressId, ArtifactType.JSON, IoUtil.toString(addressSchema), + ContentTypes.APPLICATION_JSON); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference addressReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + addressReference.setVersion("1"); + addressReference.setGroupId(groupId); + addressReference.setArtifactId(addressId); + addressReference.setName("sample.address.json"); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference cityReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + cityReference.setVersion("1"); + cityReference.setGroupId(groupId); + cityReference.setArtifactId(cityArtifactId); + cityReference.setName("city1.json"); + + createArtifact(groupId, identifierArtifactId, ArtifactType.JSON, IoUtil.toString(citizenIdentifier), + ContentTypes.APPLICATION_JSON); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference identifierReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + identifierReference.setVersion("1"); + identifierReference.setGroupId(groupId); + identifierReference.setArtifactId(identifierArtifactId); + identifierReference.setName("citizenIdentifier1.json"); + + String artifactId = generateArtifactId(); + + createArtifactWithReferences(groupId, artifactId, ArtifactType.JSON, IoUtil.toString(citizenSchema), + ContentTypes.APPLICATION_JSON, + List.of(qualificationsReference, cityReference, identifierReference, addressReference)); + + City city = new City("New York", 10001); + CitizenIdentifier identifier = new CitizenIdentifier(123456789); + Citizen citizen = new Citizen("Carles", "Arnal", 23, city, identifier, Collections.emptyList()); + + try (JsonSchemaKafkaSerializer serializer = new JsonSchemaKafkaSerializer<>(restClient); + Deserializer deserializer = new JsonSchemaKafkaDeserializer<>(restClient)) { + + Map config = new HashMap<>(); + config.put(SerdeConfig.EXPLICIT_ARTIFACT_GROUP_ID, groupId); + config.put(SerdeConfig.ARTIFACT_RESOLVER_STRATEGY, SimpleTopicIdStrategy.class.getName()); + config.put(SerdeConfig.VALIDATION_ENABLED, "true"); + config.put(SerdeConfig.DEREFERENCE_SCHEMA, "true"); + config.put(KafkaSerdeConfig.ENABLE_HEADERS, "true"); + serializer.configure(config, false); + + deserializer.configure(config, false); + + Headers headers = new RecordHeaders(); + byte[] bytes = serializer.serialize(artifactId, headers, citizen); + + citizen = deserializer.deserialize(artifactId, headers, bytes); + + Assertions.assertEquals("Carles", citizen.getFirstName()); + Assertions.assertEquals("Arnal", citizen.getLastName()); + Assertions.assertEquals(23, citizen.getAge()); + Assertions.assertEquals("New York", citizen.getCity().getName()); + + citizen.setAge(-1); + + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + + citizen.setAge(23); + city = new City("Kansas CIty", -31); + citizen.setCity(city); + + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + + // invalid identifier present, should fail + identifier = new CitizenIdentifier(-1234356); + citizen.setIdentifier(identifier); + + city = new City("Kansas CIty", 22222); + citizen.setCity(city); + + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + + // no identifier present, should pass + citizen.setIdentifier(null); + serializer.serialize(artifactId, new RecordHeaders(), citizen); + + // valid qualification, should pass + citizen.setQualifications(List.of(new Qualification(UUID.randomUUID().toString(), 6), + new Qualification(UUID.randomUUID().toString(), 7), + new Qualification(UUID.randomUUID().toString(), 8))); + serializer.serialize(artifactId, new RecordHeaders(), citizen); + + // invalid qualification, should fail + citizen.setQualifications(List.of(new Qualification(UUID.randomUUID().toString(), 6), + new Qualification(UUID.randomUUID().toString(), -7), + new Qualification(UUID.randomUUID().toString(), 8))); + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + } + } + + @Test + public void testWithReferencesDeserializerDereferencedComplexUsecase() throws Exception { + InputStream citySchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/types/city/city.json"); + InputStream citizenSchema = getClass().getResourceAsStream("/io/apicurio/registry/util/citizen.json"); + InputStream citizenIdentifier = getClass() + .getResourceAsStream("/io/apicurio/registry/util/types/identifier/citizenIdentifier.json"); + InputStream qualificationSchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/qualification.json"); + InputStream addressSchema = getClass() + .getResourceAsStream("/io/apicurio/registry/util/sample.address.json"); + + InputStream identifierQuarlification = getClass() + .getResourceAsStream("/io/apicurio/registry/util/types/identifier/qualification.json"); + InputStream cityQualification = getClass() + .getResourceAsStream("/io/apicurio/registry/util/types/city/qualification.json"); + + Assertions.assertNotNull(citizenSchema); + Assertions.assertNotNull(citySchema); + Assertions.assertNotNull(citizenIdentifier); + Assertions.assertNotNull(qualificationSchema); + Assertions.assertNotNull(addressSchema); + Assertions.assertNotNull(identifierQuarlification); + Assertions.assertNotNull(cityQualification); + + String groupId = TestUtils.generateGroupId(); + String cityArtifactId = generateArtifactId(); + String qualificationsId = generateArtifactId(); + String identifierArtifactId = generateArtifactId(); + String addressId = generateArtifactId(); + String identifierQualificationId = generateArtifactId(); + String cityQualificationId = generateArtifactId(); + + // Create the two nested qualification schemas, one for the city, and one for the identifier + createArtifact(groupId, identifierQualificationId, ArtifactType.JSON, + IoUtil.toString(identifierQuarlification), ContentTypes.APPLICATION_JSON); + createArtifact(groupId, cityQualificationId, ArtifactType.JSON, IoUtil.toString(cityQualification), + ContentTypes.APPLICATION_JSON); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference cityQualificationReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + cityQualificationReference.setVersion("1"); + cityQualificationReference.setGroupId(groupId); + cityQualificationReference.setArtifactId(cityQualificationId); + cityQualificationReference.setName("qualification.json"); + + // create the city schema with the reference to its qualification + createArtifactWithReferences(groupId, cityArtifactId, ArtifactType.JSON, IoUtil.toString(citySchema), + ContentTypes.APPLICATION_JSON, List.of(cityQualificationReference)); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference identifierQualificationReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + identifierQualificationReference.setVersion("1"); + identifierQualificationReference.setGroupId(groupId); + identifierQualificationReference.setArtifactId(identifierQualificationId); + identifierQualificationReference.setName("qualification.json"); + + // create the identifier schema with the reference to its qualification + createArtifactWithReferences(groupId, identifierArtifactId, ArtifactType.JSON, + IoUtil.toString(citizenIdentifier), ContentTypes.APPLICATION_JSON, + List.of(identifierQualificationReference)); + + // create the main qualification schema, used for the citizen + createArtifact(groupId, qualificationsId, ArtifactType.JSON, IoUtil.toString(qualificationSchema), + ContentTypes.APPLICATION_JSON); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference qualificationsReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + qualificationsReference.setVersion("1"); + qualificationsReference.setGroupId(groupId); + qualificationsReference.setArtifactId(qualificationsId); + qualificationsReference.setName("qualification.json"); + + createArtifact(groupId, addressId, ArtifactType.JSON, IoUtil.toString(addressSchema), + ContentTypes.APPLICATION_JSON); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference addressReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + addressReference.setVersion("1"); + addressReference.setGroupId(groupId); + addressReference.setArtifactId(addressId); + addressReference.setName("sample.address.json"); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference cityReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + cityReference.setVersion("1"); + cityReference.setGroupId(groupId); + cityReference.setArtifactId(cityArtifactId); + cityReference.setName("types/city/city.json"); + + final io.apicurio.registry.rest.v3.beans.ArtifactReference identifierReference = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); + identifierReference.setVersion("1"); + identifierReference.setGroupId(groupId); + identifierReference.setArtifactId(identifierArtifactId); + identifierReference.setName("types/identifier/citizenIdentifier.json"); + + String artifactId = generateArtifactId(); + + // create the citizen schema, with references to qualifications, city, identifier and address + createArtifactWithReferences(groupId, artifactId, ArtifactType.JSON, IoUtil.toString(citizenSchema), + ContentTypes.APPLICATION_JSON, + List.of(qualificationsReference, cityReference, identifierReference, addressReference)); + + City city = new City("New York", 10001); + CitizenIdentifier identifier = new CitizenIdentifier(123456789); + Citizen citizen = new Citizen("Carles", "Arnal", 23, city, identifier, Collections.emptyList()); + + try (JsonSchemaKafkaSerializer serializer = new JsonSchemaKafkaSerializer<>(restClient); + Deserializer deserializer = new JsonSchemaKafkaDeserializer<>(restClient)) { + + Map config = new HashMap<>(); + config.put(SerdeConfig.EXPLICIT_ARTIFACT_GROUP_ID, groupId); + config.put(SerdeConfig.ARTIFACT_RESOLVER_STRATEGY, SimpleTopicIdStrategy.class.getName()); + config.put(SerdeConfig.DEREFERENCE_SCHEMA, "true"); + config.put(SerdeConfig.USE_ID, IdOption.globalId.name()); + config.put(SerdeConfig.VALIDATION_ENABLED, "true"); + config.put(KafkaSerdeConfig.ENABLE_HEADERS, "true"); + serializer.configure(config, false); + + Headers headers = new RecordHeaders(); + byte[] bytes = serializer.serialize(artifactId, headers, citizen); + deserializer.configure(config, false); + + citizen = deserializer.deserialize(artifactId, headers, bytes); + + Assertions.assertEquals("Carles", citizen.getFirstName()); + Assertions.assertEquals("Arnal", citizen.getLastName()); + Assertions.assertEquals(23, citizen.getAge()); + Assertions.assertEquals("New York", citizen.getCity().getName()); + + // invalid qualification, should fail + citizen.setQualifications(List.of(new Qualification(UUID.randomUUID().toString(), 6), + new Qualification(UUID.randomUUID().toString(), -7), + new Qualification(UUID.randomUUID().toString(), 8))); + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + + // invalid city qualification, minimum is 10 should fail + city.setQualification(new CityQualification("city_qualification", 9)); + citizen.setCity(city); + citizen.setQualifications(Collections.emptyList()); + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + + // valid city qualification, should pass + city.setQualification(new CityQualification("city_qualification", 11)); + citizen.setCity(city); + citizen.setQualifications(Collections.emptyList()); + serializer.serialize(artifactId, new RecordHeaders(), citizen); + + // invalid identifier qualification, minimum is 20, should fail + identifier.setIdentifierQualification(new IdentifierQualification("test_subject", 19)); + citizen.setIdentifier(identifier); + try { + serializer.serialize(artifactId, new RecordHeaders(), citizen); + Assertions.fail(); + } catch (Exception ignored) { + } + + // valid identifier qualification + identifier.setIdentifierQualification(new IdentifierQualification("test_subject", 20)); + citizen.setIdentifier(identifier); + serializer.serialize(artifactId, new RecordHeaders(), citizen); + } + } + @Test public void complexObjectValidation() throws Exception { final String version = "8"; diff --git a/app/src/test/java/io/apicurio/registry/noprofile/validity/ValidityRuleApplicationTest.java b/app/src/test/java/io/apicurio/registry/noprofile/validity/ValidityRuleApplicationTest.java index c5c2e0529f..4c0ed7ff4a 100644 --- a/app/src/test/java/io/apicurio/registry/noprofile/validity/ValidityRuleApplicationTest.java +++ b/app/src/test/java/io/apicurio/registry/noprofile/validity/ValidityRuleApplicationTest.java @@ -73,8 +73,8 @@ public void testValidityRuleApplication() throws Exception { clientV3.groups().byGroupId(GroupId.DEFAULT.getRawGroupIdWithDefaultString()).artifacts() .byArtifactId(artifactId).rules().post(createRule); - var exception = Assertions.assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, - () -> { + var exception = Assertions.assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { createArtifactVersion(artifactId, INVALID_SCHEMA, ContentTypes.APPLICATION_JSON); }); assertEquals("RuleViolationException", exception.getName()); @@ -91,8 +91,8 @@ public void testValidityRuleApplication_Map() throws Exception { clientV3.groups().byGroupId(GroupId.DEFAULT.getRawGroupIdWithDefaultString()).artifacts() .byArtifactId(artifactId).rules().post(createRule); - var exception = Assertions.assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, - () -> { + var exception = Assertions.assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { createArtifactVersion(artifactId, INVALID_SCHEMA_WITH_MAP, ContentTypes.APPLICATION_JSON); }); assertEquals("RuleViolationException", exception.getName()); @@ -116,8 +116,8 @@ public void testValidityRuleGroupConfig() throws Exception { clientV3.groups().byGroupId(groupId).rules().post(createRule); // Try to create an invalid artifact in that group - var exception = Assertions.assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, - () -> { + var exception = Assertions.assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { createArtifact(groupId, artifactId, ArtifactType.AVRO, INVALID_SCHEMA, ContentTypes.APPLICATION_JSON); }); @@ -137,8 +137,8 @@ public void testValidityRuleGlobalConfig() throws Exception { clientV3.admin().rules().post(createRule); // Try to create an invalid artifact - var exception = Assertions.assertThrows(io.apicurio.registry.rest.client.models.ProblemDetails.class, - () -> { + var exception = Assertions.assertThrows( + io.apicurio.registry.rest.client.models.RuleViolationProblemDetails.class, () -> { createArtifact(groupId, artifactId, ArtifactType.AVRO, INVALID_SCHEMA, ContentTypes.APPLICATION_JSON); }); diff --git a/app/src/test/java/io/apicurio/registry/rbac/RegistryClientTest.java b/app/src/test/java/io/apicurio/registry/rbac/RegistryClientTest.java index 2a2e0f9ab3..19831bf090 100644 --- a/app/src/test/java/io/apicurio/registry/rbac/RegistryClientTest.java +++ b/app/src/test/java/io/apicurio/registry/rbac/RegistryClientTest.java @@ -33,7 +33,7 @@ import io.apicurio.registry.rest.client.models.VersionSearchResults; import io.apicurio.registry.rest.client.models.VersionState; import io.apicurio.registry.rest.v2.beans.ArtifactContent; -import io.apicurio.registry.storage.impl.sql.SqlUtil; +import io.apicurio.registry.storage.impl.sql.RegistryContentUtils; import io.apicurio.registry.types.ArtifactType; import io.apicurio.registry.types.ContentTypes; import io.apicurio.registry.utils.IoUtil; @@ -928,7 +928,7 @@ public void getContentByHash() throws Exception { createArtifactWithReferences(groupId, secondArtifactId, artifactReferences); - String referencesSerialized = SqlUtil + String referencesSerialized = RegistryContentUtils .serializeReferences(toReferenceDtos(artifactReferences.stream().map(r -> { var ref = new io.apicurio.registry.rest.v3.beans.ArtifactReference(); ref.setArtifactId(r.getArtifactId()); diff --git a/app/src/test/java/io/apicurio/registry/storage/impl/readonly/ReadOnlyRegistryStorageTest.java b/app/src/test/java/io/apicurio/registry/storage/impl/readonly/ReadOnlyRegistryStorageTest.java index 3ee274eef8..ac40a41635 100644 --- a/app/src/test/java/io/apicurio/registry/storage/impl/readonly/ReadOnlyRegistryStorageTest.java +++ b/app/src/test/java/io/apicurio/registry/storage/impl/readonly/ReadOnlyRegistryStorageTest.java @@ -154,7 +154,6 @@ public class ReadOnlyRegistryStorageTest { entry("resetContentId0", new State(true, RegistryStorage::resetContentId)), entry("resetCommentId0", new State(true, RegistryStorage::resetCommentId)), entry("resetGlobalId0", new State(true, RegistryStorage::resetGlobalId)), - entry("resolveReferences1", new State(false, s -> s.resolveReferences(null))), entry("searchArtifacts5", new State(false, s -> s.searchArtifacts(null, null, null, 0, 0))), entry("searchGroups5", new State(false, s -> s.searchGroups(null, null, null, null, null))), entry("searchVersions5", new State(false, s -> s.searchVersions(null, null, null, 0, 0))), @@ -191,7 +190,8 @@ public class ReadOnlyRegistryStorageTest { entry("createSnapshot1", new State(true, s -> s.createSnapshot(null))), entry("upgradeData3", new State(true, s -> s.upgradeData(null, false, false))), entry("createEvent1", new State(true, s -> s.createEvent(null))), - entry("supportsDatabaseEvents0", new State(true, s -> s.createEvent(null)))); + entry("supportsDatabaseEvents0", new State(true, s -> s.createEvent(null))), + entry("getContentByReference1", new State(true, s -> s.getContentByReference(null)))); CURRENT_METHODS = Arrays.stream(RegistryStorage.class.getMethods()) .map(m -> m.getName() + m.getParameterCount()).collect(Collectors.toSet()); diff --git a/app/src/test/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtilsTest.java b/app/src/test/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtilsTest.java new file mode 100644 index 0000000000..42722a5ca1 --- /dev/null +++ b/app/src/test/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtilsTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2020 Red Hat Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.apicurio.registry.storage.impl.sql; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.*; + +/** + * @author eric.wittmann@gmail.com + */ +public class RegistryContentUtilsTest { + + @Test + void testSerializeLabels() { + Map props = new HashMap<>(); + props.put("one", "1"); + props.put("two", "2"); + props.put("three", "3"); + String actual = RegistryContentUtils.serializeLabels(props); + String expected = "{\"one\":\"1\",\"two\":\"2\",\"three\":\"3\"}"; + Assertions.assertEquals(expected, actual); + } + + @Test + void testDeserializeLabels() { + String propsStr = "{\"one\":\"1\",\"two\":\"2\",\"three\":\"3\"}"; + Map actual = RegistryContentUtils.deserializeLabels(propsStr); + Assertions.assertNotNull(actual); + Map expected = new HashMap<>(); + expected.put("one", "1"); + expected.put("two", "2"); + expected.put("three", "3"); + Assertions.assertEquals(expected, actual); + } +} \ No newline at end of file diff --git a/app/src/test/java/io/apicurio/registry/storage/impl/sql/SqlUtilTest.java b/app/src/test/java/io/apicurio/registry/storage/impl/sql/SqlUtilTest.java deleted file mode 100644 index cf3572b7d0..0000000000 --- a/app/src/test/java/io/apicurio/registry/storage/impl/sql/SqlUtilTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package io.apicurio.registry.storage.impl.sql; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import java.util.HashMap; -import java.util.Map; - -class SqlUtilTest { - - /** - * Test method for {@link io.apicurio.registry.storage.impl.sql.SqlUtil#serializeLabels(java.util.Map)}. - */ - @Test - void testSerializeLabels() { - Map labels = new HashMap<>(); - labels.put("one", "1"); - labels.put("two", "2"); - labels.put("three", "3"); - String actual = SqlUtil.serializeLabels(labels); - String expected = "{\"one\":\"1\",\"two\":\"2\",\"three\":\"3\"}"; - Assertions.assertEquals(expected, actual); - } - - /** - * Test method for - * {@link io.apicurio.registry.storage.impl.sql.SqlUtil#deserializeLabels(java.lang.String)}. - */ - @Test - void testDeserializeLabels() { - String labelsStr = "{\"one\":\"1\",\"two\":\"2\",\"three\":\"3\"}"; - Map actual = SqlUtil.deserializeLabels(labelsStr); - Assertions.assertNotNull(actual); - Map expected = new HashMap<>(); - expected.put("one", "1"); - expected.put("two", "2"); - expected.put("three", "3"); - Assertions.assertEquals(expected, actual); - } - -} diff --git a/app/src/test/java/io/apicurio/registry/support/CitizenIdentifier.java b/app/src/test/java/io/apicurio/registry/support/CitizenIdentifier.java index 4f2619a1a8..b65786d0aa 100644 --- a/app/src/test/java/io/apicurio/registry/support/CitizenIdentifier.java +++ b/app/src/test/java/io/apicurio/registry/support/CitizenIdentifier.java @@ -7,6 +7,9 @@ public class CitizenIdentifier { @JsonProperty("identifier") private Integer identifier; + @JsonProperty("qualification") + private IdentifierQualification identifierQualification; + public CitizenIdentifier() { } @@ -14,6 +17,11 @@ public CitizenIdentifier(Integer identifier) { this.identifier = identifier; } + public CitizenIdentifier(Integer identifier, IdentifierQualification identifierQualification) { + this.identifier = identifier; + this.identifierQualification = identifierQualification; + } + public Integer getIdentifier() { return identifier; } @@ -21,4 +29,12 @@ public Integer getIdentifier() { public void setIdentifier(Integer identifier) { this.identifier = identifier; } + + public IdentifierQualification getIdentifierQualification() { + return identifierQualification; + } + + public void setIdentifierQualification(IdentifierQualification identifierQualification) { + this.identifierQualification = identifierQualification; + } } diff --git a/app/src/test/java/io/apicurio/registry/support/City.java b/app/src/test/java/io/apicurio/registry/support/City.java index 30c40ebac5..d5c6167180 100644 --- a/app/src/test/java/io/apicurio/registry/support/City.java +++ b/app/src/test/java/io/apicurio/registry/support/City.java @@ -10,6 +10,9 @@ public class City { @JsonProperty("zipCode") private Integer zipCode; + @JsonProperty("qualification") + private CityQualification qualification; + public City() { } @@ -18,6 +21,12 @@ public City(String name, Integer zipCode) { this.zipCode = zipCode; } + public City(String name, Integer zipCode, CityQualification cityQualification) { + this.name = name; + this.zipCode = zipCode; + this.qualification = cityQualification; + } + public String getName() { return name; } @@ -33,4 +42,12 @@ public Integer getZipCode() { public void setZipCode(Integer zipCode) { this.zipCode = zipCode; } + + public CityQualification getQualification() { + return qualification; + } + + public void setQualification(CityQualification qualification) { + this.qualification = qualification; + } } diff --git a/app/src/test/java/io/apicurio/registry/support/CityQualification.java b/app/src/test/java/io/apicurio/registry/support/CityQualification.java new file mode 100644 index 0000000000..04aaa65799 --- /dev/null +++ b/app/src/test/java/io/apicurio/registry/support/CityQualification.java @@ -0,0 +1,36 @@ +package io.apicurio.registry.support; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CityQualification { + + @JsonProperty("subject_name") + private String subjectName; + + @JsonProperty("qualification") + private int qualification; + + public CityQualification() { + } + + public CityQualification(String subjectName, int qualification) { + this.subjectName = subjectName; + this.qualification = qualification; + } + + public String getSubjectName() { + return subjectName; + } + + public void setSubjectName(String subjectName) { + this.subjectName = subjectName; + } + + public int getQualification() { + return qualification; + } + + public void setQualification(int qualification) { + this.qualification = qualification; + } +} diff --git a/app/src/test/java/io/apicurio/registry/support/IdentifierQualification.java b/app/src/test/java/io/apicurio/registry/support/IdentifierQualification.java new file mode 100644 index 0000000000..731c4d4ffb --- /dev/null +++ b/app/src/test/java/io/apicurio/registry/support/IdentifierQualification.java @@ -0,0 +1,36 @@ +package io.apicurio.registry.support; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class IdentifierQualification { + + @JsonProperty("subject_name") + private String subjectName; + + @JsonProperty("qualification") + private int qualification; + + public IdentifierQualification() { + } + + public IdentifierQualification(String subjectName, int qualification) { + this.subjectName = subjectName; + this.qualification = qualification; + } + + public String getSubjectName() { + return subjectName; + } + + public void setSubjectName(String subjectName) { + this.subjectName = subjectName; + } + + public int getQualification() { + return qualification; + } + + public void setQualification(int qualification) { + this.qualification = qualification; + } +} diff --git a/app/src/test/resources/io/apicurio/registry/util/citizen.json b/app/src/test/resources/io/apicurio/registry/util/citizen.json index 700fb09a83..daa67f08e4 100644 --- a/app/src/test/resources/io/apicurio/registry/util/citizen.json +++ b/app/src/test/resources/io/apicurio/registry/util/citizen.json @@ -18,10 +18,10 @@ "minimum": 0 }, "city": { - "$ref": "city.json" + "$ref": "types/city/city.json" }, "identifier": { - "$ref": "citizenIdentifier.json" + "$ref": "types/identifier/citizenIdentifier.json" }, "qualifications": { "type": "array", diff --git a/app/src/test/resources/io/apicurio/registry/util/citizen1.json b/app/src/test/resources/io/apicurio/registry/util/citizen1.json new file mode 100644 index 0000000000..abea24149f --- /dev/null +++ b/app/src/test/resources/io/apicurio/registry/util/citizen1.json @@ -0,0 +1,36 @@ +{ + "$id": "https://example.com/citizen1.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Citizen", + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "The citizen's first name." + }, + "lastName": { + "type": "string", + "description": "The citizen's last name." + }, + "age": { + "description": "Age in years which must be equal to or greater than zero.", + "type": "integer", + "minimum": 0 + }, + "city": { + "$ref": "city1.json" + }, + "identifier": { + "$ref": "citizenIdentifier1.json" + }, + "qualifications": { + "type": "array", + "items": { + "$ref": "qualification.json" + } + } + }, + "required": [ + "city" + ] +} \ No newline at end of file diff --git a/app/src/test/resources/io/apicurio/registry/util/citizenIdentifier.json b/app/src/test/resources/io/apicurio/registry/util/citizenIdentifier1.json similarity index 81% rename from app/src/test/resources/io/apicurio/registry/util/citizenIdentifier.json rename to app/src/test/resources/io/apicurio/registry/util/citizenIdentifier1.json index 3a896e55f0..2b4c20118a 100644 --- a/app/src/test/resources/io/apicurio/registry/util/citizenIdentifier.json +++ b/app/src/test/resources/io/apicurio/registry/util/citizenIdentifier1.json @@ -1,5 +1,5 @@ { - "$id": "https://example.com/citizenIdentifier.json", + "$id": "https://example.com/citizenIdentifier1.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Identifier", "type": "object", diff --git a/app/src/test/resources/io/apicurio/registry/util/city.json b/app/src/test/resources/io/apicurio/registry/util/city1.json similarity index 87% rename from app/src/test/resources/io/apicurio/registry/util/city.json rename to app/src/test/resources/io/apicurio/registry/util/city1.json index a86e3e473c..a02d7ef37e 100644 --- a/app/src/test/resources/io/apicurio/registry/util/city.json +++ b/app/src/test/resources/io/apicurio/registry/util/city1.json @@ -1,5 +1,5 @@ { - "$id": "https://example.com/city.json", + "$id": "https://example.com/city1.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "City", "type": "object", diff --git a/app/src/test/resources/io/apicurio/registry/util/types/city/city.json b/app/src/test/resources/io/apicurio/registry/util/types/city/city.json new file mode 100644 index 0000000000..66a1105c0a --- /dev/null +++ b/app/src/test/resources/io/apicurio/registry/util/types/city/city.json @@ -0,0 +1,20 @@ +{ + "$id": "https://example.com/types/city/city.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "City", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The city's name." + }, + "zipCode": { + "type": "integer", + "description": "The zip code.", + "minimum": 0 + }, + "qualification": { + "$ref": "qualification.json" + } + } +} \ No newline at end of file diff --git a/app/src/test/resources/io/apicurio/registry/util/types/city/qualification.json b/app/src/test/resources/io/apicurio/registry/util/types/city/qualification.json new file mode 100644 index 0000000000..4f19d81a31 --- /dev/null +++ b/app/src/test/resources/io/apicurio/registry/util/types/city/qualification.json @@ -0,0 +1,17 @@ +{ + "$id": "https://example.com/types/city/qualification.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Qualification", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The subject's name" + }, + "qualification": { + "type": "integer", + "description": "The city qualification", + "minimum": 10 + } + } +} \ No newline at end of file diff --git a/app/src/test/resources/io/apicurio/registry/util/types/identifier/citizenIdentifier.json b/app/src/test/resources/io/apicurio/registry/util/types/identifier/citizenIdentifier.json new file mode 100644 index 0000000000..0c4677f84a --- /dev/null +++ b/app/src/test/resources/io/apicurio/registry/util/types/identifier/citizenIdentifier.json @@ -0,0 +1,16 @@ +{ + "$id": "https://example.com/types/identifier/citizenIdentifier.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Identifier", + "type": "object", + "properties": { + "identifier": { + "type": "integer", + "description": "The citizen identifier.", + "minimum": 0 + }, + "qualification": { + "$ref": "qualification.json" + } + } +} \ No newline at end of file diff --git a/app/src/test/resources/io/apicurio/registry/util/types/identifier/qualification.json b/app/src/test/resources/io/apicurio/registry/util/types/identifier/qualification.json new file mode 100644 index 0000000000..931557b9d1 --- /dev/null +++ b/app/src/test/resources/io/apicurio/registry/util/types/identifier/qualification.json @@ -0,0 +1,17 @@ +{ + "$id": "https://example.com/types/identifier/qualification.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Qualification", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The subject's name" + }, + "qualification": { + "type": "integer", + "description": "The identifier qualification", + "minimum": 20 + } + } +} \ No newline at end of file diff --git a/docs/modules/ROOT/partials/getting-started/ref-registry-all-configs.adoc b/docs/modules/ROOT/partials/getting-started/ref-registry-all-configs.adoc index d517ffa076..81b6fcbe87 100644 --- a/docs/modules/ROOT/partials/getting-started/ref-registry-all-configs.adoc +++ b/docs/modules/ROOT/partials/getting-started/ref-registry-all-configs.adoc @@ -17,11 +17,6 @@ The following {registry} configuration options are available for each component |`false` |`2.1.4.Final` |Include stack trace in errors responses -|`apicurio.apis.v2.base-href` -|`string` -|`_` -|`2.5.0.Final` -|API base href (URI) |`apicurio.apis.v3.base-href` |`string` |`_` diff --git a/examples/pom.xml b/examples/pom.xml index 6be229369d..711e55ede6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -92,10 +92,10 @@ 3.13.0 3.1.3 - 3.5.0 - 3.10.0 + 3.5.1 + 3.10.1 3.3.1 - 3.5.0 + 3.5.1 3.4.2 1.2.1 3.8.0 diff --git a/examples/serdes-with-references/pom.xml b/examples/serdes-with-references/pom.xml index ea9d3443a8..5546372be2 100644 --- a/examples/serdes-with-references/pom.xml +++ b/examples/serdes-with-references/pom.xml @@ -14,7 +14,7 @@ ${project.basedir}/../.. 3.25.5 0.6.1 - 2.45.1 + 2.46.0 diff --git a/go-sdk/generate.sh b/go-sdk/generate.sh index a3acf73242..9154ae945e 100755 --- a/go-sdk/generate.sh +++ b/go-sdk/generate.sh @@ -10,7 +10,7 @@ if [[ $OSTYPE == 'darwin'* ]]; then fi # TODO move the kiota-version.csproj to it's own folder? -VERSION=$(cat $SCRIPT_DIR/kiota-version.csproj | grep Version | sed -n 's/.*Version="\([^"]*\)".*/\1/p') +VERSION=$(cat $SCRIPT_DIR/go-sdk.csproj | grep Version | sed -n 's/.*Version="\([^"]*\)".*/\1/p') URL="https://github.com/microsoft/kiota/releases/download/v${VERSION}/${PACKAGE_NAME}.zip" # COMMAND="kiota" diff --git a/go-sdk/go-sdk.csproj b/go-sdk/go-sdk.csproj new file mode 100644 index 0000000000..955c7b7209 --- /dev/null +++ b/go-sdk/go-sdk.csproj @@ -0,0 +1,12 @@ + + + + net8.0 + go_sdk + + + + + + + diff --git a/go-sdk/kiota-version.csproj b/go-sdk/kiota-version.csproj deleted file mode 100644 index 24cd4cb6df..0000000000 --- a/go-sdk/kiota-version.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/go-sdk/pkg/registryclient-v2/admin/admin_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/admin_request_builder.go index da4a2a916c..ed74f45b1a 100644 --- a/go-sdk/pkg/registryclient-v2/admin/admin_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/admin_request_builder.go @@ -10,11 +10,13 @@ type AdminRequestBuilder struct { } // ArtifactTypes the list of artifact types supported by this instance of Registry. +// returns a *ArtifactTypesRequestBuilder when successful func (m *AdminRequestBuilder) ArtifactTypes() *ArtifactTypesRequestBuilder { return NewArtifactTypesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Config the config property +// returns a *ConfigRequestBuilder when successful func (m *AdminRequestBuilder) Config() *ConfigRequestBuilder { return NewConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -35,21 +37,25 @@ func NewAdminRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb } // Export provides a way to export registry data. +// returns a *ExportRequestBuilder when successful func (m *AdminRequestBuilder) Export() *ExportRequestBuilder { return NewExportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ImportEscaped provides a way to import data into the registry. +// returns a *ImportRequestBuilder when successful func (m *AdminRequestBuilder) ImportEscaped() *ImportRequestBuilder { return NewImportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // RoleMappings collection to manage role mappings for authenticated principals +// returns a *RoleMappingsRequestBuilder when successful func (m *AdminRequestBuilder) RoleMappings() *RoleMappingsRequestBuilder { return NewRoleMappingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Rules manage the global rules that apply to all artifacts if not otherwise configured. +// returns a *RulesRequestBuilder when successful func (m *AdminRequestBuilder) Rules() *RulesRequestBuilder { return NewRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/artifact_types_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/artifact_types_request_builder.go index 4411ee1a3f..d1a056e527 100644 --- a/go-sdk/pkg/registryclient-v2/admin/artifact_types_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/artifact_types_request_builder.go @@ -35,6 +35,8 @@ func NewArtifactTypesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee } // Get gets a list of all the configured artifact types.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactTypeInfoable when successful +// returns a Error error when the service returns a 500 status code func (m *ArtifactTypesRequestBuilder) Get(ctx context.Context, requestConfiguration *ArtifactTypesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactTypeInfoable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -57,6 +59,7 @@ func (m *ArtifactTypesRequestBuilder) Get(ctx context.Context, requestConfigurat } // ToGetRequestInformation gets a list of all the configured artifact types.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ArtifactTypesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ArtifactTypesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -68,6 +71,7 @@ func (m *ArtifactTypesRequestBuilder) ToGetRequestInformation(ctx context.Contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ArtifactTypesRequestBuilder when successful func (m *ArtifactTypesRequestBuilder) WithUrl(rawUrl string) *ArtifactTypesRequestBuilder { return NewArtifactTypesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/config_properties_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/config_properties_request_builder.go index c58588ad5c..3c4065ce80 100644 --- a/go-sdk/pkg/registryclient-v2/admin/config_properties_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/config_properties_request_builder.go @@ -20,6 +20,7 @@ type ConfigPropertiesRequestBuilderGetRequestConfiguration struct { } // ByPropertyName manage a single configuration property (by name). +// returns a *ConfigPropertiesWithPropertyNameItemRequestBuilder when successful func (m *ConfigPropertiesRequestBuilder) ByPropertyName(propertyName string) *ConfigPropertiesWithPropertyNameItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -31,7 +32,7 @@ func (m *ConfigPropertiesRequestBuilder) ByPropertyName(propertyName string) *Co return NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewConfigPropertiesRequestBuilderInternal instantiates a new PropertiesRequestBuilder and sets the default values. +// NewConfigPropertiesRequestBuilderInternal instantiates a new ConfigPropertiesRequestBuilder and sets the default values. func NewConfigPropertiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesRequestBuilder { m := &ConfigPropertiesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/config/properties", pathParameters), @@ -39,7 +40,7 @@ func NewConfigPropertiesRequestBuilderInternal(pathParameters map[string]string, return m } -// NewConfigPropertiesRequestBuilder instantiates a new PropertiesRequestBuilder and sets the default values. +// NewConfigPropertiesRequestBuilder instantiates a new ConfigPropertiesRequestBuilder and sets the default values. func NewConfigPropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -47,6 +48,8 @@ func NewConfigPropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d } // Get returns a list of all configuration properties that have been set. The list is not paged.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ConfigurationPropertyable when successful +// returns a Error error when the service returns a 500 status code func (m *ConfigPropertiesRequestBuilder) Get(ctx context.Context, requestConfiguration *ConfigPropertiesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ConfigurationPropertyable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -69,6 +72,7 @@ func (m *ConfigPropertiesRequestBuilder) Get(ctx context.Context, requestConfigu } // ToGetRequestInformation returns a list of all configuration properties that have been set. The list is not paged.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ConfigPropertiesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -80,6 +84,7 @@ func (m *ConfigPropertiesRequestBuilder) ToGetRequestInformation(ctx context.Con } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ConfigPropertiesRequestBuilder when successful func (m *ConfigPropertiesRequestBuilder) WithUrl(rawUrl string) *ConfigPropertiesRequestBuilder { return NewConfigPropertiesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/config_properties_with_property_name_item_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/config_properties_with_property_name_item_request_builder.go index 0fdc8f5e83..672f7c718d 100644 --- a/go-sdk/pkg/registryclient-v2/admin/config_properties_with_property_name_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/config_properties_with_property_name_item_request_builder.go @@ -35,7 +35,7 @@ type ConfigPropertiesWithPropertyNameItemRequestBuilderPutRequestConfiguration s Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal instantiates a new WithPropertyNameItemRequestBuilder and sets the default values. +// NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal instantiates a new ConfigPropertiesWithPropertyNameItemRequestBuilder and sets the default values. func NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesWithPropertyNameItemRequestBuilder { m := &ConfigPropertiesWithPropertyNameItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/config/properties/{propertyName}", pathParameters), @@ -43,7 +43,7 @@ func NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal(pathParameter return m } -// NewConfigPropertiesWithPropertyNameItemRequestBuilder instantiates a new WithPropertyNameItemRequestBuilder and sets the default values. +// NewConfigPropertiesWithPropertyNameItemRequestBuilder instantiates a new ConfigPropertiesWithPropertyNameItemRequestBuilder and sets the default values. func NewConfigPropertiesWithPropertyNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesWithPropertyNameItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewConfigPropertiesWithPropertyNameItemRequestBuilder(rawUrl string, reques } // Delete resets the value of a single configuration property. This will return the property toits default value (see external documentation for supported properties and their defaultvalues).This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Delete(ctx context. } // Get returns the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ConfigurationPropertyable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ConfigurationPropertyable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,8 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Get(ctx context.Con } // Put updates the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateConfigurationPropertyable, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -105,6 +112,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Put(ctx context.Con } // ToDeleteRequestInformation resets the value of a single configuration property. This will return the property toits default value (see external documentation for supported properties and their defaultvalues).This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -116,6 +124,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToDeleteRequestInfo } // ToGetRequestInformation returns the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,6 +136,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToGetRequestInforma } // ToPutRequestInformation updates the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateConfigurationPropertyable, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -142,6 +152,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToPutRequestInforma } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ConfigPropertiesWithPropertyNameItemRequestBuilder when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) WithUrl(rawUrl string) *ConfigPropertiesWithPropertyNameItemRequestBuilder { return NewConfigPropertiesWithPropertyNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/config_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/config_request_builder.go index 6c68acadeb..31456b8e75 100644 --- a/go-sdk/pkg/registryclient-v2/admin/config_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/config_request_builder.go @@ -25,6 +25,7 @@ func NewConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Properties manage configuration properties. +// returns a *ConfigPropertiesRequestBuilder when successful func (m *ConfigRequestBuilder) Properties() *ConfigPropertiesRequestBuilder { return NewConfigPropertiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/export_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/export_request_builder.go index d2940aaba4..93c2d2b6b9 100644 --- a/go-sdk/pkg/registryclient-v2/admin/export_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/export_request_builder.go @@ -43,6 +43,8 @@ func NewExportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get exports registry data as a ZIP archive. +// returns a DownloadRefable when successful +// returns a Error error when the service returns a 500 status code func (m *ExportRequestBuilder) Get(ctx context.Context, requestConfiguration *ExportRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.DownloadRefable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -62,6 +64,7 @@ func (m *ExportRequestBuilder) Get(ctx context.Context, requestConfiguration *Ex } // ToGetRequestInformation exports registry data as a ZIP archive. +// returns a *RequestInformation when successful func (m *ExportRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ExportRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -76,6 +79,7 @@ func (m *ExportRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ExportRequestBuilder when successful func (m *ExportRequestBuilder) WithUrl(rawUrl string) *ExportRequestBuilder { return NewExportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/import_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/import_request_builder.go index ac2235fa5c..4d47425c3e 100644 --- a/go-sdk/pkg/registryclient-v2/admin/import_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/import_request_builder.go @@ -35,6 +35,7 @@ func NewImportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Post imports registry data that was previously exported using the `/admin/export` operation. +// returns a Error error when the service returns a 500 status code func (m *ImportRequestBuilder) Post(ctx context.Context, body []byte, requestConfiguration *ImportRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -51,6 +52,7 @@ func (m *ImportRequestBuilder) Post(ctx context.Context, body []byte, requestCon } // ToPostRequestInformation imports registry data that was previously exported using the `/admin/export` operation. +// returns a *RequestInformation when successful func (m *ImportRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, requestConfiguration *ImportRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -63,6 +65,7 @@ func (m *ImportRequestBuilder) ToPostRequestInformation(ctx context.Context, bod } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ImportRequestBuilder when successful func (m *ImportRequestBuilder) WithUrl(rawUrl string) *ImportRequestBuilder { return NewImportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/role_mappings_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/role_mappings_request_builder.go index c99bf8b258..2fc64f57bb 100644 --- a/go-sdk/pkg/registryclient-v2/admin/role_mappings_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/role_mappings_request_builder.go @@ -28,6 +28,7 @@ type RoleMappingsRequestBuilderPostRequestConfiguration struct { } // ByPrincipalId manage the configuration of a single role mapping. +// returns a *RoleMappingsWithPrincipalItemRequestBuilder when successful func (m *RoleMappingsRequestBuilder) ByPrincipalId(principalId string) *RoleMappingsWithPrincipalItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -55,6 +56,8 @@ func NewRoleMappingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 } // Get gets a list of all role mappings configured in the registry (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a []RoleMappingable when successful +// returns a Error error when the service returns a 500 status code func (m *RoleMappingsRequestBuilder) Get(ctx context.Context, requestConfiguration *RoleMappingsRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.RoleMappingable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -77,6 +80,7 @@ func (m *RoleMappingsRequestBuilder) Get(ctx context.Context, requestConfigurati } // Post creates a new mapping between a user/principal and a role.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 500 status code func (m *RoleMappingsRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.RoleMappingable, requestConfiguration *RoleMappingsRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -93,6 +97,7 @@ func (m *RoleMappingsRequestBuilder) Post(ctx context.Context, body i80228d093fd } // ToGetRequestInformation gets a list of all role mappings configured in the registry (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RoleMappingsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -104,6 +109,7 @@ func (m *RoleMappingsRequestBuilder) ToGetRequestInformation(ctx context.Context } // ToPostRequestInformation creates a new mapping between a user/principal and a role.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.RoleMappingable, requestConfiguration *RoleMappingsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -119,6 +125,7 @@ func (m *RoleMappingsRequestBuilder) ToPostRequestInformation(ctx context.Contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RoleMappingsRequestBuilder when successful func (m *RoleMappingsRequestBuilder) WithUrl(rawUrl string) *RoleMappingsRequestBuilder { return NewRoleMappingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/role_mappings_with_principal_item_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/role_mappings_with_principal_item_request_builder.go index cc72b2d1ef..6b32628b57 100644 --- a/go-sdk/pkg/registryclient-v2/admin/role_mappings_with_principal_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/role_mappings_with_principal_item_request_builder.go @@ -35,7 +35,7 @@ type RoleMappingsWithPrincipalItemRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewRoleMappingsWithPrincipalItemRequestBuilderInternal instantiates a new WithPrincipalItemRequestBuilder and sets the default values. +// NewRoleMappingsWithPrincipalItemRequestBuilderInternal instantiates a new RoleMappingsWithPrincipalItemRequestBuilder and sets the default values. func NewRoleMappingsWithPrincipalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RoleMappingsWithPrincipalItemRequestBuilder { m := &RoleMappingsWithPrincipalItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/roleMappings/{principalId}", pathParameters), @@ -43,7 +43,7 @@ func NewRoleMappingsWithPrincipalItemRequestBuilderInternal(pathParameters map[s return m } -// NewRoleMappingsWithPrincipalItemRequestBuilder instantiates a new WithPrincipalItemRequestBuilder and sets the default values. +// NewRoleMappingsWithPrincipalItemRequestBuilder instantiates a new RoleMappingsWithPrincipalItemRequestBuilder and sets the default values. func NewRoleMappingsWithPrincipalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RoleMappingsWithPrincipalItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewRoleMappingsWithPrincipalItemRequestBuilder(rawUrl string, requestAdapte } // Delete deletes a single role mapping, effectively denying access to a user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *RoleMappingsWithPrincipalItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) Delete(ctx context.Context } // Get gets the details of a single role mapping (by `principalId`).This operation can fail for the following reasons:* No role mapping for the `principalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a RoleMappingable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *RoleMappingsWithPrincipalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.RoleMappingable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,8 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) Get(ctx context.Context, r } // Put updates a single role mapping for one user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *RoleMappingsWithPrincipalItemRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateRoleable, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -105,6 +112,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) Put(ctx context.Context, b } // ToDeleteRequestInformation deletes a single role mapping, effectively denying access to a user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -116,6 +124,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToDeleteRequestInformation } // ToGetRequestInformation gets the details of a single role mapping (by `principalId`).This operation can fail for the following reasons:* No role mapping for the `principalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,6 +136,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToGetRequestInformation(ct } // ToPutRequestInformation updates a single role mapping for one user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateRoleable, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -142,6 +152,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToPutRequestInformation(ct } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RoleMappingsWithPrincipalItemRequestBuilder when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) WithUrl(rawUrl string) *RoleMappingsWithPrincipalItemRequestBuilder { return NewRoleMappingsWithPrincipalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/rules_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/rules_request_builder.go index c763508f70..9f0bd91fc7 100644 --- a/go-sdk/pkg/registryclient-v2/admin/rules_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/rules_request_builder.go @@ -36,6 +36,7 @@ type RulesRequestBuilderPostRequestConfiguration struct { } // ByRule manage the configuration of a single global artifact rule. +// returns a *RulesWithRuleItemRequestBuilder when successful func (m *RulesRequestBuilder) ByRule(rule string) *RulesWithRuleItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -63,6 +64,7 @@ func NewRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb } // Delete deletes all globally configured rules.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 500 status code func (m *RulesRequestBuilder) Delete(ctx context.Context, requestConfiguration *RulesRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -79,6 +81,8 @@ func (m *RulesRequestBuilder) Delete(ctx context.Context, requestConfiguration * } // Get gets a list of all the currently configured global rules (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a []RuleType when successful +// returns a Error error when the service returns a 500 status code func (m *RulesRequestBuilder) Get(ctx context.Context, requestConfiguration *RulesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.RuleType, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -101,6 +105,9 @@ func (m *RulesRequestBuilder) Get(ctx context.Context, requestConfiguration *Rul } // Post adds a rule to the list of globally configured rules.This operation can fail for the following reasons:* The rule type is unknown (HTTP error `400`)* The rule already exists (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 400 status code +// returns a Error error when the service returns a 409 status code +// returns a Error error when the service returns a 500 status code func (m *RulesRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *RulesRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -119,6 +126,7 @@ func (m *RulesRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec } // ToDeleteRequestInformation deletes all globally configured rules.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *RulesRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +138,7 @@ func (m *RulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, re } // ToGetRequestInformation gets a list of all the currently configured global rules (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RulesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -141,6 +150,7 @@ func (m *RulesRequestBuilder) ToGetRequestInformation(ctx context.Context, reque } // ToPostRequestInformation adds a rule to the list of globally configured rules.This operation can fail for the following reasons:* The rule type is unknown (HTTP error `400`)* The rule already exists (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *RulesRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -156,6 +166,7 @@ func (m *RulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RulesRequestBuilder when successful func (m *RulesRequestBuilder) WithUrl(rawUrl string) *RulesRequestBuilder { return NewRulesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/admin/rules_with_rule_item_request_builder.go b/go-sdk/pkg/registryclient-v2/admin/rules_with_rule_item_request_builder.go index 2556bdd1be..bff278bfa3 100644 --- a/go-sdk/pkg/registryclient-v2/admin/rules_with_rule_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/admin/rules_with_rule_item_request_builder.go @@ -35,7 +35,7 @@ type RulesWithRuleItemRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewRulesWithRuleItemRequestBuilderInternal instantiates a new WithRuleItemRequestBuilder and sets the default values. +// NewRulesWithRuleItemRequestBuilderInternal instantiates a new RulesWithRuleItemRequestBuilder and sets the default values. func NewRulesWithRuleItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RulesWithRuleItemRequestBuilder { m := &RulesWithRuleItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/rules/{rule}", pathParameters), @@ -43,7 +43,7 @@ func NewRulesWithRuleItemRequestBuilderInternal(pathParameters map[string]string return m } -// NewRulesWithRuleItemRequestBuilder instantiates a new WithRuleItemRequestBuilder and sets the default values. +// NewRulesWithRuleItemRequestBuilder instantiates a new RulesWithRuleItemRequestBuilder and sets the default values. func NewRulesWithRuleItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RulesWithRuleItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewRulesWithRuleItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7 } // Delete deletes a single global rule. If this is the only rule configured, this is the sameas deleting **all** rules.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* Rule cannot be deleted (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *RulesWithRuleItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *RulesWithRuleItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *RulesWithRuleItemRequestBuilder) Delete(ctx context.Context, requestCon } // Get returns information about the named globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *RulesWithRuleItemRequestBuilder) Get(ctx context.Context, requestConfiguration *RulesWithRuleItemRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,9 @@ func (m *RulesWithRuleItemRequestBuilder) Get(ctx context.Context, requestConfig } // Put updates the configuration for a globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *RulesWithRuleItemRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *RulesWithRuleItemRequestBuilderPutRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -108,6 +116,7 @@ func (m *RulesWithRuleItemRequestBuilder) Put(ctx context.Context, body i80228d0 } // ToDeleteRequestInformation deletes a single global rule. If this is the only rule configured, this is the sameas deleting **all** rules.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* Rule cannot be deleted (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesWithRuleItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *RulesWithRuleItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -119,6 +128,7 @@ func (m *RulesWithRuleItemRequestBuilder) ToDeleteRequestInformation(ctx context } // ToGetRequestInformation returns information about the named globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesWithRuleItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RulesWithRuleItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +140,7 @@ func (m *RulesWithRuleItemRequestBuilder) ToGetRequestInformation(ctx context.Co } // ToPutRequestInformation updates the configuration for a globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesWithRuleItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *RulesWithRuleItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +156,7 @@ func (m *RulesWithRuleItemRequestBuilder) ToPutRequestInformation(ctx context.Co } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RulesWithRuleItemRequestBuilder when successful func (m *RulesWithRuleItemRequestBuilder) WithUrl(rawUrl string) *RulesWithRuleItemRequestBuilder { return NewRulesWithRuleItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/api_client.go b/go-sdk/pkg/registryclient-v2/api_client.go index f9058a4b8c..1faed3ab04 100644 --- a/go-sdk/pkg/registryclient-v2/api_client.go +++ b/go-sdk/pkg/registryclient-v2/api_client.go @@ -21,6 +21,7 @@ type ApiClient struct { } // Admin the admin property +// returns a *AdminRequestBuilder when successful func (m *ApiClient) Admin() *ib17368b36d529874abc8d9bf78d8e855c90b8b8da58e2096c805c93498aeb953.AdminRequestBuilder { return ib17368b36d529874abc8d9bf78d8e855c90b8b8da58e2096c805c93498aeb953.NewAdminRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -55,26 +56,31 @@ func NewApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa52901 } // Groups collection of the groups in the registry. +// returns a *GroupsRequestBuilder when successful func (m *ApiClient) Groups() *i03427e83145645ec9c5aadacfc6884f6f20f42a76d01c12643a6beda4b6da998.GroupsRequestBuilder { return i03427e83145645ec9c5aadacfc6884f6f20f42a76d01c12643a6beda4b6da998.NewGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Ids the ids property +// returns a *IdsRequestBuilder when successful func (m *ApiClient) Ids() *i9e5dc2fc38794f6aa32ed1ac6a4268e9f883ecf895efb596b5c08cbfbd153194.IdsRequestBuilder { return i9e5dc2fc38794f6aa32ed1ac6a4268e9f883ecf895efb596b5c08cbfbd153194.NewIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Search the search property +// returns a *SearchRequestBuilder when successful func (m *ApiClient) Search() *i44490e99290b00435022e29b8e31ce36f8fb0cc8f8e18fafe19628f3951d7bcc.SearchRequestBuilder { return i44490e99290b00435022e29b8e31ce36f8fb0cc8f8e18fafe19628f3951d7bcc.NewSearchRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // System the system property +// returns a *SystemRequestBuilder when successful func (m *ApiClient) System() *ibbd9279a6564e9568a8f276acf42a549678192d9e000a509e2bfea764ad6efff.SystemRequestBuilder { return ibbd9279a6564e9568a8f276acf42a549678192d9e000a509e2bfea764ad6efff.NewSystemRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Users the users property +// returns a *UsersRequestBuilder when successful func (m *ApiClient) Users() *i4f0d7e176092b5826126d1b495a00f570529ba78ff0d7b4df1d522589a2b6e44.UsersRequestBuilder { return i4f0d7e176092b5826126d1b495a00f570529ba78ff0d7b4df1d522589a2b6e44.NewUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/groups_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/groups_request_builder.go index 470a7c24d3..e1b9ac2a08 100644 --- a/go-sdk/pkg/registryclient-v2/groups/groups_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/groups_request_builder.go @@ -18,12 +18,12 @@ type GroupsRequestBuilderGetQueryParameters struct { // The number of groups to skip before starting the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsSortBy *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SortBy `uriparametername:"orderby"` @@ -48,6 +48,7 @@ type GroupsRequestBuilderPostRequestConfiguration struct { } // ByGroupId collection to manage a single group in the registry. +// returns a *WithGroupItemRequestBuilder when successful func (m *GroupsRequestBuilder) ByGroupId(groupId string) *WithGroupItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -75,6 +76,8 @@ func NewGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get returns a list of all groups. This list is paged. +// returns a GroupSearchResultsable when successful +// returns a Error error when the service returns a 500 status code func (m *GroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *GroupsRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.GroupSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -94,6 +97,9 @@ func (m *GroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *Gr } // Post creates a new group.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group already exist (HTTP error `409`) +// returns a GroupMetaDataable when successful +// returns a Error error when the service returns a 409 status code +// returns a Error error when the service returns a 500 status code func (m *GroupsRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateGroupMetaDataable, requestConfiguration *GroupsRequestBuilderPostRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.GroupMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -114,6 +120,7 @@ func (m *GroupsRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582e } // ToGetRequestInformation returns a list of all groups. This list is paged. +// returns a *RequestInformation when successful func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GroupsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -128,6 +135,7 @@ func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // ToPostRequestInformation creates a new group.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group already exist (HTTP error `409`) +// returns a *RequestInformation when successful func (m *GroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateGroupMetaDataable, requestConfiguration *GroupsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -143,6 +151,7 @@ func (m *GroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, bod } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GroupsRequestBuilder when successful func (m *GroupsRequestBuilder) WithUrl(rawUrl string) *GroupsRequestBuilder { return NewGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_meta_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_meta_request_builder.go index 08f71fb076..3bbb7f1f07 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_meta_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_meta_request_builder.go @@ -43,7 +43,7 @@ type ItemArtifactsItemMetaRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemMetaRequestBuilderInternal instantiates a new MetaRequestBuilder and sets the default values. +// NewItemArtifactsItemMetaRequestBuilderInternal instantiates a new ItemArtifactsItemMetaRequestBuilder and sets the default values. func NewItemArtifactsItemMetaRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemMetaRequestBuilder { m := &ItemArtifactsItemMetaRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/meta{?canonical*}", pathParameters), @@ -51,7 +51,7 @@ func NewItemArtifactsItemMetaRequestBuilderInternal(pathParameters map[string]st return m } -// NewItemArtifactsItemMetaRequestBuilder instantiates a new MetaRequestBuilder and sets the default values. +// NewItemArtifactsItemMetaRequestBuilder instantiates a new ItemArtifactsItemMetaRequestBuilder and sets the default values. func NewItemArtifactsItemMetaRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemMetaRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -59,6 +59,9 @@ func NewItemArtifactsItemMetaRequestBuilder(rawUrl string, requestAdapter i2ae41 } // Get gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includesboth generated (read-only) and editable metadata (such as name and description).This operation can fail for the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ArtifactMetaDataable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemMetaRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemMetaRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -79,6 +82,9 @@ func (m *ItemArtifactsItemMetaRequestBuilder) Get(ctx context.Context, requestCo } // Post gets the metadata for an artifact that matches the raw content. Searches the registryfor a version of the given artifact matching the content provided in the body of thePOST.This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* No artifact version matching the provided content exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a VersionMetaDataable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemMetaRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsItemMetaRequestBuilderPostRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.VersionMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -99,6 +105,8 @@ func (m *ItemArtifactsItemMetaRequestBuilder) Post(ctx context.Context, body i80 } // Put updates the editable parts of the artifact's metadata. Not all metadata fields canbe updated. For example, `createdOn` and `createdBy` are both read-only properties.This operation can fail for the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemMetaRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.EditableMetaDataable, requestConfiguration *ItemArtifactsItemMetaRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -116,6 +124,7 @@ func (m *ItemArtifactsItemMetaRequestBuilder) Put(ctx context.Context, body i802 } // ToGetRequestInformation gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includesboth generated (read-only) and editable metadata (such as name and description).This operation can fail for the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemMetaRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemMetaRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,6 +136,7 @@ func (m *ItemArtifactsItemMetaRequestBuilder) ToGetRequestInformation(ctx contex } // ToPostRequestInformation gets the metadata for an artifact that matches the raw content. Searches the registryfor a version of the given artifact matching the content provided in the body of thePOST.This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* No artifact version matching the provided content exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemMetaRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsItemMetaRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +155,7 @@ func (m *ItemArtifactsItemMetaRequestBuilder) ToPostRequestInformation(ctx conte } // ToPutRequestInformation updates the editable parts of the artifact's metadata. Not all metadata fields canbe updated. For example, `createdOn` and `createdBy` are both read-only properties.This operation can fail for the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemMetaRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.EditableMetaDataable, requestConfiguration *ItemArtifactsItemMetaRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -160,6 +171,7 @@ func (m *ItemArtifactsItemMetaRequestBuilder) ToPutRequestInformation(ctx contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemMetaRequestBuilder when successful func (m *ItemArtifactsItemMetaRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemMetaRequestBuilder { return NewItemArtifactsItemMetaRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_owner_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_owner_request_builder.go index 2ded2e5be7..f871ea4f3c 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_owner_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_owner_request_builder.go @@ -27,7 +27,7 @@ type ItemArtifactsItemOwnerRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemOwnerRequestBuilderInternal instantiates a new OwnerRequestBuilder and sets the default values. +// NewItemArtifactsItemOwnerRequestBuilderInternal instantiates a new ItemArtifactsItemOwnerRequestBuilder and sets the default values. func NewItemArtifactsItemOwnerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemOwnerRequestBuilder { m := &ItemArtifactsItemOwnerRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/owner", pathParameters), @@ -35,7 +35,7 @@ func NewItemArtifactsItemOwnerRequestBuilderInternal(pathParameters map[string]s return m } -// NewItemArtifactsItemOwnerRequestBuilder instantiates a new OwnerRequestBuilder and sets the default values. +// NewItemArtifactsItemOwnerRequestBuilder instantiates a new ItemArtifactsItemOwnerRequestBuilder and sets the default values. func NewItemArtifactsItemOwnerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemOwnerRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -43,6 +43,9 @@ func NewItemArtifactsItemOwnerRequestBuilder(rawUrl string, requestAdapter i2ae4 } // Get gets the owner of an artifact in the registry.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ArtifactOwnerable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemOwnerRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemOwnerRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactOwnerable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -63,6 +66,8 @@ func (m *ItemArtifactsItemOwnerRequestBuilder) Get(ctx context.Context, requestC } // Put changes the ownership of an artifact.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemOwnerRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactOwnerable, requestConfiguration *ItemArtifactsItemOwnerRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -80,6 +85,7 @@ func (m *ItemArtifactsItemOwnerRequestBuilder) Put(ctx context.Context, body i80 } // ToGetRequestInformation gets the owner of an artifact in the registry.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemOwnerRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemOwnerRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -91,6 +97,7 @@ func (m *ItemArtifactsItemOwnerRequestBuilder) ToGetRequestInformation(ctx conte } // ToPutRequestInformation changes the ownership of an artifact.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemOwnerRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactOwnerable, requestConfiguration *ItemArtifactsItemOwnerRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -106,6 +113,7 @@ func (m *ItemArtifactsItemOwnerRequestBuilder) ToPutRequestInformation(ctx conte } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemOwnerRequestBuilder when successful func (m *ItemArtifactsItemOwnerRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemOwnerRequestBuilder { return NewItemArtifactsItemOwnerRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_request_builder.go index 3cdcd55384..be90d0448a 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_request_builder.go @@ -36,6 +36,7 @@ type ItemArtifactsItemRulesRequestBuilderPostRequestConfiguration struct { } // ByRule manage the configuration of a single artifact rule. +// returns a *ItemArtifactsItemRulesWithRuleItemRequestBuilder when successful func (m *ItemArtifactsItemRulesRequestBuilder) ByRule(rule string) *ItemArtifactsItemRulesWithRuleItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -47,7 +48,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ByRule(rule string) *ItemArtifact return NewItemArtifactsItemRulesWithRuleItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemRulesRequestBuilderInternal instantiates a new RulesRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesRequestBuilderInternal instantiates a new ItemArtifactsItemRulesRequestBuilder and sets the default values. func NewItemArtifactsItemRulesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesRequestBuilder { m := &ItemArtifactsItemRulesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/rules", pathParameters), @@ -55,7 +56,7 @@ func NewItemArtifactsItemRulesRequestBuilderInternal(pathParameters map[string]s return m } -// NewItemArtifactsItemRulesRequestBuilder instantiates a new RulesRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesRequestBuilder instantiates a new ItemArtifactsItemRulesRequestBuilder and sets the default values. func NewItemArtifactsItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -63,6 +64,8 @@ func NewItemArtifactsItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4 } // Delete deletes all of the rules configured for the artifact. After this is done, the globalrules apply to the artifact again.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemRulesRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -80,6 +83,9 @@ func (m *ItemArtifactsItemRulesRequestBuilder) Delete(ctx context.Context, reque } // Get returns a list of all rules configured for the artifact. The set of rules determineshow the content of an artifact can evolve over time. If no rules are configured foran artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []RuleType when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemRulesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.RuleType, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -103,6 +109,9 @@ func (m *ItemArtifactsItemRulesRequestBuilder) Get(ctx context.Context, requestC } // Post adds a rule to the list of rules that get applied to the artifact when adding newversions. All configured rules must pass to successfully add a new artifact version.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* Rule (named in the request body) is unknown (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 400 status code +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemRulesRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *ItemArtifactsItemRulesRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -121,6 +130,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) Post(ctx context.Context, body i8 } // ToDeleteRequestInformation deletes all of the rules configured for the artifact. After this is done, the globalrules apply to the artifact again.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -132,6 +142,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ToDeleteRequestInformation(ctx co } // ToGetRequestInformation returns a list of all rules configured for the artifact. The set of rules determineshow the content of an artifact can evolve over time. If no rules are configured foran artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -143,6 +154,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ToGetRequestInformation(ctx conte } // ToPostRequestInformation adds a rule to the list of rules that get applied to the artifact when adding newversions. All configured rules must pass to successfully add a new artifact version.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* Rule (named in the request body) is unknown (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *ItemArtifactsItemRulesRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -158,6 +170,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ToPostRequestInformation(ctx cont } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemRulesRequestBuilder when successful func (m *ItemArtifactsItemRulesRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemRulesRequestBuilder { return NewItemArtifactsItemRulesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_with_rule_item_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_with_rule_item_request_builder.go index ff250c66f3..acff028232 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_with_rule_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_rules_with_rule_item_request_builder.go @@ -35,7 +35,7 @@ type ItemArtifactsItemRulesWithRuleItemRequestBuilderPutRequestConfiguration str Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemRulesWithRuleItemRequestBuilderInternal instantiates a new WithRuleItemRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesWithRuleItemRequestBuilderInternal instantiates a new ItemArtifactsItemRulesWithRuleItemRequestBuilder and sets the default values. func NewItemArtifactsItemRulesWithRuleItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesWithRuleItemRequestBuilder { m := &ItemArtifactsItemRulesWithRuleItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/rules/{rule}", pathParameters), @@ -43,7 +43,7 @@ func NewItemArtifactsItemRulesWithRuleItemRequestBuilderInternal(pathParameters return m } -// NewItemArtifactsItemRulesWithRuleItemRequestBuilder instantiates a new WithRuleItemRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesWithRuleItemRequestBuilder instantiates a new ItemArtifactsItemRulesWithRuleItemRequestBuilder and sets the default values. func NewItemArtifactsItemRulesWithRuleItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesWithRuleItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewItemArtifactsItemRulesWithRuleItemRequestBuilder(rawUrl string, requestA } // Delete deletes a rule from the artifact. This results in the rule no longer applying forthis artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply tothis artifact.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) Delete(ctx context.Co } // Get returns information about a single rule configured for an artifact. This is usefulwhen you want to know what the current configuration settings are for a specific rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleItemRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,9 @@ func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) Get(ctx context.Conte } // Put updates the configuration of a single rule for the artifact. The configuration datais specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *ItemArtifactsItemRulesWithRuleItemRequestBuilderPutRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -108,6 +116,7 @@ func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) Put(ctx context.Conte } // ToDeleteRequestInformation deletes a rule from the artifact. This results in the rule no longer applying forthis artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply tothis artifact.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -119,6 +128,7 @@ func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) ToDeleteRequestInform } // ToGetRequestInformation returns information about a single rule configured for an artifact. This is usefulwhen you want to know what the current configuration settings are for a specific rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +140,7 @@ func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) ToGetRequestInformati } // ToPutRequestInformation updates the configuration of a single rule for the artifact. The configuration datais specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Ruleable, requestConfiguration *ItemArtifactsItemRulesWithRuleItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +156,7 @@ func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) ToPutRequestInformati } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemRulesWithRuleItemRequestBuilder when successful func (m *ItemArtifactsItemRulesWithRuleItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemRulesWithRuleItemRequestBuilder { return NewItemArtifactsItemRulesWithRuleItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_state_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_state_request_builder.go index 3c0c8a6b3d..8dd21b3df2 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_state_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_state_request_builder.go @@ -19,7 +19,7 @@ type ItemArtifactsItemStateRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemStateRequestBuilderInternal instantiates a new StateRequestBuilder and sets the default values. +// NewItemArtifactsItemStateRequestBuilderInternal instantiates a new ItemArtifactsItemStateRequestBuilder and sets the default values. func NewItemArtifactsItemStateRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemStateRequestBuilder { m := &ItemArtifactsItemStateRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/state", pathParameters), @@ -27,7 +27,7 @@ func NewItemArtifactsItemStateRequestBuilderInternal(pathParameters map[string]s return m } -// NewItemArtifactsItemStateRequestBuilder instantiates a new StateRequestBuilder and sets the default values. +// NewItemArtifactsItemStateRequestBuilder instantiates a new ItemArtifactsItemStateRequestBuilder and sets the default values. func NewItemArtifactsItemStateRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemStateRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewItemArtifactsItemStateRequestBuilder(rawUrl string, requestAdapter i2ae4 } // Put updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 400 status code +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemStateRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateStateable, requestConfiguration *ItemArtifactsItemStateRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -53,6 +56,7 @@ func (m *ItemArtifactsItemStateRequestBuilder) Put(ctx context.Context, body i80 } // ToPutRequestInformation updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemStateRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateStateable, requestConfiguration *ItemArtifactsItemStateRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -68,6 +72,7 @@ func (m *ItemArtifactsItemStateRequestBuilder) ToPutRequestInformation(ctx conte } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemStateRequestBuilder when successful func (m *ItemArtifactsItemStateRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemStateRequestBuilder { return NewItemArtifactsItemStateRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_test_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_test_request_builder.go index 2248ac0ee1..d0dd83148d 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_test_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_test_request_builder.go @@ -19,7 +19,7 @@ type ItemArtifactsItemTestRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemTestRequestBuilderInternal instantiates a new TestRequestBuilder and sets the default values. +// NewItemArtifactsItemTestRequestBuilderInternal instantiates a new ItemArtifactsItemTestRequestBuilder and sets the default values. func NewItemArtifactsItemTestRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemTestRequestBuilder { m := &ItemArtifactsItemTestRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/test", pathParameters), @@ -27,7 +27,7 @@ func NewItemArtifactsItemTestRequestBuilderInternal(pathParameters map[string]st return m } -// NewItemArtifactsItemTestRequestBuilder instantiates a new TestRequestBuilder and sets the default values. +// NewItemArtifactsItemTestRequestBuilder instantiates a new ItemArtifactsItemTestRequestBuilder and sets the default values. func NewItemArtifactsItemTestRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemTestRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewItemArtifactsItemTestRequestBuilder(rawUrl string, requestAdapter i2ae41 } // Put tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* The provided artifact type is not recognized (HTTP error `404`)* A server error occurred (HTTP error `500`)When successful, this operation simply returns a *No Content* response. This responseindicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). +// returns a Error error when the service returns a 404 status code +// returns a RuleViolationError error when the service returns a 409 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemTestRequestBuilder) Put(ctx context.Context, body []byte, contentType *string, requestConfiguration *ItemArtifactsItemTestRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, contentType, requestConfiguration) if err != nil { @@ -42,7 +45,7 @@ func (m *ItemArtifactsItemTestRequestBuilder) Put(ctx context.Context, body []by } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ "404": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, - "409": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, + "409": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateRuleViolationErrorFromDiscriminatorValue, "500": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, } err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) @@ -53,6 +56,7 @@ func (m *ItemArtifactsItemTestRequestBuilder) Put(ctx context.Context, body []by } // ToPutRequestInformation tests whether an update to the artifact's content *would* succeed for the provided content.Ultimately, this applies any rules configured for the artifact against the given contentto determine whether the rules would pass or fail, but without actually updating the artifactcontent.The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* The provided artifact type is not recognized (HTTP error `404`)* A server error occurred (HTTP error `500`)When successful, this operation simply returns a *No Content* response. This responseindicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). +// returns a *RequestInformation when successful func (m *ItemArtifactsItemTestRequestBuilder) ToPutRequestInformation(ctx context.Context, body []byte, contentType *string, requestConfiguration *ItemArtifactsItemTestRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +69,7 @@ func (m *ItemArtifactsItemTestRequestBuilder) ToPutRequestInformation(ctx contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemTestRequestBuilder when successful func (m *ItemArtifactsItemTestRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemTestRequestBuilder { return NewItemArtifactsItemTestRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_request_builder.go index 0acc8c246b..6f430326d8 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_request_builder.go @@ -28,6 +28,7 @@ type ItemArtifactsItemVersionsItemCommentsRequestBuilderPostRequestConfiguration } // ByCommentId manage a single comment +// returns a *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ByCommentId(commentId string) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -39,7 +40,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ByCommentId(commen return NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal instantiates a new CommentsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemCommentsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsRequestBuilder { m := &ItemArtifactsItemVersionsItemCommentsRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{version}/comments", pathParameters), @@ -47,7 +48,7 @@ func NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal(pathParamete return m } -// NewItemArtifactsItemVersionsItemCommentsRequestBuilder instantiates a new CommentsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsRequestBuilder instantiates a new ItemArtifactsItemVersionsItemCommentsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -55,6 +56,9 @@ func NewItemArtifactsItemVersionsItemCommentsRequestBuilder(rawUrl string, reque } // Get retrieves all comments for a version of an artifact. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []Commentable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Commentable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -78,6 +82,9 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Get(ctx context.Co } // Post adds a new comment to the artifact version. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Commentable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderPostRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Commentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -98,6 +105,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Post(ctx context.C } // ToGetRequestInformation retrieves all comments for a version of an artifact. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -109,6 +117,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToGetRequestInform } // ToPostRequestInformation adds a new comment to the artifact version. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -124,6 +133,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToPostRequestInfor } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemCommentsRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemCommentsRequestBuilder { return NewItemArtifactsItemVersionsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go index 43939c9b18..119fb0389c 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go @@ -27,7 +27,7 @@ type ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderPutReques Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal instantiates a new WithCommentItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { m := &ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{version}/comments/{commentId}", pathParameters), @@ -35,7 +35,7 @@ func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderIntern return m } -// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder instantiates a new WithCommentItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder instantiates a new ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -43,6 +43,8 @@ func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder(rawUr } // Delete deletes a single comment in an artifact version. Only the owner of thecomment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -60,6 +62,8 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Del } // Put updates the value of a single comment in an artifact version. Only the owner of thecomment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -77,6 +81,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Put } // ToDeleteRequestInformation deletes a single comment in an artifact version. Only the owner of thecomment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -88,6 +93,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToD } // ToPutRequestInformation updates the value of a single comment in an artifact version. Only the owner of thecomment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -103,6 +109,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToP } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { return NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_meta_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_meta_request_builder.go index 1ca06d9bf3..842eac0508 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_meta_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_meta_request_builder.go @@ -35,7 +35,7 @@ type ItemArtifactsItemVersionsItemMetaRequestBuilderPutRequestConfiguration stru Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemVersionsItemMetaRequestBuilderInternal instantiates a new MetaRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemMetaRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemMetaRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemMetaRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemMetaRequestBuilder { m := &ItemArtifactsItemVersionsItemMetaRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta", pathParameters), @@ -43,7 +43,7 @@ func NewItemArtifactsItemVersionsItemMetaRequestBuilderInternal(pathParameters m return m } -// NewItemArtifactsItemVersionsItemMetaRequestBuilder instantiates a new MetaRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemMetaRequestBuilder instantiates a new ItemArtifactsItemVersionsItemMetaRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemMetaRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemMetaRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewItemArtifactsItemVersionsItemMetaRequestBuilder(rawUrl string, requestAd } // Delete deletes the user-editable metadata properties of the artifact version. Any propertiesthat are not user-editable are preserved.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemMetaRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) Delete(ctx context.Con } // Get retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific tothe version (for example, this doesn't include `modifiedOn`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a VersionMetaDataable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemMetaRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.VersionMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,8 @@ func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) Get(ctx context.Contex } // Put updates the user-editable portion of the artifact version's metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.EditableMetaDataable, requestConfiguration *ItemArtifactsItemVersionsItemMetaRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -105,6 +112,7 @@ func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) Put(ctx context.Contex } // ToDeleteRequestInformation deletes the user-editable metadata properties of the artifact version. Any propertiesthat are not user-editable are preserved.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemMetaRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -116,6 +124,7 @@ func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) ToDeleteRequestInforma } // ToGetRequestInformation retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific tothe version (for example, this doesn't include `modifiedOn`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemMetaRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,6 +136,7 @@ func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) ToGetRequestInformatio } // ToPutRequestInformation updates the user-editable portion of the artifact version's metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.EditableMetaDataable, requestConfiguration *ItemArtifactsItemVersionsItemMetaRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -142,6 +152,7 @@ func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) ToPutRequestInformatio } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemMetaRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemMetaRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemMetaRequestBuilder { return NewItemArtifactsItemVersionsItemMetaRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_references_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_references_request_builder.go index 6bf5328065..900871463c 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_references_request_builder.go @@ -14,7 +14,7 @@ type ItemArtifactsItemVersionsItemReferencesRequestBuilder struct { // ItemArtifactsItemVersionsItemReferencesRequestBuilderGetQueryParameters retrieves all references for a single version of an artifact. Both the `artifactId` and theunique `version` number must be provided. Using the `refType` query parameter, it is possibleto retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) type ItemArtifactsItemVersionsItemReferencesRequestBuilderGetQueryParameters struct { // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. - // Deprecated: This property is deprecated, use refTypeAsReferenceType instead + // Deprecated: This property is deprecated, use RefTypeAsReferenceType instead RefType *string `uriparametername:"refType"` // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. RefTypeAsReferenceType *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ReferenceType `uriparametername:"refType"` @@ -30,7 +30,7 @@ type ItemArtifactsItemVersionsItemReferencesRequestBuilderGetRequestConfiguratio QueryParameters *ItemArtifactsItemVersionsItemReferencesRequestBuilderGetQueryParameters } -// NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemReferencesRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemReferencesRequestBuilder { m := &ItemArtifactsItemVersionsItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{version}/references{?refType*}", pathParameters), @@ -38,7 +38,7 @@ func NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal(pathParame return m } -// NewItemArtifactsItemVersionsItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemReferencesRequestBuilder instantiates a new ItemArtifactsItemVersionsItemReferencesRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -46,6 +46,9 @@ func NewItemArtifactsItemVersionsItemReferencesRequestBuilder(rawUrl string, req } // Get retrieves all references for a single version of an artifact. Both the `artifactId` and theunique `version` number must be provided. Using the `refType` query parameter, it is possibleto retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemReferencesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -69,6 +72,7 @@ func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) Get(ctx context. } // ToGetRequestInformation retrieves all references for a single version of an artifact. Both the `artifactId` and theunique `version` number must be provided. Using the `refType` query parameter, it is possibleto retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -83,6 +87,7 @@ func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) ToGetRequestInfo } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemReferencesRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemReferencesRequestBuilder { return NewItemArtifactsItemVersionsItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_state_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_state_request_builder.go index f53641d098..0655b45f64 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_state_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_item_state_request_builder.go @@ -19,7 +19,7 @@ type ItemArtifactsItemVersionsItemStateRequestBuilderPutRequestConfiguration str Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemVersionsItemStateRequestBuilderInternal instantiates a new StateRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemStateRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemStateRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemStateRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemStateRequestBuilder { m := &ItemArtifactsItemVersionsItemStateRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{version}/state", pathParameters), @@ -27,7 +27,7 @@ func NewItemArtifactsItemVersionsItemStateRequestBuilderInternal(pathParameters return m } -// NewItemArtifactsItemVersionsItemStateRequestBuilder instantiates a new StateRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemStateRequestBuilder instantiates a new ItemArtifactsItemVersionsItemStateRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemStateRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemStateRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewItemArtifactsItemVersionsItemStateRequestBuilder(rawUrl string, requestA } // Put updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 400 status code +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemStateRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateStateable, requestConfiguration *ItemArtifactsItemVersionsItemStateRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -53,6 +56,7 @@ func (m *ItemArtifactsItemVersionsItemStateRequestBuilder) Put(ctx context.Conte } // ToPutRequestInformation updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemStateRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UpdateStateable, requestConfiguration *ItemArtifactsItemVersionsItemStateRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -68,6 +72,7 @@ func (m *ItemArtifactsItemVersionsItemStateRequestBuilder) ToPutRequestInformati } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemStateRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemStateRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemStateRequestBuilder { return NewItemArtifactsItemVersionsItemStateRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_request_builder.go index db25f3287a..cab4cfdc94 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_request_builder.go @@ -38,6 +38,7 @@ type ItemArtifactsItemVersionsRequestBuilderPostRequestConfiguration struct { } // ByVersion manage a single version of a single artifact in the registry. +// returns a *ItemArtifactsItemVersionsWithVersionItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsRequestBuilder) ByVersion(version string) *ItemArtifactsItemVersionsWithVersionItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -49,15 +50,15 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) ByVersion(version string) *Ite return NewItemArtifactsItemVersionsWithVersionItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemVersionsRequestBuilderInternal instantiates a new VersionsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsRequestBuilder { m := &ItemArtifactsItemVersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions{?offset*,limit*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions{?limit*,offset*}", pathParameters), } return m } -// NewItemArtifactsItemVersionsRequestBuilder instantiates a new VersionsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsRequestBuilder instantiates a new ItemArtifactsItemVersionsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -65,6 +66,9 @@ func NewItemArtifactsItemVersionsRequestBuilder(rawUrl string, requestAdapter i2 } // Get returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a VersionSearchResultsable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.VersionSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -85,6 +89,10 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) Get(ctx context.Context, reque } // Post creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a VersionMetaDataable when successful +// returns a Error error when the service returns a 404 status code +// returns a RuleViolationError error when the service returns a 409 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderPostRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.VersionMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -92,7 +100,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) Post(ctx context.Context, body } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ "404": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, - "409": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, + "409": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateRuleViolationErrorFromDiscriminatorValue, "500": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateVersionMetaDataFromDiscriminatorValue, errorMapping) @@ -106,6 +114,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) Post(ctx context.Context, body } // ToGetRequestInformation returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -120,6 +129,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) ToGetRequestInformation(ctx co } // ToPostRequestInformation creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -135,6 +145,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) ToPostRequestInformation(ctx c } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsRequestBuilder when successful func (m *ItemArtifactsItemVersionsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsRequestBuilder { return NewItemArtifactsItemVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_with_version_item_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_with_version_item_request_builder.go index 46c4b7a591..e56439e780 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_with_version_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_item_versions_with_version_item_request_builder.go @@ -36,11 +36,12 @@ type ItemArtifactsItemVersionsWithVersionItemRequestBuilderGetRequestConfigurati } // Comments manage a collection of comments for an artifact version +// returns a *ItemArtifactsItemVersionsItemCommentsRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) Comments() *ItemArtifactsItemVersionsItemCommentsRequestBuilder { return NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemVersionsWithVersionItemRequestBuilderInternal instantiates a new WithVersionItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsWithVersionItemRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsWithVersionItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsWithVersionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsWithVersionItemRequestBuilder { m := &ItemArtifactsItemVersionsWithVersionItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{version}{?dereference*}", pathParameters), @@ -48,7 +49,7 @@ func NewItemArtifactsItemVersionsWithVersionItemRequestBuilderInternal(pathParam return m } -// NewItemArtifactsItemVersionsWithVersionItemRequestBuilder instantiates a new WithVersionItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsWithVersionItemRequestBuilder instantiates a new ItemArtifactsItemVersionsWithVersionItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsWithVersionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsWithVersionItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -56,6 +57,9 @@ func NewItemArtifactsItemVersionsWithVersionItemRequestBuilder(rawUrl string, re } // Delete deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version`are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact.This feature is disabled by default and it's discouraged for normal usage. To enable it, set the `apicurio.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 405 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -74,6 +78,9 @@ func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) Delete(ctx cont } // Get retrieves a single version of the artifact content. Both the `artifactId` and theunique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -94,21 +101,25 @@ func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) Get(ctx context } // Meta manage the metadata for a single version of an artifact in the registry. +// returns a *ItemArtifactsItemVersionsItemMetaRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) Meta() *ItemArtifactsItemVersionsItemMetaRequestBuilder { return NewItemArtifactsItemVersionsItemMetaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // References manage the references for a single version of an artifact in the registry. +// returns a *ItemArtifactsItemVersionsItemReferencesRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) References() *ItemArtifactsItemVersionsItemReferencesRequestBuilder { return NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // State manage the state of a specific artifact version. +// returns a *ItemArtifactsItemVersionsItemStateRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) State() *ItemArtifactsItemVersionsItemStateRequestBuilder { return NewItemArtifactsItemVersionsItemStateRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToDeleteRequestInformation deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version`are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact.This feature is disabled by default and it's discouraged for normal usage. To enable it, set the `apicurio.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -120,6 +131,7 @@ func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) ToDeleteRequest } // ToGetRequestInformation retrieves a single version of the artifact content. Both the `artifactId` and theunique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -134,6 +146,7 @@ func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) ToGetRequestInf } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsWithVersionItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsWithVersionItemRequestBuilder { return NewItemArtifactsItemVersionsWithVersionItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_request_builder.go index c0ed231e6a..0ece94e4e8 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_request_builder.go @@ -26,12 +26,12 @@ type ItemArtifactsRequestBuilderGetQueryParameters struct { // The number of artifacts to skip before starting the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsSortBy *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SortBy `uriparametername:"orderby"` @@ -52,7 +52,7 @@ type ItemArtifactsRequestBuilderPostQueryParameters struct { // Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should "canonicalize" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. Canonical *bool `uriparametername:"canonical"` // Set this option to instruct the server on what to do if the artifact already exists. - // Deprecated: This property is deprecated, use ifExistsAsIfExists instead + // Deprecated: This property is deprecated, use IfExistsAsIfExists instead IfExists *string `uriparametername:"ifExists"` // Set this option to instruct the server on what to do if the artifact already exists. IfExistsAsIfExists *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.IfExists `uriparametername:"ifExists"` @@ -69,6 +69,7 @@ type ItemArtifactsRequestBuilderPostRequestConfiguration struct { } // ByArtifactId manage a single artifact. +// returns a *ItemArtifactsWithArtifactItemRequestBuilder when successful func (m *ItemArtifactsRequestBuilder) ByArtifactId(artifactId string) *ItemArtifactsWithArtifactItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -80,15 +81,15 @@ func (m *ItemArtifactsRequestBuilder) ByArtifactId(artifactId string) *ItemArtif return NewItemArtifactsWithArtifactItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsRequestBuilderInternal instantiates a new ArtifactsRequestBuilder and sets the default values. +// NewItemArtifactsRequestBuilderInternal instantiates a new ItemArtifactsRequestBuilder and sets the default values. func NewItemArtifactsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsRequestBuilder { m := &ItemArtifactsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts{?limit*,offset*,order*,orderby*,ifExists*,canonical*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts{?canonical*,ifExists*,limit*,offset*,order*,orderby*}", pathParameters), } return m } -// NewItemArtifactsRequestBuilder instantiates a new ArtifactsRequestBuilder and sets the default values. +// NewItemArtifactsRequestBuilder instantiates a new ItemArtifactsRequestBuilder and sets the default values. func NewItemArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -96,6 +97,7 @@ func NewItemArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee } // Delete deletes all of the artifacts that exist in a given group. +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -112,6 +114,8 @@ func (m *ItemArtifactsRequestBuilder) Delete(ctx context.Context, requestConfigu } // Get returns a list of all artifacts in the group. This list is paged. +// returns a ArtifactSearchResultsable when successful +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -131,6 +135,10 @@ func (m *ItemArtifactsRequestBuilder) Get(ctx context.Context, requestConfigurat } // Post creates a new artifact by posting the artifact content. The body of the request shouldbe the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a ArtifactMetaDataable when successful +// returns a Error error when the service returns a 400 status code +// returns a RuleViolationError error when the service returns a 409 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsRequestBuilder) Post(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsRequestBuilderPostRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -138,7 +146,7 @@ func (m *ItemArtifactsRequestBuilder) Post(ctx context.Context, body i80228d093f } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ "400": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, - "409": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, + "409": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateRuleViolationErrorFromDiscriminatorValue, "500": i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.CreateArtifactMetaDataFromDiscriminatorValue, errorMapping) @@ -152,6 +160,7 @@ func (m *ItemArtifactsRequestBuilder) Post(ctx context.Context, body i80228d093f } // ToDeleteRequestInformation deletes all of the artifacts that exist in a given group. +// returns a *RequestInformation when successful func (m *ItemArtifactsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -163,6 +172,7 @@ func (m *ItemArtifactsRequestBuilder) ToDeleteRequestInformation(ctx context.Con } // ToGetRequestInformation returns a list of all artifacts in the group. This list is paged. +// returns a *RequestInformation when successful func (m *ItemArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -177,6 +187,7 @@ func (m *ItemArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Contex } // ToPostRequestInformation creates a new artifact by posting the artifact content. The body of the request shouldbe the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -195,6 +206,7 @@ func (m *ItemArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Conte } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsRequestBuilder when successful func (m *ItemArtifactsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsRequestBuilder { return NewItemArtifactsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_with_artifact_item_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_with_artifact_item_request_builder.go index 94cffa6117..e9b7519923 100644 --- a/go-sdk/pkg/registryclient-v2/groups/item_artifacts_with_artifact_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/item_artifacts_with_artifact_item_request_builder.go @@ -43,7 +43,7 @@ type ItemArtifactsWithArtifactItemRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsWithArtifactItemRequestBuilderInternal instantiates a new WithArtifactItemRequestBuilder and sets the default values. +// NewItemArtifactsWithArtifactItemRequestBuilderInternal instantiates a new ItemArtifactsWithArtifactItemRequestBuilder and sets the default values. func NewItemArtifactsWithArtifactItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsWithArtifactItemRequestBuilder { m := &ItemArtifactsWithArtifactItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}{?dereference*}", pathParameters), @@ -51,7 +51,7 @@ func NewItemArtifactsWithArtifactItemRequestBuilderInternal(pathParameters map[s return m } -// NewItemArtifactsWithArtifactItemRequestBuilder instantiates a new WithArtifactItemRequestBuilder and sets the default values. +// NewItemArtifactsWithArtifactItemRequestBuilder instantiates a new ItemArtifactsWithArtifactItemRequestBuilder and sets the default values. func NewItemArtifactsWithArtifactItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsWithArtifactItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -59,6 +59,8 @@ func NewItemArtifactsWithArtifactItemRequestBuilder(rawUrl string, requestAdapte } // Delete deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsWithArtifactItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -76,6 +78,9 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) Delete(ctx context.Context } // Get returns the latest version of the artifact in its raw form. The `Content-Type` of theresponse depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used.This operation may fail for one of the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsWithArtifactItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -96,16 +101,22 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) Get(ctx context.Context, r } // Meta manage the metadata of a single artifact. +// returns a *ItemArtifactsItemMetaRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Meta() *ItemArtifactsItemMetaRequestBuilder { return NewItemArtifactsItemMetaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Owner manage the ownership of a single artifact. +// returns a *ItemArtifactsItemOwnerRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Owner() *ItemArtifactsItemOwnerRequestBuilder { return NewItemArtifactsItemOwnerRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Put updates an artifact by uploading new content. The body of the request canbe the raw content of the artifact or a JSON object containing both the raw content anda set of references to other artifacts.. This is typically in JSON format for *most*of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The type of the content should be compatible with the artifact's type (it would bean error to update an `AVRO` artifact with new `OPENAPI` content, for example).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`)When successful, this creates a new version of the artifact, making it the most recent(and therefore official) version of the artifact. +// returns a ArtifactMetaDataable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 409 status code +// returns a Error error when the service returns a 500 status code func (m *ItemArtifactsWithArtifactItemRequestBuilder) Put(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderPutRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactMetaDataable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -127,21 +138,25 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) Put(ctx context.Context, b } // Rules manage the rules for a single artifact. +// returns a *ItemArtifactsItemRulesRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Rules() *ItemArtifactsItemRulesRequestBuilder { return NewItemArtifactsItemRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // State manage the state of an artifact. +// returns a *ItemArtifactsItemStateRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) State() *ItemArtifactsItemStateRequestBuilder { return NewItemArtifactsItemStateRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Test test whether content would pass update rules. +// returns a *ItemArtifactsItemTestRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Test() *ItemArtifactsItemTestRequestBuilder { return NewItemArtifactsItemTestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToDeleteRequestInformation deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -153,6 +168,7 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToDeleteRequestInformation } // ToGetRequestInformation returns the latest version of the artifact in its raw form. The `Content-Type` of theresponse depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used.This operation may fail for one of the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -167,6 +183,7 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToGetRequestInformation(ct } // ToPutRequestInformation updates an artifact by uploading new content. The body of the request canbe the raw content of the artifact or a JSON object containing both the raw content anda set of references to other artifacts.. This is typically in JSON format for *most*of the supported types, but may be in another format for a few (for example, `PROTOBUF`).The type of the content should be compatible with the artifact's type (it would bean error to update an `AVRO` artifact with new `OPENAPI` content, for example).The update could fail for a number of reasons including:* Provided content (request body) was empty (HTTP error `400`)* No artifact with the `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`)When successful, this creates a new version of the artifact, making it the most recent(and therefore official) version of the artifact. +// returns a *RequestInformation when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactContentable, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -182,11 +199,13 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToPutRequestInformation(ct } // Versions manage all the versions of an artifact in the registry. +// returns a *ItemArtifactsItemVersionsRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Versions() *ItemArtifactsItemVersionsRequestBuilder { return NewItemArtifactsItemVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsWithArtifactItemRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsWithArtifactItemRequestBuilder { return NewItemArtifactsWithArtifactItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/groups/with_group_item_request_builder.go b/go-sdk/pkg/registryclient-v2/groups/with_group_item_request_builder.go index 0bb3a5bc8c..47a5cba920 100644 --- a/go-sdk/pkg/registryclient-v2/groups/with_group_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/groups/with_group_item_request_builder.go @@ -28,6 +28,7 @@ type WithGroupItemRequestBuilderGetRequestConfiguration struct { } // Artifacts manage the collection of artifacts within a single group in the registry. +// returns a *ItemArtifactsRequestBuilder when successful func (m *WithGroupItemRequestBuilder) Artifacts() *ItemArtifactsRequestBuilder { return NewItemArtifactsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -48,6 +49,8 @@ func NewWithGroupItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee } // Delete deletes a group by identifier.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group does not exist (HTTP error `404`) +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *WithGroupItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -65,6 +68,9 @@ func (m *WithGroupItemRequestBuilder) Delete(ctx context.Context, requestConfigu } // Get returns a group using the specified id.This operation can fail for the following reasons:* No group exists with the specified ID (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a GroupMetaDataable when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *WithGroupItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.GroupMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -85,6 +91,7 @@ func (m *WithGroupItemRequestBuilder) Get(ctx context.Context, requestConfigurat } // ToDeleteRequestInformation deletes a group by identifier.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group does not exist (HTTP error `404`) +// returns a *RequestInformation when successful func (m *WithGroupItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -96,6 +103,7 @@ func (m *WithGroupItemRequestBuilder) ToDeleteRequestInformation(ctx context.Con } // ToGetRequestInformation returns a group using the specified id.This operation can fail for the following reasons:* No group exists with the specified ID (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *WithGroupItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -107,6 +115,7 @@ func (m *WithGroupItemRequestBuilder) ToGetRequestInformation(ctx context.Contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithGroupItemRequestBuilder when successful func (m *WithGroupItemRequestBuilder) WithUrl(rawUrl string) *WithGroupItemRequestBuilder { return NewWithGroupItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/content_hashes_item_references_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/content_hashes_item_references_request_builder.go index b45cb1dafe..a4fc97bc27 100644 --- a/go-sdk/pkg/registryclient-v2/ids/content_hashes_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/content_hashes_item_references_request_builder.go @@ -19,7 +19,7 @@ type ContentHashesItemReferencesRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentHashesItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentHashesItemReferencesRequestBuilderInternal instantiates a new ContentHashesItemReferencesRequestBuilder and sets the default values. func NewContentHashesItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesItemReferencesRequestBuilder { m := &ContentHashesItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentHashes/{contentHash}/references", pathParameters), @@ -27,7 +27,7 @@ func NewContentHashesItemReferencesRequestBuilderInternal(pathParameters map[str return m } -// NewContentHashesItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentHashesItemReferencesRequestBuilder instantiates a new ContentHashesItemReferencesRequestBuilder and sets the default values. func NewContentHashesItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,7 @@ func NewContentHashesItemReferencesRequestBuilder(rawUrl string, requestAdapter } // Get returns a list containing all the artifact references using the artifact content hash.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful func (m *ContentHashesItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentHashesItemReferencesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +55,7 @@ func (m *ContentHashesItemReferencesRequestBuilder) Get(ctx context.Context, req } // ToGetRequestInformation returns a list containing all the artifact references using the artifact content hash.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentHashesItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentHashesItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +67,7 @@ func (m *ContentHashesItemReferencesRequestBuilder) ToGetRequestInformation(ctx } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentHashesItemReferencesRequestBuilder when successful func (m *ContentHashesItemReferencesRequestBuilder) WithUrl(rawUrl string) *ContentHashesItemReferencesRequestBuilder { return NewContentHashesItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/content_hashes_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/content_hashes_request_builder.go index 56388eb34f..14825ede34 100644 --- a/go-sdk/pkg/registryclient-v2/ids/content_hashes_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/content_hashes_request_builder.go @@ -10,6 +10,7 @@ type ContentHashesRequestBuilder struct { } // ByContentHash access artifact content utilizing the SHA-256 hash of the content. +// returns a *ContentHashesWithContentHashItemRequestBuilder when successful func (m *ContentHashesRequestBuilder) ByContentHash(contentHash string) *ContentHashesWithContentHashItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { diff --git a/go-sdk/pkg/registryclient-v2/ids/content_hashes_with_content_hash_item_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/content_hashes_with_content_hash_item_request_builder.go index 4039dd549a..56f068ba0e 100644 --- a/go-sdk/pkg/registryclient-v2/ids/content_hashes_with_content_hash_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/content_hashes_with_content_hash_item_request_builder.go @@ -19,7 +19,7 @@ type ContentHashesWithContentHashItemRequestBuilderGetRequestConfiguration struc Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentHashesWithContentHashItemRequestBuilderInternal instantiates a new WithContentHashItemRequestBuilder and sets the default values. +// NewContentHashesWithContentHashItemRequestBuilderInternal instantiates a new ContentHashesWithContentHashItemRequestBuilder and sets the default values. func NewContentHashesWithContentHashItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesWithContentHashItemRequestBuilder { m := &ContentHashesWithContentHashItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentHashes/{contentHash}", pathParameters), @@ -27,7 +27,7 @@ func NewContentHashesWithContentHashItemRequestBuilderInternal(pathParameters ma return m } -// NewContentHashesWithContentHashItemRequestBuilder instantiates a new WithContentHashItemRequestBuilder and sets the default values. +// NewContentHashesWithContentHashItemRequestBuilder instantiates a new ContentHashesWithContentHashItemRequestBuilder and sets the default values. func NewContentHashesWithContentHashItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesWithContentHashItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewContentHashesWithContentHashItemRequestBuilder(rawUrl string, requestAda } // Get gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifactversions in the case where the artifact versions have identical content.This operation may fail for one of the following reasons:* No content with this `contentHash` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ContentHashesWithContentHashItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentHashesWithContentHashItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -55,11 +58,13 @@ func (m *ContentHashesWithContentHashItemRequestBuilder) Get(ctx context.Context } // References the references property +// returns a *ContentHashesItemReferencesRequestBuilder when successful func (m *ContentHashesWithContentHashItemRequestBuilder) References() *ContentHashesItemReferencesRequestBuilder { return NewContentHashesItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToGetRequestInformation gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifactversions in the case where the artifact versions have identical content.This operation may fail for one of the following reasons:* No content with this `contentHash` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentHashesWithContentHashItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentHashesWithContentHashItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -71,6 +76,7 @@ func (m *ContentHashesWithContentHashItemRequestBuilder) ToGetRequestInformation } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentHashesWithContentHashItemRequestBuilder when successful func (m *ContentHashesWithContentHashItemRequestBuilder) WithUrl(rawUrl string) *ContentHashesWithContentHashItemRequestBuilder { return NewContentHashesWithContentHashItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/content_ids_item_references_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/content_ids_item_references_request_builder.go index db4f267d26..d46811061b 100644 --- a/go-sdk/pkg/registryclient-v2/ids/content_ids_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/content_ids_item_references_request_builder.go @@ -19,7 +19,7 @@ type ContentIdsItemReferencesRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentIdsItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentIdsItemReferencesRequestBuilderInternal instantiates a new ContentIdsItemReferencesRequestBuilder and sets the default values. func NewContentIdsItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsItemReferencesRequestBuilder { m := &ContentIdsItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentIds/{contentId}/references", pathParameters), @@ -27,7 +27,7 @@ func NewContentIdsItemReferencesRequestBuilderInternal(pathParameters map[string return m } -// NewContentIdsItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentIdsItemReferencesRequestBuilder instantiates a new ContentIdsItemReferencesRequestBuilder and sets the default values. func NewContentIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,7 @@ func NewContentIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2a } // Get returns a list containing all the artifact references using the artifact content ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful func (m *ContentIdsItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentIdsItemReferencesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +55,7 @@ func (m *ContentIdsItemReferencesRequestBuilder) Get(ctx context.Context, reques } // ToGetRequestInformation returns a list containing all the artifact references using the artifact content ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentIdsItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +67,7 @@ func (m *ContentIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx con } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentIdsItemReferencesRequestBuilder when successful func (m *ContentIdsItemReferencesRequestBuilder) WithUrl(rawUrl string) *ContentIdsItemReferencesRequestBuilder { return NewContentIdsItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/content_ids_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/content_ids_request_builder.go index a2f9354765..6882de2f1b 100644 --- a/go-sdk/pkg/registryclient-v2/ids/content_ids_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/content_ids_request_builder.go @@ -12,6 +12,7 @@ type ContentIdsRequestBuilder struct { // ByContentId access artifact content utilizing the unique content identifier for that content. // Deprecated: This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead. +// returns a *ContentIdsWithContentItemRequestBuilder when successful func (m *ContentIdsRequestBuilder) ByContentId(contentId string) *ContentIdsWithContentItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -24,6 +25,7 @@ func (m *ContentIdsRequestBuilder) ByContentId(contentId string) *ContentIdsWith } // ByContentIdInt64 access artifact content utilizing the unique content identifier for that content. +// returns a *ContentIdsWithContentItemRequestBuilder when successful func (m *ContentIdsRequestBuilder) ByContentIdInt64(contentId int64) *ContentIdsWithContentItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { diff --git a/go-sdk/pkg/registryclient-v2/ids/content_ids_with_content_item_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/content_ids_with_content_item_request_builder.go index 36ffc0aeb4..85d22a94a8 100644 --- a/go-sdk/pkg/registryclient-v2/ids/content_ids_with_content_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/content_ids_with_content_item_request_builder.go @@ -19,7 +19,7 @@ type ContentIdsWithContentItemRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentIdsWithContentItemRequestBuilderInternal instantiates a new WithContentItemRequestBuilder and sets the default values. +// NewContentIdsWithContentItemRequestBuilderInternal instantiates a new ContentIdsWithContentItemRequestBuilder and sets the default values. func NewContentIdsWithContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsWithContentItemRequestBuilder { m := &ContentIdsWithContentItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentIds/{contentId}", pathParameters), @@ -27,7 +27,7 @@ func NewContentIdsWithContentItemRequestBuilderInternal(pathParameters map[strin return m } -// NewContentIdsWithContentItemRequestBuilder instantiates a new WithContentItemRequestBuilder and sets the default values. +// NewContentIdsWithContentItemRequestBuilder instantiates a new ContentIdsWithContentItemRequestBuilder and sets the default values. func NewContentIdsWithContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsWithContentItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewContentIdsWithContentItemRequestBuilder(rawUrl string, requestAdapter i2 } // Get gets the content for an artifact version in the registry using the unique contentidentifier for that content. This content ID may be shared by multiple artifactversions in the case where the artifact versions are identical.This operation may fail for one of the following reasons:* No content with this `contentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *ContentIdsWithContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentIdsWithContentItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -55,11 +58,13 @@ func (m *ContentIdsWithContentItemRequestBuilder) Get(ctx context.Context, reque } // References the references property +// returns a *ContentIdsItemReferencesRequestBuilder when successful func (m *ContentIdsWithContentItemRequestBuilder) References() *ContentIdsItemReferencesRequestBuilder { return NewContentIdsItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToGetRequestInformation gets the content for an artifact version in the registry using the unique contentidentifier for that content. This content ID may be shared by multiple artifactversions in the case where the artifact versions are identical.This operation may fail for one of the following reasons:* No content with this `contentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentIdsWithContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentIdsWithContentItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -71,6 +76,7 @@ func (m *ContentIdsWithContentItemRequestBuilder) ToGetRequestInformation(ctx co } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentIdsWithContentItemRequestBuilder when successful func (m *ContentIdsWithContentItemRequestBuilder) WithUrl(rawUrl string) *ContentIdsWithContentItemRequestBuilder { return NewContentIdsWithContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/global_ids_item_references_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/global_ids_item_references_request_builder.go index 626b597d82..85c23c4f77 100644 --- a/go-sdk/pkg/registryclient-v2/ids/global_ids_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/global_ids_item_references_request_builder.go @@ -14,7 +14,7 @@ type GlobalIdsItemReferencesRequestBuilder struct { // GlobalIdsItemReferencesRequestBuilderGetQueryParameters returns a list containing all the artifact references using the artifact global ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) type GlobalIdsItemReferencesRequestBuilderGetQueryParameters struct { // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. - // Deprecated: This property is deprecated, use refTypeAsReferenceType instead + // Deprecated: This property is deprecated, use RefTypeAsReferenceType instead RefType *string `uriparametername:"refType"` // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. RefTypeAsReferenceType *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ReferenceType `uriparametername:"refType"` @@ -30,7 +30,7 @@ type GlobalIdsItemReferencesRequestBuilderGetRequestConfiguration struct { QueryParameters *GlobalIdsItemReferencesRequestBuilderGetQueryParameters } -// NewGlobalIdsItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewGlobalIdsItemReferencesRequestBuilderInternal instantiates a new GlobalIdsItemReferencesRequestBuilder and sets the default values. func NewGlobalIdsItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsItemReferencesRequestBuilder { m := &GlobalIdsItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/globalIds/{globalId}/references{?refType*}", pathParameters), @@ -38,7 +38,7 @@ func NewGlobalIdsItemReferencesRequestBuilderInternal(pathParameters map[string] return m } -// NewGlobalIdsItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewGlobalIdsItemReferencesRequestBuilder instantiates a new GlobalIdsItemReferencesRequestBuilder and sets the default values. func NewGlobalIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -46,6 +46,7 @@ func NewGlobalIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae } // Get returns a list containing all the artifact references using the artifact global ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful func (m *GlobalIdsItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *GlobalIdsItemReferencesRequestBuilderGetRequestConfiguration) ([]i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -65,6 +66,7 @@ func (m *GlobalIdsItemReferencesRequestBuilder) Get(ctx context.Context, request } // ToGetRequestInformation returns a list containing all the artifact references using the artifact global ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *GlobalIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GlobalIdsItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -79,6 +81,7 @@ func (m *GlobalIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx cont } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GlobalIdsItemReferencesRequestBuilder when successful func (m *GlobalIdsItemReferencesRequestBuilder) WithUrl(rawUrl string) *GlobalIdsItemReferencesRequestBuilder { return NewGlobalIdsItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/global_ids_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/global_ids_request_builder.go index 4956115247..716382c6c0 100644 --- a/go-sdk/pkg/registryclient-v2/ids/global_ids_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/global_ids_request_builder.go @@ -12,6 +12,7 @@ type GlobalIdsRequestBuilder struct { // ByGlobalId access artifact content utilizing an artifact version's globally unique identifier. // Deprecated: This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead. +// returns a *GlobalIdsWithGlobalItemRequestBuilder when successful func (m *GlobalIdsRequestBuilder) ByGlobalId(globalId string) *GlobalIdsWithGlobalItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -24,6 +25,7 @@ func (m *GlobalIdsRequestBuilder) ByGlobalId(globalId string) *GlobalIdsWithGlob } // ByGlobalIdInt64 access artifact content utilizing an artifact version's globally unique identifier. +// returns a *GlobalIdsWithGlobalItemRequestBuilder when successful func (m *GlobalIdsRequestBuilder) ByGlobalIdInt64(globalId int64) *GlobalIdsWithGlobalItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { diff --git a/go-sdk/pkg/registryclient-v2/ids/global_ids_with_global_item_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/global_ids_with_global_item_request_builder.go index bc5ba94894..c7d3156611 100644 --- a/go-sdk/pkg/registryclient-v2/ids/global_ids_with_global_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/global_ids_with_global_item_request_builder.go @@ -27,7 +27,7 @@ type GlobalIdsWithGlobalItemRequestBuilderGetRequestConfiguration struct { QueryParameters *GlobalIdsWithGlobalItemRequestBuilderGetQueryParameters } -// NewGlobalIdsWithGlobalItemRequestBuilderInternal instantiates a new WithGlobalItemRequestBuilder and sets the default values. +// NewGlobalIdsWithGlobalItemRequestBuilderInternal instantiates a new GlobalIdsWithGlobalItemRequestBuilder and sets the default values. func NewGlobalIdsWithGlobalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsWithGlobalItemRequestBuilder { m := &GlobalIdsWithGlobalItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/globalIds/{globalId}{?dereference*}", pathParameters), @@ -35,7 +35,7 @@ func NewGlobalIdsWithGlobalItemRequestBuilderInternal(pathParameters map[string] return m } -// NewGlobalIdsWithGlobalItemRequestBuilder instantiates a new WithGlobalItemRequestBuilder and sets the default values. +// NewGlobalIdsWithGlobalItemRequestBuilder instantiates a new GlobalIdsWithGlobalItemRequestBuilder and sets the default values. func NewGlobalIdsWithGlobalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsWithGlobalItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -43,6 +43,9 @@ func NewGlobalIdsWithGlobalItemRequestBuilder(rawUrl string, requestAdapter i2ae } // Get gets the content for an artifact version in the registry using its globally uniqueidentifier.This operation may fail for one of the following reasons:* No artifact version with this `globalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a Error error when the service returns a 404 status code +// returns a Error error when the service returns a 500 status code func (m *GlobalIdsWithGlobalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *GlobalIdsWithGlobalItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -63,11 +66,13 @@ func (m *GlobalIdsWithGlobalItemRequestBuilder) Get(ctx context.Context, request } // References the references property +// returns a *GlobalIdsItemReferencesRequestBuilder when successful func (m *GlobalIdsWithGlobalItemRequestBuilder) References() *GlobalIdsItemReferencesRequestBuilder { return NewGlobalIdsItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToGetRequestInformation gets the content for an artifact version in the registry using its globally uniqueidentifier.This operation may fail for one of the following reasons:* No artifact version with this `globalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *GlobalIdsWithGlobalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GlobalIdsWithGlobalItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -82,6 +87,7 @@ func (m *GlobalIdsWithGlobalItemRequestBuilder) ToGetRequestInformation(ctx cont } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GlobalIdsWithGlobalItemRequestBuilder when successful func (m *GlobalIdsWithGlobalItemRequestBuilder) WithUrl(rawUrl string) *GlobalIdsWithGlobalItemRequestBuilder { return NewGlobalIdsWithGlobalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/ids/ids_request_builder.go b/go-sdk/pkg/registryclient-v2/ids/ids_request_builder.go index db637809ce..b60f83cb92 100644 --- a/go-sdk/pkg/registryclient-v2/ids/ids_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/ids/ids_request_builder.go @@ -25,16 +25,19 @@ func NewIdsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c } // ContentHashes the contentHashes property +// returns a *ContentHashesRequestBuilder when successful func (m *IdsRequestBuilder) ContentHashes() *ContentHashesRequestBuilder { return NewContentHashesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ContentIds the contentIds property +// returns a *ContentIdsRequestBuilder when successful func (m *IdsRequestBuilder) ContentIds() *ContentIdsRequestBuilder { return NewContentIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // GlobalIds the globalIds property +// returns a *GlobalIdsRequestBuilder when successful func (m *IdsRequestBuilder) GlobalIds() *GlobalIdsRequestBuilder { return NewGlobalIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/kiota-lock.json b/go-sdk/pkg/registryclient-v2/kiota-lock.json index 4be6dbd30f..d03b135110 100644 --- a/go-sdk/pkg/registryclient-v2/kiota-lock.json +++ b/go-sdk/pkg/registryclient-v2/kiota-lock.json @@ -1,14 +1,15 @@ { - "descriptionHash": "DE570EA603C95AA82E832072BCB28674905776184AD671DD24DB82CB6A4FE3FBBEBDB2FB7B503B49FD1F93546212A08A8E771B1D09CDAA4DDC2F91BF6A669839", + "descriptionHash": "82EFC37B503048188E2ACE19DAFDDF22AE8876C5CD5EA2D54272BBB765BFC2EF81673B2A2CA2D7F170AC174869144A744865C979DA5CF212AAE2364DB4EA46C6", "descriptionLocation": "../../v2.json", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.10.1", + "kiotaVersion": "1.18.0", "clientClassName": "ApiClient", "clientNamespaceName": "github.com/apicurio/apicurio-registry/go-sdk/pkg/registryclient-v2", "language": "Go", "usesBackingStore": false, "excludeBackwardCompatible": false, "includeAdditionalData": true, + "disableSSLValidation": false, "serializers": [ "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_content.go b/go-sdk/pkg/registryclient-v2/models/artifact_content.go index a73632c944..14aba0d488 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_content.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_content.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ArtifactContent type ArtifactContent struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,21 +21,25 @@ func NewArtifactContent() *ArtifactContent { } // CreateArtifactContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactContent(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactContent) GetAdditionalData() map[string]any { return m.additionalData } // GetContent gets the content property value. Raw content of the artifact or a valid (and accessible) URL where the content can be found. +// returns a *string when successful func (m *ArtifactContent) GetContent() *string { return m.content } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactContent) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["content"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -69,6 +72,7 @@ func (m *ArtifactContent) GetFieldDeserializers() map[string]func(i878a80d2330e8 } // GetReferences gets the references property value. Collection of references to other artifacts. +// returns a []ArtifactReferenceable when successful func (m *ArtifactContent) GetReferences() []ArtifactReferenceable { return m.references } @@ -117,7 +121,6 @@ func (m *ArtifactContent) SetReferences(value []ArtifactReferenceable) { m.references = value } -// ArtifactContentable type ArtifactContentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_meta_data.go b/go-sdk/pkg/registryclient-v2/models/artifact_meta_data.go index 33e11e001b..134218c931 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_meta_data.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// ArtifactMetaData type ArtifactMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -51,36 +50,43 @@ func NewArtifactMetaData() *ArtifactMetaData { } // CreateArtifactMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetContentId gets the contentId property value. The contentId property +// returns a *int64 when successful func (m *ArtifactMetaData) GetContentId() *int64 { return m.contentId } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *ArtifactMetaData) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *ArtifactMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *ArtifactMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["contentId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -259,61 +265,73 @@ func (m *ArtifactMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetGlobalId gets the globalId property value. The globalId property +// returns a *int64 when successful func (m *ArtifactMetaData) GetGlobalId() *int64 { return m.globalId } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *ArtifactMetaData) GetGroupId() *string { return m.groupId } // GetId gets the id property value. The ID of a single artifact. +// returns a *string when successful func (m *ArtifactMetaData) GetId() *string { return m.id } // GetLabels gets the labels property value. The labels property +// returns a []string when successful func (m *ArtifactMetaData) GetLabels() []string { return m.labels } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *ArtifactMetaData) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *ArtifactMetaData) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ArtifactMetaData) GetName() *string { return m.name } // GetProperties gets the properties property value. User-defined name-value pairs. Name and value must be strings. +// returns a Propertiesable when successful func (m *ArtifactMetaData) GetProperties() Propertiesable { return m.properties } // GetReferences gets the references property value. The references property +// returns a []ArtifactReferenceable when successful func (m *ArtifactMetaData) GetReferences() []ArtifactReferenceable { return m.references } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *ArtifactState when successful func (m *ArtifactMetaData) GetState() *ArtifactState { return m.state } // GetTypeEscaped gets the type property value. The type property +// returns a *string when successful func (m *ArtifactMetaData) GetTypeEscaped() *string { return m.typeEscaped } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *ArtifactMetaData) GetVersion() *string { return m.version } @@ -517,7 +535,6 @@ func (m *ArtifactMetaData) SetVersion(value *string) { m.version = value } -// ArtifactMetaDataable type ArtifactMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_owner.go b/go-sdk/pkg/registryclient-v2/models/artifact_owner.go index f2c5af8575..eaa8eee559 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_owner.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_owner.go @@ -20,16 +20,19 @@ func NewArtifactOwner() *ArtifactOwner { } // CreateArtifactOwnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactOwnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactOwner(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactOwner) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactOwner) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["owner"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +49,7 @@ func (m *ArtifactOwner) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *ArtifactOwner) GetOwner() *string { return m.owner } @@ -77,7 +81,6 @@ func (m *ArtifactOwner) SetOwner(value *string) { m.owner = value } -// ArtifactOwnerable type ArtifactOwnerable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_reference.go b/go-sdk/pkg/registryclient-v2/models/artifact_reference.go index abe393d87c..4d268ce3d1 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_reference.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_reference.go @@ -26,21 +26,25 @@ func NewArtifactReference() *ArtifactReference { } // CreateArtifactReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactReference(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactReference) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The artifactId property +// returns a *string when successful func (m *ArtifactReference) GetArtifactId() *string { return m.artifactId } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactReference) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -87,16 +91,19 @@ func (m *ArtifactReference) GetFieldDeserializers() map[string]func(i878a80d2330 } // GetGroupId gets the groupId property value. The groupId property +// returns a *string when successful func (m *ArtifactReference) GetGroupId() *string { return m.groupId } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ArtifactReference) GetName() *string { return m.name } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *ArtifactReference) GetVersion() *string { return m.version } @@ -161,7 +168,6 @@ func (m *ArtifactReference) SetVersion(value *string) { m.version = value } -// ArtifactReferenceable type ArtifactReferenceable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_search_results.go b/go-sdk/pkg/registryclient-v2/models/artifact_search_results.go index e3937d6f6b..0439457f2e 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_search_results.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_search_results.go @@ -22,26 +22,31 @@ func NewArtifactSearchResults() *ArtifactSearchResults { } // CreateArtifactSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifacts gets the artifacts property value. The artifacts returned in the result set. +// returns a []SearchedArtifactable when successful func (m *ArtifactSearchResults) GetArtifacts() []SearchedArtifactable { return m.artifacts } // GetCount gets the count property value. The total number of artifacts that matched the query that produced the result set (may be more than the number of artifacts in the result set). +// returns a *int32 when successful func (m *ArtifactSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifacts"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -117,7 +122,6 @@ func (m *ArtifactSearchResults) SetCount(value *int32) { m.count = value } -// ArtifactSearchResultsable type ArtifactSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_state.go b/go-sdk/pkg/registryclient-v2/models/artifact_state.go index ac08c43e21..a0a962ecee 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_state.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_state.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - // Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED type ArtifactState int @@ -26,7 +22,7 @@ func ParseArtifactState(v string) (any, error) { case "DEPRECATED": result = DEPRECATED_ARTIFACTSTATE default: - return 0, errors.New("Unknown ArtifactState value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/artifact_type_info.go b/go-sdk/pkg/registryclient-v2/models/artifact_type_info.go index 32d78f5d4f..7da85c7e50 100644 --- a/go-sdk/pkg/registryclient-v2/models/artifact_type_info.go +++ b/go-sdk/pkg/registryclient-v2/models/artifact_type_info.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ArtifactTypeInfo type ArtifactTypeInfo struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewArtifactTypeInfo() *ArtifactTypeInfo { } // CreateArtifactTypeInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactTypeInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactTypeInfo(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactTypeInfo) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactTypeInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["name"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *ArtifactTypeInfo) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ArtifactTypeInfo) GetName() *string { return m.name } @@ -77,7 +80,6 @@ func (m *ArtifactTypeInfo) SetName(value *string) { m.name = value } -// ArtifactTypeInfoable type ArtifactTypeInfoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/comment.go b/go-sdk/pkg/registryclient-v2/models/comment.go index 9bfb69491a..4b8d29f307 100644 --- a/go-sdk/pkg/registryclient-v2/models/comment.go +++ b/go-sdk/pkg/registryclient-v2/models/comment.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// Comment type Comment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -27,31 +26,37 @@ func NewComment() *Comment { } // CreateCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewComment(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Comment) GetAdditionalData() map[string]any { return m.additionalData } // GetCommentId gets the commentId property value. The commentId property +// returns a *string when successful func (m *Comment) GetCommentId() *string { return m.commentId } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *Comment) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *Comment) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Comment) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["commentId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -98,6 +103,7 @@ func (m *Comment) GetFieldDeserializers() map[string]func(i878a80d2330e89d268963 } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *Comment) GetValue() *string { return m.value } @@ -162,7 +168,6 @@ func (m *Comment) SetValue(value *string) { m.value = value } -// Commentable type Commentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/configuration_property.go b/go-sdk/pkg/registryclient-v2/models/configuration_property.go index 1654aa3166..28c240748a 100644 --- a/go-sdk/pkg/registryclient-v2/models/configuration_property.go +++ b/go-sdk/pkg/registryclient-v2/models/configuration_property.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ConfigurationProperty type ConfigurationProperty struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -28,21 +27,25 @@ func NewConfigurationProperty() *ConfigurationProperty { } // CreateConfigurationPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateConfigurationPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewConfigurationProperty(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ConfigurationProperty) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *ConfigurationProperty) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ConfigurationProperty) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -99,21 +102,25 @@ func (m *ConfigurationProperty) GetFieldDeserializers() map[string]func(i878a80d } // GetLabel gets the label property value. The label property +// returns a *string when successful func (m *ConfigurationProperty) GetLabel() *string { return m.label } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ConfigurationProperty) GetName() *string { return m.name } // GetTypeEscaped gets the type property value. The type property +// returns a *string when successful func (m *ConfigurationProperty) GetTypeEscaped() *string { return m.typeEscaped } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *ConfigurationProperty) GetValue() *string { return m.value } @@ -189,7 +196,6 @@ func (m *ConfigurationProperty) SetValue(value *string) { m.value = value } -// ConfigurationPropertyable type ConfigurationPropertyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/create_group_meta_data.go b/go-sdk/pkg/registryclient-v2/models/create_group_meta_data.go index eeb71dda38..0b28b0a83a 100644 --- a/go-sdk/pkg/registryclient-v2/models/create_group_meta_data.go +++ b/go-sdk/pkg/registryclient-v2/models/create_group_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CreateGroupMetaData type CreateGroupMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -24,21 +23,25 @@ func NewCreateGroupMetaData() *CreateGroupMetaData { } // CreateCreateGroupMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateGroupMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateGroupMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateGroupMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *CreateGroupMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateGroupMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -75,11 +78,13 @@ func (m *CreateGroupMetaData) GetFieldDeserializers() map[string]func(i878a80d23 } // GetId gets the id property value. The id property +// returns a *string when successful func (m *CreateGroupMetaData) GetId() *string { return m.id } // GetProperties gets the properties property value. User-defined name-value pairs. Name and value must be strings. +// returns a Propertiesable when successful func (m *CreateGroupMetaData) GetProperties() Propertiesable { return m.properties } @@ -133,7 +138,6 @@ func (m *CreateGroupMetaData) SetProperties(value Propertiesable) { m.properties = value } -// CreateGroupMetaDataable type CreateGroupMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/d_t_o_new_comment.go b/go-sdk/pkg/registryclient-v2/models/d_t_o_new_comment.go index 8c9839fb75..a4c450e773 100644 --- a/go-sdk/pkg/registryclient-v2/models/d_t_o_new_comment.go +++ b/go-sdk/pkg/registryclient-v2/models/d_t_o_new_comment.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// DTONewComment type DTONewComment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewDTONewComment() *DTONewComment { } // CreateDTONewCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateDTONewCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDTONewComment(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *DTONewComment) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DTONewComment) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *DTONewComment) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *DTONewComment) GetValue() *string { return m.value } @@ -77,7 +80,6 @@ func (m *DTONewComment) SetValue(value *string) { m.value = value } -// DTONewCommentable type DTONewCommentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/download_ref.go b/go-sdk/pkg/registryclient-v2/models/download_ref.go index 1bb57142fb..90d3986338 100644 --- a/go-sdk/pkg/registryclient-v2/models/download_ref.go +++ b/go-sdk/pkg/registryclient-v2/models/download_ref.go @@ -22,21 +22,25 @@ func NewDownloadRef() *DownloadRef { } // CreateDownloadRefFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateDownloadRefFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDownloadRef(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *DownloadRef) GetAdditionalData() map[string]any { return m.additionalData } // GetDownloadId gets the downloadId property value. The downloadId property +// returns a *string when successful func (m *DownloadRef) GetDownloadId() *string { return m.downloadId } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DownloadRef) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["downloadId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +67,7 @@ func (m *DownloadRef) GetFieldDeserializers() map[string]func(i878a80d2330e89d26 } // GetHref gets the href property value. The href property +// returns a *string when successful func (m *DownloadRef) GetHref() *string { return m.href } @@ -105,7 +110,6 @@ func (m *DownloadRef) SetHref(value *string) { m.href = value } -// DownloadRefable type DownloadRefable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/editable_meta_data.go b/go-sdk/pkg/registryclient-v2/models/editable_meta_data.go index 5ef17c568c..99a60bc1f9 100644 --- a/go-sdk/pkg/registryclient-v2/models/editable_meta_data.go +++ b/go-sdk/pkg/registryclient-v2/models/editable_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// EditableMetaData type EditableMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -26,21 +25,25 @@ func NewEditableMetaData() *EditableMetaData { } // CreateEditableMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateEditableMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEditableMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *EditableMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *EditableMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EditableMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -93,16 +96,19 @@ func (m *EditableMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetLabels gets the labels property value. The labels property +// returns a []string when successful func (m *EditableMetaData) GetLabels() []string { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *EditableMetaData) GetName() *string { return m.name } // GetProperties gets the properties property value. User-defined name-value pairs. Name and value must be strings. +// returns a Propertiesable when successful func (m *EditableMetaData) GetProperties() Propertiesable { return m.properties } @@ -167,7 +173,6 @@ func (m *EditableMetaData) SetProperties(value Propertiesable) { m.properties = value } -// EditableMetaDataable type EditableMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/error.go b/go-sdk/pkg/registryclient-v2/models/error.go index 87b05446bf..5c5940de9f 100644 --- a/go-sdk/pkg/registryclient-v2/models/error.go +++ b/go-sdk/pkg/registryclient-v2/models/error.go @@ -30,31 +30,37 @@ func NewError() *Error { } // CreateErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewError(), nil } // Error the primary error message. +// returns a string when successful func (m *Error) Error() string { return m.ApiError.Error() } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Error) GetAdditionalData() map[string]any { return m.additionalData } // GetDetail gets the detail property value. Full details about the error. This might contain a server stack trace, for example. +// returns a *string when successful func (m *Error) GetDetail() *string { return m.detail } // GetErrorCode gets the error_code property value. The server-side error code. +// returns a *int32 when successful func (m *Error) GetErrorCode() *int32 { return m.error_code } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Error) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["detail"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -101,11 +107,13 @@ func (m *Error) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388 } // GetMessage gets the message property value. The short error message. +// returns a *string when successful func (m *Error) GetMessage() *string { return m.message } // GetName gets the name property value. The error name - typically the classname of the exception thrown by the server. +// returns a *string when successful func (m *Error) GetName() *string { return m.name } @@ -170,7 +178,6 @@ func (m *Error) SetName(value *string) { m.name = value } -// Errorable type Errorable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/group_meta_data.go b/go-sdk/pkg/registryclient-v2/models/group_meta_data.go index 401aee2dc3..951b6090ce 100644 --- a/go-sdk/pkg/registryclient-v2/models/group_meta_data.go +++ b/go-sdk/pkg/registryclient-v2/models/group_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// GroupMetaData type GroupMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -33,31 +32,37 @@ func NewGroupMetaData() *GroupMetaData { } // CreateGroupMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateGroupMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewGroupMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *GroupMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *GroupMetaData) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *GroupMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *GroupMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *GroupMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["createdBy"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -134,21 +139,25 @@ func (m *GroupMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetId gets the id property value. An ID of a single artifact group. +// returns a *string when successful func (m *GroupMetaData) GetId() *string { return m.id } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *GroupMetaData) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *GroupMetaData) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetProperties gets the properties property value. User-defined name-value pairs. Name and value must be strings. +// returns a Propertiesable when successful func (m *GroupMetaData) GetProperties() Propertiesable { return m.properties } @@ -246,7 +255,6 @@ func (m *GroupMetaData) SetProperties(value Propertiesable) { m.properties = value } -// GroupMetaDataable type GroupMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/group_search_results.go b/go-sdk/pkg/registryclient-v2/models/group_search_results.go index 9c70490dbc..ef28fb9b20 100644 --- a/go-sdk/pkg/registryclient-v2/models/group_search_results.go +++ b/go-sdk/pkg/registryclient-v2/models/group_search_results.go @@ -22,21 +22,25 @@ func NewGroupSearchResults() *GroupSearchResults { } // CreateGroupSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateGroupSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewGroupSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *GroupSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetCount gets the count property value. The total number of groups that matched the query that produced the result set (may be more than the number of groups in the result set). +// returns a *int32 when successful func (m *GroupSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *GroupSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["count"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -69,6 +73,7 @@ func (m *GroupSearchResults) GetFieldDeserializers() map[string]func(i878a80d233 } // GetGroups gets the groups property value. The groups returned in the result set. +// returns a []SearchedGroupable when successful func (m *GroupSearchResults) GetGroups() []SearchedGroupable { return m.groups } @@ -117,7 +122,6 @@ func (m *GroupSearchResults) SetGroups(value []SearchedGroupable) { m.groups = value } -// GroupSearchResultsable type GroupSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/if_exists.go b/go-sdk/pkg/registryclient-v2/models/if_exists.go index b7f43d0d8b..37386ae3bd 100644 --- a/go-sdk/pkg/registryclient-v2/models/if_exists.go +++ b/go-sdk/pkg/registryclient-v2/models/if_exists.go @@ -1,15 +1,11 @@ package models -import ( - "errors" -) - type IfExists int const ( FAIL_IFEXISTS IfExists = iota UPDATE_IFEXISTS - RETURNESCAPED_IFEXISTS + RETURN_IFEXISTS RETURN_OR_UPDATE_IFEXISTS ) @@ -24,11 +20,11 @@ func ParseIfExists(v string) (any, error) { case "UPDATE": result = UPDATE_IFEXISTS case "RETURN": - result = RETURNESCAPED_IFEXISTS + result = RETURN_IFEXISTS case "RETURN_OR_UPDATE": result = RETURN_OR_UPDATE_IFEXISTS default: - return 0, errors.New("Unknown IfExists value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/limits.go b/go-sdk/pkg/registryclient-v2/models/limits.go index 8a0c0ff849..fc0d12e206 100644 --- a/go-sdk/pkg/registryclient-v2/models/limits.go +++ b/go-sdk/pkg/registryclient-v2/models/limits.go @@ -42,16 +42,19 @@ func NewLimits() *Limits { } // CreateLimitsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateLimitsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewLimits(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Limits) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Limits) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["maxArtifactDescriptionLengthChars"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -178,61 +181,73 @@ func (m *Limits) GetFieldDeserializers() map[string]func(i878a80d2330e89d2689638 } // GetMaxArtifactDescriptionLengthChars gets the maxArtifactDescriptionLengthChars property value. The maxArtifactDescriptionLengthChars property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactDescriptionLengthChars() *int64 { return m.maxArtifactDescriptionLengthChars } // GetMaxArtifactLabelsCount gets the maxArtifactLabelsCount property value. The maxArtifactLabelsCount property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactLabelsCount() *int64 { return m.maxArtifactLabelsCount } // GetMaxArtifactNameLengthChars gets the maxArtifactNameLengthChars property value. The maxArtifactNameLengthChars property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactNameLengthChars() *int64 { return m.maxArtifactNameLengthChars } // GetMaxArtifactPropertiesCount gets the maxArtifactPropertiesCount property value. The maxArtifactPropertiesCount property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactPropertiesCount() *int64 { return m.maxArtifactPropertiesCount } // GetMaxArtifactsCount gets the maxArtifactsCount property value. The maxArtifactsCount property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactsCount() *int64 { return m.maxArtifactsCount } // GetMaxLabelSizeBytes gets the maxLabelSizeBytes property value. The maxLabelSizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxLabelSizeBytes() *int64 { return m.maxLabelSizeBytes } // GetMaxPropertyKeySizeBytes gets the maxPropertyKeySizeBytes property value. The maxPropertyKeySizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxPropertyKeySizeBytes() *int64 { return m.maxPropertyKeySizeBytes } // GetMaxPropertyValueSizeBytes gets the maxPropertyValueSizeBytes property value. The maxPropertyValueSizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxPropertyValueSizeBytes() *int64 { return m.maxPropertyValueSizeBytes } // GetMaxRequestsPerSecondCount gets the maxRequestsPerSecondCount property value. The maxRequestsPerSecondCount property +// returns a *int64 when successful func (m *Limits) GetMaxRequestsPerSecondCount() *int64 { return m.maxRequestsPerSecondCount } // GetMaxSchemaSizeBytes gets the maxSchemaSizeBytes property value. The maxSchemaSizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxSchemaSizeBytes() *int64 { return m.maxSchemaSizeBytes } // GetMaxTotalSchemasCount gets the maxTotalSchemasCount property value. The maxTotalSchemasCount property +// returns a *int64 when successful func (m *Limits) GetMaxTotalSchemasCount() *int64 { return m.maxTotalSchemasCount } // GetMaxVersionsPerArtifactCount gets the maxVersionsPerArtifactCount property value. The maxVersionsPerArtifactCount property +// returns a *int64 when successful func (m *Limits) GetMaxVersionsPerArtifactCount() *int64 { return m.maxVersionsPerArtifactCount } @@ -385,7 +400,6 @@ func (m *Limits) SetMaxVersionsPerArtifactCount(value *int64) { m.maxVersionsPerArtifactCount = value } -// Limitsable type Limitsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/properties.go b/go-sdk/pkg/registryclient-v2/models/properties.go index 55e068035b..51787b8bc1 100644 --- a/go-sdk/pkg/registryclient-v2/models/properties.go +++ b/go-sdk/pkg/registryclient-v2/models/properties.go @@ -18,16 +18,19 @@ func NewProperties() *Properties { } // CreatePropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreatePropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewProperties(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Properties) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Properties) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) return res @@ -49,7 +52,6 @@ func (m *Properties) SetAdditionalData(value map[string]any) { m.additionalData = value } -// Propertiesable type Propertiesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/reference_type.go b/go-sdk/pkg/registryclient-v2/models/reference_type.go index 2497ba119a..cd06d1ce4c 100644 --- a/go-sdk/pkg/registryclient-v2/models/reference_type.go +++ b/go-sdk/pkg/registryclient-v2/models/reference_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type ReferenceType int const ( @@ -22,7 +18,7 @@ func ParseReferenceType(v string) (any, error) { case "INBOUND": result = INBOUND_REFERENCETYPE default: - return 0, errors.New("Unknown ReferenceType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/role_mapping.go b/go-sdk/pkg/registryclient-v2/models/role_mapping.go index 6af45e1fd8..470d75278e 100644 --- a/go-sdk/pkg/registryclient-v2/models/role_mapping.go +++ b/go-sdk/pkg/registryclient-v2/models/role_mapping.go @@ -24,16 +24,19 @@ func NewRoleMapping() *RoleMapping { } // CreateRoleMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRoleMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRoleMapping(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *RoleMapping) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RoleMapping) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["principalId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -70,16 +73,19 @@ func (m *RoleMapping) GetFieldDeserializers() map[string]func(i878a80d2330e89d26 } // GetPrincipalId gets the principalId property value. The principalId property +// returns a *string when successful func (m *RoleMapping) GetPrincipalId() *string { return m.principalId } // GetPrincipalName gets the principalName property value. A friendly name for the principal. +// returns a *string when successful func (m *RoleMapping) GetPrincipalName() *string { return m.principalName } // GetRole gets the role property value. The role property +// returns a *RoleType when successful func (m *RoleMapping) GetRole() *RoleType { return m.role } @@ -134,7 +140,6 @@ func (m *RoleMapping) SetRole(value *RoleType) { m.role = value } -// RoleMappingable type RoleMappingable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/role_type.go b/go-sdk/pkg/registryclient-v2/models/role_type.go index 47616edc63..cc1e715b61 100644 --- a/go-sdk/pkg/registryclient-v2/models/role_type.go +++ b/go-sdk/pkg/registryclient-v2/models/role_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type RoleType int const ( @@ -25,7 +21,7 @@ func ParseRoleType(v string) (any, error) { case "ADMIN": result = ADMIN_ROLETYPE default: - return 0, errors.New("Unknown RoleType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/rule.go b/go-sdk/pkg/registryclient-v2/models/rule.go index 4b1be678f1..a03da2ed0b 100644 --- a/go-sdk/pkg/registryclient-v2/models/rule.go +++ b/go-sdk/pkg/registryclient-v2/models/rule.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// Rule type Rule struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,21 +21,25 @@ func NewRule() *Rule { } // CreateRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRule(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Rule) GetAdditionalData() map[string]any { return m.additionalData } // GetConfig gets the config property value. The config property +// returns a *string when successful func (m *Rule) GetConfig() *string { return m.config } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Rule) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["config"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +66,7 @@ func (m *Rule) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a } // GetTypeEscaped gets the type property value. The type property +// returns a *RuleType when successful func (m *Rule) GetTypeEscaped() *RuleType { return m.typeEscaped } @@ -106,7 +110,6 @@ func (m *Rule) SetTypeEscaped(value *RuleType) { m.typeEscaped = value } -// Ruleable type Ruleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/rule_type.go b/go-sdk/pkg/registryclient-v2/models/rule_type.go index 4550ed541f..dbec88af77 100644 --- a/go-sdk/pkg/registryclient-v2/models/rule_type.go +++ b/go-sdk/pkg/registryclient-v2/models/rule_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type RuleType int const ( @@ -25,7 +21,7 @@ func ParseRuleType(v string) (any, error) { case "INTEGRITY": result = INTEGRITY_RULETYPE default: - return 0, errors.New("Unknown RuleType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/rule_violation_cause.go b/go-sdk/pkg/registryclient-v2/models/rule_violation_cause.go index 688b049fc2..9fb54d4007 100644 --- a/go-sdk/pkg/registryclient-v2/models/rule_violation_cause.go +++ b/go-sdk/pkg/registryclient-v2/models/rule_violation_cause.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// RuleViolationCause type RuleViolationCause struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,26 +21,31 @@ func NewRuleViolationCause() *RuleViolationCause { } // CreateRuleViolationCauseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRuleViolationCauseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRuleViolationCause(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *RuleViolationCause) GetAdditionalData() map[string]any { return m.additionalData } // GetContext gets the context property value. The context property +// returns a *string when successful func (m *RuleViolationCause) GetContext() *string { return m.context } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *RuleViolationCause) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RuleViolationCause) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["context"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -105,7 +109,6 @@ func (m *RuleViolationCause) SetDescription(value *string) { m.description = value } -// RuleViolationCauseable type RuleViolationCauseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/rule_violation_error.go b/go-sdk/pkg/registryclient-v2/models/rule_violation_error.go index 77ef3ab853..2059486a8c 100644 --- a/go-sdk/pkg/registryclient-v2/models/rule_violation_error.go +++ b/go-sdk/pkg/registryclient-v2/models/rule_violation_error.go @@ -1,37 +1,76 @@ package models import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) // RuleViolationError all error responses, whether `4xx` or `5xx` will include one of these as the responsebody. type RuleViolationError struct { - Error + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any // List of rule violation causes. causes []RuleViolationCauseable + // Full details about the error. This might contain a server stack trace, for example. + detail *string + // The server-side error code. + error_code *int32 + // The short error message. + message *string + // The error name - typically the classname of the exception thrown by the server. + name *string } // NewRuleViolationError instantiates a new RuleViolationError and sets the default values. func NewRuleViolationError() *RuleViolationError { m := &RuleViolationError{ - Error: *NewError(), + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), } + m.SetAdditionalData(make(map[string]any)) return m } // CreateRuleViolationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRuleViolationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRuleViolationError(), nil } +// Error the primary error message. +// returns a string when successful +func (m *RuleViolationError) Error() string { + return m.ApiError.Error() +} + +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RuleViolationError) GetAdditionalData() map[string]any { + return m.additionalData +} + // GetCauses gets the causes property value. List of rule violation causes. +// returns a []RuleViolationCauseable when successful func (m *RuleViolationError) GetCauses() []RuleViolationCauseable { return m.causes } +// GetDetail gets the detail property value. Full details about the error. This might contain a server stack trace, for example. +// returns a *string when successful +func (m *RuleViolationError) GetDetail() *string { + return m.detail +} + +// GetErrorCode gets the error_code property value. The server-side error code. +// returns a *int32 when successful +func (m *RuleViolationError) GetErrorCode() *int32 { + return m.error_code +} + // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RuleViolationError) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - res := m.Error.GetFieldDeserializers() + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["causes"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateRuleViolationCauseFromDiscriminatorValue) if err != nil { @@ -48,15 +87,63 @@ func (m *RuleViolationError) GetFieldDeserializers() map[string]func(i878a80d233 } return nil } + res["detail"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(val) + } + return nil + } + res["error_code"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["message"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["name"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } return res } +// GetMessage gets the message property value. The short error message. +// returns a *string when successful +func (m *RuleViolationError) GetMessage() *string { + return m.message +} + +// GetName gets the name property value. The error name - typically the classname of the exception thrown by the server. +// returns a *string when successful +func (m *RuleViolationError) GetName() *string { + return m.name +} + // Serialize serializes information the current object func (m *RuleViolationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { - err := m.Error.Serialize(writer) - if err != nil { - return err - } if m.GetCauses() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCauses())) for i, v := range m.GetCauses() { @@ -64,7 +151,37 @@ func (m *RuleViolationError) Serialize(writer i878a80d2330e89d26896388a3f487eef2 cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) } } - err = writer.WriteCollectionOfObjectValues("causes", cast) + err := writer.WriteCollectionOfObjectValues("causes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("error_code", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { return err } @@ -72,15 +189,46 @@ func (m *RuleViolationError) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return nil } +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RuleViolationError) SetAdditionalData(value map[string]any) { + m.additionalData = value +} + // SetCauses sets the causes property value. List of rule violation causes. func (m *RuleViolationError) SetCauses(value []RuleViolationCauseable) { m.causes = value } -// RuleViolationErrorable +// SetDetail sets the detail property value. Full details about the error. This might contain a server stack trace, for example. +func (m *RuleViolationError) SetDetail(value *string) { + m.detail = value +} + +// SetErrorCode sets the error_code property value. The server-side error code. +func (m *RuleViolationError) SetErrorCode(value *int32) { + m.error_code = value +} + +// SetMessage sets the message property value. The short error message. +func (m *RuleViolationError) SetMessage(value *string) { + m.message = value +} + +// SetName sets the name property value. The error name - typically the classname of the exception thrown by the server. +func (m *RuleViolationError) SetName(value *string) { + m.name = value +} + type RuleViolationErrorable interface { - Errorable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCauses() []RuleViolationCauseable + GetDetail() *string + GetErrorCode() *int32 + GetMessage() *string + GetName() *string SetCauses(value []RuleViolationCauseable) + SetDetail(value *string) + SetErrorCode(value *int32) + SetMessage(value *string) + SetName(value *string) } diff --git a/go-sdk/pkg/registryclient-v2/models/searched_artifact.go b/go-sdk/pkg/registryclient-v2/models/searched_artifact.go index e00f2bfd6a..c67718c697 100644 --- a/go-sdk/pkg/registryclient-v2/models/searched_artifact.go +++ b/go-sdk/pkg/registryclient-v2/models/searched_artifact.go @@ -41,31 +41,37 @@ func NewSearchedArtifact() *SearchedArtifact { } // CreateSearchedArtifactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedArtifactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedArtifact(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedArtifact) GetAdditionalData() map[string]any { return m.additionalData } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *SearchedArtifact) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedArtifact) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedArtifact) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedArtifact) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["createdBy"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -188,41 +194,49 @@ func (m *SearchedArtifact) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *SearchedArtifact) GetGroupId() *string { return m.groupId } // GetId gets the id property value. The ID of a single artifact. +// returns a *string when successful func (m *SearchedArtifact) GetId() *string { return m.id } // GetLabels gets the labels property value. The labels property +// returns a []string when successful func (m *SearchedArtifact) GetLabels() []string { return m.labels } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *SearchedArtifact) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *SearchedArtifact) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetName gets the name property value. The name property +// returns a *string when successful func (m *SearchedArtifact) GetName() *string { return m.name } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *ArtifactState when successful func (m *SearchedArtifact) GetState() *ArtifactState { return m.state } // GetTypeEscaped gets the type property value. The type property +// returns a *string when successful func (m *SearchedArtifact) GetTypeEscaped() *string { return m.typeEscaped } @@ -365,7 +379,6 @@ func (m *SearchedArtifact) SetTypeEscaped(value *string) { m.typeEscaped = value } -// SearchedArtifactable type SearchedArtifactable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/searched_group.go b/go-sdk/pkg/registryclient-v2/models/searched_group.go index cb0e646b5c..fab6989b54 100644 --- a/go-sdk/pkg/registryclient-v2/models/searched_group.go +++ b/go-sdk/pkg/registryclient-v2/models/searched_group.go @@ -31,31 +31,37 @@ func NewSearchedGroup() *SearchedGroup { } // CreateSearchedGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedGroup(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedGroup) GetAdditionalData() map[string]any { return m.additionalData } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *SearchedGroup) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedGroup) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedGroup) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedGroup) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["createdBy"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -122,16 +128,19 @@ func (m *SearchedGroup) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetId gets the id property value. An ID of a single artifact group. +// returns a *string when successful func (m *SearchedGroup) GetId() *string { return m.id } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *SearchedGroup) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *SearchedGroup) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } @@ -218,7 +227,6 @@ func (m *SearchedGroup) SetModifiedOn(value *i336074805fc853987abe6f7fe3ad97a6a6 m.modifiedOn = value } -// SearchedGroupable type SearchedGroupable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/searched_version.go b/go-sdk/pkg/registryclient-v2/models/searched_version.go index 0a5d142dab..55e5f4a059 100644 --- a/go-sdk/pkg/registryclient-v2/models/searched_version.go +++ b/go-sdk/pkg/registryclient-v2/models/searched_version.go @@ -43,36 +43,43 @@ func NewSearchedVersion() *SearchedVersion { } // CreateSearchedVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedVersion(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedVersion) GetAdditionalData() map[string]any { return m.additionalData } // GetContentId gets the contentId property value. The contentId property +// returns a *int64 when successful func (m *SearchedVersion) GetContentId() *int64 { return m.contentId } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *SearchedVersion) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedVersion) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedVersion) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedVersion) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["contentId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -211,41 +218,49 @@ func (m *SearchedVersion) GetFieldDeserializers() map[string]func(i878a80d2330e8 } // GetGlobalId gets the globalId property value. The globalId property +// returns a *int64 when successful func (m *SearchedVersion) GetGlobalId() *int64 { return m.globalId } // GetLabels gets the labels property value. The labels property +// returns a []string when successful func (m *SearchedVersion) GetLabels() []string { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *SearchedVersion) GetName() *string { return m.name } // GetProperties gets the properties property value. User-defined name-value pairs. Name and value must be strings. +// returns a Propertiesable when successful func (m *SearchedVersion) GetProperties() Propertiesable { return m.properties } // GetReferences gets the references property value. The references property +// returns a []ArtifactReferenceable when successful func (m *SearchedVersion) GetReferences() []ArtifactReferenceable { return m.references } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *ArtifactState when successful func (m *SearchedVersion) GetState() *ArtifactState { return m.state } // GetTypeEscaped gets the type property value. The type property +// returns a *string when successful func (m *SearchedVersion) GetTypeEscaped() *string { return m.typeEscaped } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *SearchedVersion) GetVersion() *string { return m.version } @@ -405,7 +420,6 @@ func (m *SearchedVersion) SetVersion(value *string) { m.version = value } -// SearchedVersionable type SearchedVersionable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/sort_by.go b/go-sdk/pkg/registryclient-v2/models/sort_by.go index dd811bd895..5fb4265f92 100644 --- a/go-sdk/pkg/registryclient-v2/models/sort_by.go +++ b/go-sdk/pkg/registryclient-v2/models/sort_by.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type SortBy int const ( @@ -22,7 +18,7 @@ func ParseSortBy(v string) (any, error) { case "createdOn": result = CREATEDON_SORTBY default: - return 0, errors.New("Unknown SortBy value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/sort_order.go b/go-sdk/pkg/registryclient-v2/models/sort_order.go index 645adcf3c2..8dd148a895 100644 --- a/go-sdk/pkg/registryclient-v2/models/sort_order.go +++ b/go-sdk/pkg/registryclient-v2/models/sort_order.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type SortOrder int const ( @@ -22,7 +18,7 @@ func ParseSortOrder(v string) (any, error) { case "desc": result = DESC_SORTORDER default: - return 0, errors.New("Unknown SortOrder value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/models/system_info.go b/go-sdk/pkg/registryclient-v2/models/system_info.go index a82f6b9a31..56f135be54 100644 --- a/go-sdk/pkg/registryclient-v2/models/system_info.go +++ b/go-sdk/pkg/registryclient-v2/models/system_info.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// SystemInfo type SystemInfo struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -27,26 +26,31 @@ func NewSystemInfo() *SystemInfo { } // CreateSystemInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSystemInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSystemInfo(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SystemInfo) GetAdditionalData() map[string]any { return m.additionalData } // GetBuiltOn gets the builtOn property value. The builtOn property +// returns a *Time when successful func (m *SystemInfo) GetBuiltOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.builtOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SystemInfo) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SystemInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["builtOn"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -93,11 +97,13 @@ func (m *SystemInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d268 } // GetName gets the name property value. The name property +// returns a *string when successful func (m *SystemInfo) GetName() *string { return m.name } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *SystemInfo) GetVersion() *string { return m.version } @@ -162,7 +168,6 @@ func (m *SystemInfo) SetVersion(value *string) { m.version = value } -// SystemInfoable type SystemInfoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/update_configuration_property.go b/go-sdk/pkg/registryclient-v2/models/update_configuration_property.go index fdeeca5485..163c0943c9 100644 --- a/go-sdk/pkg/registryclient-v2/models/update_configuration_property.go +++ b/go-sdk/pkg/registryclient-v2/models/update_configuration_property.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UpdateConfigurationProperty type UpdateConfigurationProperty struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewUpdateConfigurationProperty() *UpdateConfigurationProperty { } // CreateUpdateConfigurationPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUpdateConfigurationPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUpdateConfigurationProperty(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UpdateConfigurationProperty) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UpdateConfigurationProperty) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *UpdateConfigurationProperty) GetFieldDeserializers() map[string]func(i8 } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *UpdateConfigurationProperty) GetValue() *string { return m.value } @@ -77,7 +80,6 @@ func (m *UpdateConfigurationProperty) SetValue(value *string) { m.value = value } -// UpdateConfigurationPropertyable type UpdateConfigurationPropertyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/update_role.go b/go-sdk/pkg/registryclient-v2/models/update_role.go index a42077f68c..3fac917f50 100644 --- a/go-sdk/pkg/registryclient-v2/models/update_role.go +++ b/go-sdk/pkg/registryclient-v2/models/update_role.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UpdateRole type UpdateRole struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewUpdateRole() *UpdateRole { } // CreateUpdateRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUpdateRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUpdateRole(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UpdateRole) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UpdateRole) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["role"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *UpdateRole) GetFieldDeserializers() map[string]func(i878a80d2330e89d268 } // GetRole gets the role property value. The role property +// returns a *RoleType when successful func (m *UpdateRole) GetRole() *RoleType { return m.role } @@ -78,7 +81,6 @@ func (m *UpdateRole) SetRole(value *RoleType) { m.role = value } -// UpdateRoleable type UpdateRoleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/update_state.go b/go-sdk/pkg/registryclient-v2/models/update_state.go index 91c6535866..98ba917949 100644 --- a/go-sdk/pkg/registryclient-v2/models/update_state.go +++ b/go-sdk/pkg/registryclient-v2/models/update_state.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UpdateState type UpdateState struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewUpdateState() *UpdateState { } // CreateUpdateStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUpdateStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUpdateState(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UpdateState) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UpdateState) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["state"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *UpdateState) GetFieldDeserializers() map[string]func(i878a80d2330e89d26 } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *ArtifactState when successful func (m *UpdateState) GetState() *ArtifactState { return m.state } @@ -78,7 +81,6 @@ func (m *UpdateState) SetState(value *ArtifactState) { m.state = value } -// UpdateStateable type UpdateStateable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/user_info.go b/go-sdk/pkg/registryclient-v2/models/user_info.go index 857629a5b6..6908a820c8 100644 --- a/go-sdk/pkg/registryclient-v2/models/user_info.go +++ b/go-sdk/pkg/registryclient-v2/models/user_info.go @@ -28,31 +28,37 @@ func NewUserInfo() *UserInfo { } // CreateUserInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUserInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUserInfo(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UserInfo) GetAdditionalData() map[string]any { return m.additionalData } // GetAdmin gets the admin property value. The admin property +// returns a *bool when successful func (m *UserInfo) GetAdmin() *bool { return m.admin } // GetDeveloper gets the developer property value. The developer property +// returns a *bool when successful func (m *UserInfo) GetDeveloper() *bool { return m.developer } // GetDisplayName gets the displayName property value. The displayName property +// returns a *string when successful func (m *UserInfo) GetDisplayName() *string { return m.displayName } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["admin"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -109,11 +115,13 @@ func (m *UserInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896 } // GetUsername gets the username property value. The username property +// returns a *string when successful func (m *UserInfo) GetUsername() *string { return m.username } // GetViewer gets the viewer property value. The viewer property +// returns a *bool when successful func (m *UserInfo) GetViewer() *bool { return m.viewer } @@ -189,7 +197,6 @@ func (m *UserInfo) SetViewer(value *bool) { m.viewer = value } -// UserInfoable type UserInfoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/version_meta_data.go b/go-sdk/pkg/registryclient-v2/models/version_meta_data.go index 5c41e2515c..2f6a31c45a 100644 --- a/go-sdk/pkg/registryclient-v2/models/version_meta_data.go +++ b/go-sdk/pkg/registryclient-v2/models/version_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// VersionMetaData type VersionMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -45,36 +44,43 @@ func NewVersionMetaData() *VersionMetaData { } // CreateVersionMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateVersionMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVersionMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *VersionMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetContentId gets the contentId property value. The contentId property +// returns a *int64 when successful func (m *VersionMetaData) GetContentId() *int64 { return m.contentId } // GetCreatedBy gets the createdBy property value. The createdBy property +// returns a *string when successful func (m *VersionMetaData) GetCreatedBy() *string { return m.createdBy } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *VersionMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *VersionMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VersionMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["contentId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -217,46 +223,55 @@ func (m *VersionMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e8 } // GetGlobalId gets the globalId property value. The globalId property +// returns a *int64 when successful func (m *VersionMetaData) GetGlobalId() *int64 { return m.globalId } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *VersionMetaData) GetGroupId() *string { return m.groupId } // GetId gets the id property value. The ID of a single artifact. +// returns a *string when successful func (m *VersionMetaData) GetId() *string { return m.id } // GetLabels gets the labels property value. The labels property +// returns a []string when successful func (m *VersionMetaData) GetLabels() []string { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *VersionMetaData) GetName() *string { return m.name } // GetProperties gets the properties property value. User-defined name-value pairs. Name and value must be strings. +// returns a Propertiesable when successful func (m *VersionMetaData) GetProperties() Propertiesable { return m.properties } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *ArtifactState when successful func (m *VersionMetaData) GetState() *ArtifactState { return m.state } // GetTypeEscaped gets the type property value. The type property +// returns a *string when successful func (m *VersionMetaData) GetTypeEscaped() *string { return m.typeEscaped } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *VersionMetaData) GetVersion() *string { return m.version } @@ -421,7 +436,6 @@ func (m *VersionMetaData) SetVersion(value *string) { m.version = value } -// VersionMetaDataable type VersionMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/models/version_search_results.go b/go-sdk/pkg/registryclient-v2/models/version_search_results.go index b71b85e482..bc6f9e296d 100644 --- a/go-sdk/pkg/registryclient-v2/models/version_search_results.go +++ b/go-sdk/pkg/registryclient-v2/models/version_search_results.go @@ -22,21 +22,25 @@ func NewVersionSearchResults() *VersionSearchResults { } // CreateVersionSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateVersionSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVersionSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *VersionSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetCount gets the count property value. The total number of versions that matched the query (may be more than the number of versionsreturned in the result set). +// returns a *int32 when successful func (m *VersionSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VersionSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["count"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -69,6 +73,7 @@ func (m *VersionSearchResults) GetFieldDeserializers() map[string]func(i878a80d2 } // GetVersions gets the versions property value. The collection of artifact versions returned in the result set. +// returns a []SearchedVersionable when successful func (m *VersionSearchResults) GetVersions() []SearchedVersionable { return m.versions } @@ -117,7 +122,6 @@ func (m *VersionSearchResults) SetVersions(value []SearchedVersionable) { m.versions = value } -// VersionSearchResultsable type VersionSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v2/search/artifacts/post_order_query_parameter_type.go b/go-sdk/pkg/registryclient-v2/search/artifacts/post_order_query_parameter_type.go index ce5429c705..2450c5b856 100644 --- a/go-sdk/pkg/registryclient-v2/search/artifacts/post_order_query_parameter_type.go +++ b/go-sdk/pkg/registryclient-v2/search/artifacts/post_order_query_parameter_type.go @@ -1,9 +1,5 @@ package artifacts -import ( - "errors" -) - // Search for artifacts in the registry. type PostOrderQueryParameterType int @@ -23,7 +19,7 @@ func ParsePostOrderQueryParameterType(v string) (any, error) { case "desc": result = DESC_POSTORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown PostOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/search/artifacts/post_orderby_query_parameter_type.go b/go-sdk/pkg/registryclient-v2/search/artifacts/post_orderby_query_parameter_type.go index 1c409fc16e..dca0d32c77 100644 --- a/go-sdk/pkg/registryclient-v2/search/artifacts/post_orderby_query_parameter_type.go +++ b/go-sdk/pkg/registryclient-v2/search/artifacts/post_orderby_query_parameter_type.go @@ -1,9 +1,5 @@ package artifacts -import ( - "errors" -) - // Search for artifacts in the registry. type PostOrderbyQueryParameterType int @@ -23,7 +19,7 @@ func ParsePostOrderbyQueryParameterType(v string) (any, error) { case "createdOn": result = CREATEDON_POSTORDERBYQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown PostOrderbyQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v2/search/artifacts_request_builder.go b/go-sdk/pkg/registryclient-v2/search/artifacts_request_builder.go index 767974877a..db2e6cea63 100644 --- a/go-sdk/pkg/registryclient-v2/search/artifacts_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/search/artifacts_request_builder.go @@ -31,12 +31,12 @@ type ArtifactsRequestBuilderGetQueryParameters struct { // The number of artifacts to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsSortBy *i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SortBy `uriparametername:"orderby"` @@ -65,12 +65,12 @@ type ArtifactsRequestBuilderPostQueryParameters struct { // The number of artifacts to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsPostOrderQueryParameterType instead + // Deprecated: This property is deprecated, use OrderAsPostOrderQueryParameterType instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsPostOrderQueryParameterType *ie8be0c90121d7d083037815d4b53c9b92094bdd04db14cfd7f4e165f59ceda76.PostOrderQueryParameterType `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsPostOrderbyQueryParameterType instead + // Deprecated: This property is deprecated, use OrderbyAsPostOrderbyQueryParameterType instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsPostOrderbyQueryParameterType *ie8be0c90121d7d083037815d4b53c9b92094bdd04db14cfd7f4e165f59ceda76.PostOrderbyQueryParameterType `uriparametername:"orderby"` @@ -89,7 +89,7 @@ type ArtifactsRequestBuilderPostRequestConfiguration struct { // NewArtifactsRequestBuilderInternal instantiates a new ArtifactsRequestBuilder and sets the default values. func NewArtifactsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ArtifactsRequestBuilder { m := &ArtifactsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/artifacts{?name*,offset*,limit*,order*,orderby*,labels*,properties*,description*,group*,globalId*,contentId*,canonical*,artifactType*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/artifacts{?artifactType*,canonical*,contentId*,description*,globalId*,group*,labels*,limit*,name*,offset*,order*,orderby*,properties*}", pathParameters), } return m } @@ -102,6 +102,8 @@ func NewArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 } // Get returns a paginated list of all artifacts that match the provided filter criteria. +// returns a ArtifactSearchResultsable when successful +// returns a Error error when the service returns a 500 status code func (m *ArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration *ArtifactsRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -121,6 +123,8 @@ func (m *ArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration } // Post returns a paginated list of all artifacts with at least one version that matches theposted content. +// returns a ArtifactSearchResultsable when successful +// returns a Error error when the service returns a 500 status code func (m *ArtifactsRequestBuilder) Post(ctx context.Context, body []byte, contentType *string, requestConfiguration *ArtifactsRequestBuilderPostRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.ArtifactSearchResultsable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, contentType, requestConfiguration) if err != nil { @@ -140,6 +144,7 @@ func (m *ArtifactsRequestBuilder) Post(ctx context.Context, body []byte, content } // ToGetRequestInformation returns a paginated list of all artifacts that match the provided filter criteria. +// returns a *RequestInformation when successful func (m *ArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ArtifactsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -154,6 +159,7 @@ func (m *ArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, r } // ToPostRequestInformation returns a paginated list of all artifacts with at least one version that matches theposted content. +// returns a *RequestInformation when successful func (m *ArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, contentType *string, requestConfiguration *ArtifactsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -169,6 +175,7 @@ func (m *ArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Context, } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ArtifactsRequestBuilder when successful func (m *ArtifactsRequestBuilder) WithUrl(rawUrl string) *ArtifactsRequestBuilder { return NewArtifactsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/search/search_request_builder.go b/go-sdk/pkg/registryclient-v2/search/search_request_builder.go index 27c0d9f6ca..57f92e1071 100644 --- a/go-sdk/pkg/registryclient-v2/search/search_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/search/search_request_builder.go @@ -10,6 +10,7 @@ type SearchRequestBuilder struct { } // Artifacts search for artifacts in the registry. +// returns a *ArtifactsRequestBuilder when successful func (m *SearchRequestBuilder) Artifacts() *ArtifactsRequestBuilder { return NewArtifactsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/system/info_request_builder.go b/go-sdk/pkg/registryclient-v2/system/info_request_builder.go index 441750d28e..8d7227c660 100644 --- a/go-sdk/pkg/registryclient-v2/system/info_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/system/info_request_builder.go @@ -35,6 +35,8 @@ func NewInfoRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1 } // Get this operation retrieves information about the running registry system, such as the versionof the software and when it was built. +// returns a SystemInfoable when successful +// returns a Error error when the service returns a 500 status code func (m *InfoRequestBuilder) Get(ctx context.Context, requestConfiguration *InfoRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.SystemInfoable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *InfoRequestBuilder) Get(ctx context.Context, requestConfiguration *Info } // ToGetRequestInformation this operation retrieves information about the running registry system, such as the versionof the software and when it was built. +// returns a *RequestInformation when successful func (m *InfoRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *InfoRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *InfoRequestBuilder) ToGetRequestInformation(ctx context.Context, reques } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InfoRequestBuilder when successful func (m *InfoRequestBuilder) WithUrl(rawUrl string) *InfoRequestBuilder { return NewInfoRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/system/limits_request_builder.go b/go-sdk/pkg/registryclient-v2/system/limits_request_builder.go index b480201348..aec7d03159 100644 --- a/go-sdk/pkg/registryclient-v2/system/limits_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/system/limits_request_builder.go @@ -35,6 +35,8 @@ func NewLimitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get this operation retrieves the list of limitations on used resources, that are applied on the current instance of Registry. +// returns a Limitsable when successful +// returns a Error error when the service returns a 500 status code func (m *LimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *LimitsRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.Limitsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *LimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *Li } // ToGetRequestInformation this operation retrieves the list of limitations on used resources, that are applied on the current instance of Registry. +// returns a *RequestInformation when successful func (m *LimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LimitsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *LimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *LimitsRequestBuilder when successful func (m *LimitsRequestBuilder) WithUrl(rawUrl string) *LimitsRequestBuilder { return NewLimitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/system/system_request_builder.go b/go-sdk/pkg/registryclient-v2/system/system_request_builder.go index 2181558170..f54d52c707 100644 --- a/go-sdk/pkg/registryclient-v2/system/system_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/system/system_request_builder.go @@ -25,11 +25,13 @@ func NewSystemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Info retrieve system information +// returns a *InfoRequestBuilder when successful func (m *SystemRequestBuilder) Info() *InfoRequestBuilder { return NewInfoRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Limits retrieve resource limits information +// returns a *LimitsRequestBuilder when successful func (m *SystemRequestBuilder) Limits() *LimitsRequestBuilder { return NewLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/users/me_request_builder.go b/go-sdk/pkg/registryclient-v2/users/me_request_builder.go index 2f41bfbafc..ec924634f5 100644 --- a/go-sdk/pkg/registryclient-v2/users/me_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/users/me_request_builder.go @@ -35,6 +35,8 @@ func NewMeRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c9 } // Get returns information about the currently authenticated user. +// returns a UserInfoable when successful +// returns a Error error when the service returns a 500 status code func (m *MeRequestBuilder) Get(ctx context.Context, requestConfiguration *MeRequestBuilderGetRequestConfiguration) (i80228d093fd3b582ec81b86f113cc707692a60cdd08bae7a390086a8438c7543.UserInfoable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *MeRequestBuilder) Get(ctx context.Context, requestConfiguration *MeRequ } // ToGetRequestInformation returns information about the currently authenticated user. +// returns a *RequestInformation when successful func (m *MeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MeRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *MeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestC } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MeRequestBuilder when successful func (m *MeRequestBuilder) WithUrl(rawUrl string) *MeRequestBuilder { return NewMeRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v2/users/users_request_builder.go b/go-sdk/pkg/registryclient-v2/users/users_request_builder.go index 787e9f0b24..08da845efe 100644 --- a/go-sdk/pkg/registryclient-v2/users/users_request_builder.go +++ b/go-sdk/pkg/registryclient-v2/users/users_request_builder.go @@ -25,6 +25,7 @@ func NewUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb } // Me retrieves information about the current user +// returns a *MeRequestBuilder when successful func (m *UsersRequestBuilder) Me() *MeRequestBuilder { return NewMeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/admin_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/admin_request_builder.go index 19892a3ea6..d51feecc48 100644 --- a/go-sdk/pkg/registryclient-v3/admin/admin_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/admin_request_builder.go @@ -10,6 +10,7 @@ type AdminRequestBuilder struct { } // Config the config property +// returns a *ConfigRequestBuilder when successful func (m *AdminRequestBuilder) Config() *ConfigRequestBuilder { return NewConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -30,26 +31,31 @@ func NewAdminRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb } // Export provides a way to export registry data. +// returns a *ExportRequestBuilder when successful func (m *AdminRequestBuilder) Export() *ExportRequestBuilder { return NewExportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ImportEscaped provides a way to import data into the registry. +// returns a *ImportRequestBuilder when successful func (m *AdminRequestBuilder) ImportEscaped() *ImportRequestBuilder { return NewImportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // RoleMappings collection to manage role mappings for authenticated principals +// returns a *RoleMappingsRequestBuilder when successful func (m *AdminRequestBuilder) RoleMappings() *RoleMappingsRequestBuilder { return NewRoleMappingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Rules manage the global rules that apply to all artifacts if not otherwise configured. +// returns a *RulesRequestBuilder when successful func (m *AdminRequestBuilder) Rules() *RulesRequestBuilder { return NewRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Snapshots triggers a snapshot of the Registry storage. Only supported in KafkaSQL storage +// returns a *SnapshotsRequestBuilder when successful func (m *AdminRequestBuilder) Snapshots() *SnapshotsRequestBuilder { return NewSnapshotsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/config_artifact_types_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/config_artifact_types_request_builder.go index 81550722ce..7e5eff6154 100644 --- a/go-sdk/pkg/registryclient-v3/admin/config_artifact_types_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/config_artifact_types_request_builder.go @@ -19,7 +19,7 @@ type ConfigArtifactTypesRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewConfigArtifactTypesRequestBuilderInternal instantiates a new ArtifactTypesRequestBuilder and sets the default values. +// NewConfigArtifactTypesRequestBuilderInternal instantiates a new ConfigArtifactTypesRequestBuilder and sets the default values. func NewConfigArtifactTypesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigArtifactTypesRequestBuilder { m := &ConfigArtifactTypesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/config/artifactTypes", pathParameters), @@ -27,7 +27,7 @@ func NewConfigArtifactTypesRequestBuilderInternal(pathParameters map[string]stri return m } -// NewConfigArtifactTypesRequestBuilder instantiates a new ArtifactTypesRequestBuilder and sets the default values. +// NewConfigArtifactTypesRequestBuilder instantiates a new ConfigArtifactTypesRequestBuilder and sets the default values. func NewConfigArtifactTypesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigArtifactTypesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,8 @@ func NewConfigArtifactTypesRequestBuilder(rawUrl string, requestAdapter i2ae4187 } // Get gets a list of all the configured artifact types.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactTypeInfoable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *ConfigArtifactTypesRequestBuilder) Get(ctx context.Context, requestConfiguration *ConfigArtifactTypesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactTypeInfoable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -57,6 +59,7 @@ func (m *ConfigArtifactTypesRequestBuilder) Get(ctx context.Context, requestConf } // ToGetRequestInformation gets a list of all the configured artifact types.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigArtifactTypesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ConfigArtifactTypesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -68,6 +71,7 @@ func (m *ConfigArtifactTypesRequestBuilder) ToGetRequestInformation(ctx context. } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ConfigArtifactTypesRequestBuilder when successful func (m *ConfigArtifactTypesRequestBuilder) WithUrl(rawUrl string) *ConfigArtifactTypesRequestBuilder { return NewConfigArtifactTypesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/config_properties_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/config_properties_request_builder.go index ebdf98a27f..747a956937 100644 --- a/go-sdk/pkg/registryclient-v3/admin/config_properties_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/config_properties_request_builder.go @@ -20,6 +20,7 @@ type ConfigPropertiesRequestBuilderGetRequestConfiguration struct { } // ByPropertyName manage a single configuration property (by name). +// returns a *ConfigPropertiesWithPropertyNameItemRequestBuilder when successful func (m *ConfigPropertiesRequestBuilder) ByPropertyName(propertyName string) *ConfigPropertiesWithPropertyNameItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -31,7 +32,7 @@ func (m *ConfigPropertiesRequestBuilder) ByPropertyName(propertyName string) *Co return NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewConfigPropertiesRequestBuilderInternal instantiates a new PropertiesRequestBuilder and sets the default values. +// NewConfigPropertiesRequestBuilderInternal instantiates a new ConfigPropertiesRequestBuilder and sets the default values. func NewConfigPropertiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesRequestBuilder { m := &ConfigPropertiesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/config/properties", pathParameters), @@ -39,7 +40,7 @@ func NewConfigPropertiesRequestBuilderInternal(pathParameters map[string]string, return m } -// NewConfigPropertiesRequestBuilder instantiates a new PropertiesRequestBuilder and sets the default values. +// NewConfigPropertiesRequestBuilder instantiates a new ConfigPropertiesRequestBuilder and sets the default values. func NewConfigPropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -47,6 +48,8 @@ func NewConfigPropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d } // Get returns a list of all configuration properties that have been set. The list is not paged.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ConfigurationPropertyable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *ConfigPropertiesRequestBuilder) Get(ctx context.Context, requestConfiguration *ConfigPropertiesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ConfigurationPropertyable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -69,6 +72,7 @@ func (m *ConfigPropertiesRequestBuilder) Get(ctx context.Context, requestConfigu } // ToGetRequestInformation returns a list of all configuration properties that have been set. The list is not paged.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ConfigPropertiesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -80,6 +84,7 @@ func (m *ConfigPropertiesRequestBuilder) ToGetRequestInformation(ctx context.Con } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ConfigPropertiesRequestBuilder when successful func (m *ConfigPropertiesRequestBuilder) WithUrl(rawUrl string) *ConfigPropertiesRequestBuilder { return NewConfigPropertiesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/config_properties_with_property_name_item_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/config_properties_with_property_name_item_request_builder.go index 56687984d0..8a9cdf9fdb 100644 --- a/go-sdk/pkg/registryclient-v3/admin/config_properties_with_property_name_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/config_properties_with_property_name_item_request_builder.go @@ -35,7 +35,7 @@ type ConfigPropertiesWithPropertyNameItemRequestBuilderPutRequestConfiguration s Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal instantiates a new WithPropertyNameItemRequestBuilder and sets the default values. +// NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal instantiates a new ConfigPropertiesWithPropertyNameItemRequestBuilder and sets the default values. func NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesWithPropertyNameItemRequestBuilder { m := &ConfigPropertiesWithPropertyNameItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/config/properties/{propertyName}", pathParameters), @@ -43,7 +43,7 @@ func NewConfigPropertiesWithPropertyNameItemRequestBuilderInternal(pathParameter return m } -// NewConfigPropertiesWithPropertyNameItemRequestBuilder instantiates a new WithPropertyNameItemRequestBuilder and sets the default values. +// NewConfigPropertiesWithPropertyNameItemRequestBuilder instantiates a new ConfigPropertiesWithPropertyNameItemRequestBuilder and sets the default values. func NewConfigPropertiesWithPropertyNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ConfigPropertiesWithPropertyNameItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewConfigPropertiesWithPropertyNameItemRequestBuilder(rawUrl string, reques } // Delete resets the value of a single configuration property. This will return the property toits default value (see external documentation for supported properties and their defaultvalues).This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Delete(ctx context. } // Get returns the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ConfigurationPropertyable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ConfigurationPropertyable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,8 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Get(ctx context.Con } // Put updates the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UpdateConfigurationPropertyable, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -105,6 +112,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) Put(ctx context.Con } // ToDeleteRequestInformation resets the value of a single configuration property. This will return the property toits default value (see external documentation for supported properties and their defaultvalues).This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -116,6 +124,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToDeleteRequestInfo } // ToGetRequestInformation returns the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,6 +136,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToGetRequestInforma } // ToPutRequestInformation updates the value of a single configuration property.This operation may fail for one of the following reasons:* Property not found or not configured (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UpdateConfigurationPropertyable, requestConfiguration *ConfigPropertiesWithPropertyNameItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -142,6 +152,7 @@ func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) ToPutRequestInforma } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ConfigPropertiesWithPropertyNameItemRequestBuilder when successful func (m *ConfigPropertiesWithPropertyNameItemRequestBuilder) WithUrl(rawUrl string) *ConfigPropertiesWithPropertyNameItemRequestBuilder { return NewConfigPropertiesWithPropertyNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/config_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/config_request_builder.go index 0d795e894b..5c4d93c4a6 100644 --- a/go-sdk/pkg/registryclient-v3/admin/config_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/config_request_builder.go @@ -10,6 +10,7 @@ type ConfigRequestBuilder struct { } // ArtifactTypes the list of artifact types supported by this instance of Registry. +// returns a *ConfigArtifactTypesRequestBuilder when successful func (m *ConfigRequestBuilder) ArtifactTypes() *ConfigArtifactTypesRequestBuilder { return NewConfigArtifactTypesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -30,6 +31,7 @@ func NewConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Properties manage configuration properties. +// returns a *ConfigPropertiesRequestBuilder when successful func (m *ConfigRequestBuilder) Properties() *ConfigPropertiesRequestBuilder { return NewConfigPropertiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/export_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/export_request_builder.go index d4abe078b7..abe163e0d5 100644 --- a/go-sdk/pkg/registryclient-v3/admin/export_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/export_request_builder.go @@ -43,6 +43,8 @@ func NewExportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get exports registry data as a ZIP archive. +// returns a DownloadRefable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *ExportRequestBuilder) Get(ctx context.Context, requestConfiguration *ExportRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.DownloadRefable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -62,6 +64,7 @@ func (m *ExportRequestBuilder) Get(ctx context.Context, requestConfiguration *Ex } // ToGetRequestInformation exports registry data as a ZIP archive. +// returns a *RequestInformation when successful func (m *ExportRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ExportRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -76,6 +79,7 @@ func (m *ExportRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ExportRequestBuilder when successful func (m *ExportRequestBuilder) WithUrl(rawUrl string) *ExportRequestBuilder { return NewExportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/import_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/import_request_builder.go index c9a44d3706..45365285e5 100644 --- a/go-sdk/pkg/registryclient-v3/admin/import_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/import_request_builder.go @@ -43,6 +43,8 @@ func NewImportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Post imports registry data that was previously exported using the `/admin/export` operation. +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ImportRequestBuilder) Post(ctx context.Context, body []byte, requestConfiguration *ImportRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -60,6 +62,7 @@ func (m *ImportRequestBuilder) Post(ctx context.Context, body []byte, requestCon } // ToPostRequestInformation imports registry data that was previously exported using the `/admin/export` operation. +// returns a *RequestInformation when successful func (m *ImportRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, requestConfiguration *ImportRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -75,6 +78,7 @@ func (m *ImportRequestBuilder) ToPostRequestInformation(ctx context.Context, bod } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ImportRequestBuilder when successful func (m *ImportRequestBuilder) WithUrl(rawUrl string) *ImportRequestBuilder { return NewImportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/role_mappings_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/role_mappings_request_builder.go index f65f988d88..26a7fe9c6b 100644 --- a/go-sdk/pkg/registryclient-v3/admin/role_mappings_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/role_mappings_request_builder.go @@ -38,6 +38,7 @@ type RoleMappingsRequestBuilderPostRequestConfiguration struct { } // ByPrincipalId manage the configuration of a single role mapping. +// returns a *RoleMappingsWithPrincipalItemRequestBuilder when successful func (m *RoleMappingsRequestBuilder) ByPrincipalId(principalId string) *RoleMappingsWithPrincipalItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -65,6 +66,8 @@ func NewRoleMappingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 } // Get gets a list of all role mappings configured in the registry (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a RoleMappingSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *RoleMappingsRequestBuilder) Get(ctx context.Context, requestConfiguration *RoleMappingsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RoleMappingSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -84,6 +87,7 @@ func (m *RoleMappingsRequestBuilder) Get(ctx context.Context, requestConfigurati } // Post creates a new mapping between a user/principal and a role.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 500 status code func (m *RoleMappingsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RoleMappingable, requestConfiguration *RoleMappingsRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -100,6 +104,7 @@ func (m *RoleMappingsRequestBuilder) Post(ctx context.Context, body i00eb2e63d15 } // ToGetRequestInformation gets a list of all role mappings configured in the registry (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RoleMappingsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -114,6 +119,7 @@ func (m *RoleMappingsRequestBuilder) ToGetRequestInformation(ctx context.Context } // ToPostRequestInformation creates a new mapping between a user/principal and a role.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RoleMappingable, requestConfiguration *RoleMappingsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -129,6 +135,7 @@ func (m *RoleMappingsRequestBuilder) ToPostRequestInformation(ctx context.Contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RoleMappingsRequestBuilder when successful func (m *RoleMappingsRequestBuilder) WithUrl(rawUrl string) *RoleMappingsRequestBuilder { return NewRoleMappingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/role_mappings_with_principal_item_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/role_mappings_with_principal_item_request_builder.go index bfd6159e67..76efef3769 100644 --- a/go-sdk/pkg/registryclient-v3/admin/role_mappings_with_principal_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/role_mappings_with_principal_item_request_builder.go @@ -35,7 +35,7 @@ type RoleMappingsWithPrincipalItemRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewRoleMappingsWithPrincipalItemRequestBuilderInternal instantiates a new WithPrincipalItemRequestBuilder and sets the default values. +// NewRoleMappingsWithPrincipalItemRequestBuilderInternal instantiates a new RoleMappingsWithPrincipalItemRequestBuilder and sets the default values. func NewRoleMappingsWithPrincipalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RoleMappingsWithPrincipalItemRequestBuilder { m := &RoleMappingsWithPrincipalItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/roleMappings/{principalId}", pathParameters), @@ -43,7 +43,7 @@ func NewRoleMappingsWithPrincipalItemRequestBuilderInternal(pathParameters map[s return m } -// NewRoleMappingsWithPrincipalItemRequestBuilder instantiates a new WithPrincipalItemRequestBuilder and sets the default values. +// NewRoleMappingsWithPrincipalItemRequestBuilder instantiates a new RoleMappingsWithPrincipalItemRequestBuilder and sets the default values. func NewRoleMappingsWithPrincipalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RoleMappingsWithPrincipalItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewRoleMappingsWithPrincipalItemRequestBuilder(rawUrl string, requestAdapte } // Delete deletes a single role mapping, effectively denying access to a user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RoleMappingsWithPrincipalItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) Delete(ctx context.Context } // Get gets the details of a single role mapping (by `principalId`).This operation can fail for the following reasons:* No role mapping for the `principalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a RoleMappingable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RoleMappingsWithPrincipalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RoleMappingable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,8 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) Get(ctx context.Context, r } // Put updates a single role mapping for one user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RoleMappingsWithPrincipalItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UpdateRoleable, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -105,6 +112,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) Put(ctx context.Context, b } // ToDeleteRequestInformation deletes a single role mapping, effectively denying access to a user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -116,6 +124,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToDeleteRequestInformation } // ToGetRequestInformation gets the details of a single role mapping (by `principalId`).This operation can fail for the following reasons:* No role mapping for the `principalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,6 +136,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToGetRequestInformation(ct } // ToPutRequestInformation updates a single role mapping for one user/principal.This operation can fail for the following reasons:* No role mapping for the principalId exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UpdateRoleable, requestConfiguration *RoleMappingsWithPrincipalItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -142,6 +152,7 @@ func (m *RoleMappingsWithPrincipalItemRequestBuilder) ToPutRequestInformation(ct } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RoleMappingsWithPrincipalItemRequestBuilder when successful func (m *RoleMappingsWithPrincipalItemRequestBuilder) WithUrl(rawUrl string) *RoleMappingsWithPrincipalItemRequestBuilder { return NewRoleMappingsWithPrincipalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/rules_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/rules_request_builder.go index b239b2cd63..e657992436 100644 --- a/go-sdk/pkg/registryclient-v3/admin/rules_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/rules_request_builder.go @@ -36,6 +36,7 @@ type RulesRequestBuilderPostRequestConfiguration struct { } // ByRuleType manage the configuration of a single global artifact rule. +// returns a *RulesWithRuleTypeItemRequestBuilder when successful func (m *RulesRequestBuilder) ByRuleType(ruleType string) *RulesWithRuleTypeItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -63,6 +64,7 @@ func NewRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb } // Delete deletes all globally configured rules.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 500 status code func (m *RulesRequestBuilder) Delete(ctx context.Context, requestConfiguration *RulesRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -79,6 +81,8 @@ func (m *RulesRequestBuilder) Delete(ctx context.Context, requestConfiguration * } // Get gets a list of all the currently configured global rules (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a []RuleType when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *RulesRequestBuilder) Get(ctx context.Context, requestConfiguration *RulesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RuleType, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -101,6 +105,9 @@ func (m *RulesRequestBuilder) Get(ctx context.Context, requestConfiguration *Rul } // Post adds a rule to the list of globally configured rules.This operation can fail for the following reasons:* The rule type is unknown (HTTP error `400`)* The rule already exists (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RulesRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleable, requestConfiguration *RulesRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -119,6 +126,7 @@ func (m *RulesRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00 } // ToDeleteRequestInformation deletes all globally configured rules.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *RulesRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +138,7 @@ func (m *RulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, re } // ToGetRequestInformation gets a list of all the currently configured global rules (if any).This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RulesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -141,6 +150,7 @@ func (m *RulesRequestBuilder) ToGetRequestInformation(ctx context.Context, reque } // ToPostRequestInformation adds a rule to the list of globally configured rules.This operation can fail for the following reasons:* The rule type is unknown (HTTP error `400`)* The rule already exists (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleable, requestConfiguration *RulesRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -156,6 +166,7 @@ func (m *RulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RulesRequestBuilder when successful func (m *RulesRequestBuilder) WithUrl(rawUrl string) *RulesRequestBuilder { return NewRulesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/rules_with_rule_type_item_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/rules_with_rule_type_item_request_builder.go index b5bae8abb8..510ed43f46 100644 --- a/go-sdk/pkg/registryclient-v3/admin/rules_with_rule_type_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/rules_with_rule_type_item_request_builder.go @@ -35,7 +35,7 @@ type RulesWithRuleTypeItemRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewRulesWithRuleTypeItemRequestBuilderInternal instantiates a new WithRuleTypeItemRequestBuilder and sets the default values. +// NewRulesWithRuleTypeItemRequestBuilderInternal instantiates a new RulesWithRuleTypeItemRequestBuilder and sets the default values. func NewRulesWithRuleTypeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RulesWithRuleTypeItemRequestBuilder { m := &RulesWithRuleTypeItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/rules/{ruleType}", pathParameters), @@ -43,7 +43,7 @@ func NewRulesWithRuleTypeItemRequestBuilderInternal(pathParameters map[string]st return m } -// NewRulesWithRuleTypeItemRequestBuilder instantiates a new WithRuleTypeItemRequestBuilder and sets the default values. +// NewRulesWithRuleTypeItemRequestBuilder instantiates a new RulesWithRuleTypeItemRequestBuilder and sets the default values. func NewRulesWithRuleTypeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *RulesWithRuleTypeItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewRulesWithRuleTypeItemRequestBuilder(rawUrl string, requestAdapter i2ae41 } // Delete deletes a single global rule. If this is the only rule configured, this is the sameas deleting **all** rules.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* Rule cannot be deleted (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RulesWithRuleTypeItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *RulesWithRuleTypeItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *RulesWithRuleTypeItemRequestBuilder) Delete(ctx context.Context, reques } // Get returns information about the named globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RulesWithRuleTypeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *RulesWithRuleTypeItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,9 @@ func (m *RulesWithRuleTypeItemRequestBuilder) Get(ctx context.Context, requestCo } // Put updates the configuration for a globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *RulesWithRuleTypeItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, requestConfiguration *RulesWithRuleTypeItemRequestBuilderPutRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -108,6 +116,7 @@ func (m *RulesWithRuleTypeItemRequestBuilder) Put(ctx context.Context, body i00e } // ToDeleteRequestInformation deletes a single global rule. If this is the only rule configured, this is the sameas deleting **all** rules.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* Rule cannot be deleted (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesWithRuleTypeItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *RulesWithRuleTypeItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -119,6 +128,7 @@ func (m *RulesWithRuleTypeItemRequestBuilder) ToDeleteRequestInformation(ctx con } // ToGetRequestInformation returns information about the named globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesWithRuleTypeItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RulesWithRuleTypeItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +140,7 @@ func (m *RulesWithRuleTypeItemRequestBuilder) ToGetRequestInformation(ctx contex } // ToPutRequestInformation updates the configuration for a globally configured rule.This operation can fail for the following reasons:* Invalid rule name/type (HTTP error `400`)* No rule with name/type `rule` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *RulesWithRuleTypeItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, requestConfiguration *RulesWithRuleTypeItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +156,7 @@ func (m *RulesWithRuleTypeItemRequestBuilder) ToPutRequestInformation(ctx contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RulesWithRuleTypeItemRequestBuilder when successful func (m *RulesWithRuleTypeItemRequestBuilder) WithUrl(rawUrl string) *RulesWithRuleTypeItemRequestBuilder { return NewRulesWithRuleTypeItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/admin/snapshots_request_builder.go b/go-sdk/pkg/registryclient-v3/admin/snapshots_request_builder.go index ef1e1162ef..83188f9bda 100644 --- a/go-sdk/pkg/registryclient-v3/admin/snapshots_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/admin/snapshots_request_builder.go @@ -35,6 +35,8 @@ func NewSnapshotsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 } // Post triggers the creation of a snapshot of the internal database for compatible storages.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a SnapshotMetaDataable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *SnapshotsRequestBuilder) Post(ctx context.Context, requestConfiguration *SnapshotsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SnapshotMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *SnapshotsRequestBuilder) Post(ctx context.Context, requestConfiguration } // ToPostRequestInformation triggers the creation of a snapshot of the internal database for compatible storages.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *SnapshotsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *SnapshotsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *SnapshotsRequestBuilder) ToPostRequestInformation(ctx context.Context, } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *SnapshotsRequestBuilder when successful func (m *SnapshotsRequestBuilder) WithUrl(rawUrl string) *SnapshotsRequestBuilder { return NewSnapshotsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/api_client.go b/go-sdk/pkg/registryclient-v3/api_client.go index ab3c03b300..bd86a7759b 100644 --- a/go-sdk/pkg/registryclient-v3/api_client.go +++ b/go-sdk/pkg/registryclient-v3/api_client.go @@ -21,6 +21,7 @@ type ApiClient struct { } // Admin the admin property +// returns a *AdminRequestBuilder when successful func (m *ApiClient) Admin() *i3a143df9c3656a25fd13a0937faacbbcd9cb03fed9483505ecd519e4d74a7a15.AdminRequestBuilder { return i3a143df9c3656a25fd13a0937faacbbcd9cb03fed9483505ecd519e4d74a7a15.NewAdminRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -55,26 +56,31 @@ func NewApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa52901 } // Groups collection of the groups in the registry. +// returns a *GroupsRequestBuilder when successful func (m *ApiClient) Groups() *i3320989eb8a8dfacce0884b8a7002d636bc4014dd0a4e589ddae4aaa1ae321f4.GroupsRequestBuilder { return i3320989eb8a8dfacce0884b8a7002d636bc4014dd0a4e589ddae4aaa1ae321f4.NewGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Ids the ids property +// returns a *IdsRequestBuilder when successful func (m *ApiClient) Ids() *i7229f5841ba844b770381d53c9153420c122078a773e55c45064f1c87d6aab5b.IdsRequestBuilder { return i7229f5841ba844b770381d53c9153420c122078a773e55c45064f1c87d6aab5b.NewIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Search the search property +// returns a *SearchRequestBuilder when successful func (m *ApiClient) Search() *i854c9d5780d14cbecc42929178b6e2f7b5d935bacd7ac9e5d2a5b5741cc31a4d.SearchRequestBuilder { return i854c9d5780d14cbecc42929178b6e2f7b5d935bacd7ac9e5d2a5b5741cc31a4d.NewSearchRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // System the system property +// returns a *SystemRequestBuilder when successful func (m *ApiClient) System() *i3b87edbdca8565e069a95744531fb5ecdfd17a8d304795b4ec765c590fda2881.SystemRequestBuilder { return i3b87edbdca8565e069a95744531fb5ecdfd17a8d304795b4ec765c590fda2881.NewSystemRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Users the users property +// returns a *UsersRequestBuilder when successful func (m *ApiClient) Users() *i3c84b7c05c4459609afd9e2bb17ddb7b28031a2ebfb232920d207cdb1a77a604.UsersRequestBuilder { return i3c84b7c05c4459609afd9e2bb17ddb7b28031a2ebfb232920d207cdb1a77a604.NewUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/groups_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/groups_request_builder.go index 36ce1372b4..da970124ef 100644 --- a/go-sdk/pkg/registryclient-v3/groups/groups_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/groups_request_builder.go @@ -18,12 +18,12 @@ type GroupsRequestBuilderGetQueryParameters struct { // The number of groups to skip before starting the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsGroupSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsGroupSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsGroupSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.GroupSortBy `uriparametername:"orderby"` @@ -48,6 +48,7 @@ type GroupsRequestBuilderPostRequestConfiguration struct { } // ByGroupId collection to manage a single group in the registry. +// returns a *WithGroupItemRequestBuilder when successful func (m *GroupsRequestBuilder) ByGroupId(groupId string) *WithGroupItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -75,6 +76,8 @@ func NewGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get returns a list of all groups. This list is paged. +// returns a GroupSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *GroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *GroupsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.GroupSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -94,6 +97,9 @@ func (m *GroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *Gr } // Post creates a new group.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group already exist (HTTP error `409`) +// returns a GroupMetaDataable when successful +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *GroupsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateGroupable, requestConfiguration *GroupsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.GroupMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -114,6 +120,7 @@ func (m *GroupsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d0 } // ToGetRequestInformation returns a list of all groups. This list is paged. +// returns a *RequestInformation when successful func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GroupsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -128,6 +135,7 @@ func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // ToPostRequestInformation creates a new group.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group already exist (HTTP error `409`) +// returns a *RequestInformation when successful func (m *GroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateGroupable, requestConfiguration *GroupsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -143,6 +151,7 @@ func (m *GroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, bod } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GroupsRequestBuilder when successful func (m *GroupsRequestBuilder) WithUrl(rawUrl string) *GroupsRequestBuilder { return NewGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_item_versions_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_item_versions_request_builder.go index fd841a91f9..b14bb0e448 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_item_versions_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_item_versions_request_builder.go @@ -45,15 +45,15 @@ type ItemArtifactsItemBranchesItemVersionsRequestBuilderPutRequestConfiguration Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemBranchesItemVersionsRequestBuilderInternal instantiates a new VersionsRequestBuilder and sets the default values. +// NewItemArtifactsItemBranchesItemVersionsRequestBuilderInternal instantiates a new ItemArtifactsItemBranchesItemVersionsRequestBuilder and sets the default values. func NewItemArtifactsItemBranchesItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemBranchesItemVersionsRequestBuilder { m := &ItemArtifactsItemBranchesItemVersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions{?offset*,limit*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions{?limit*,offset*}", pathParameters), } return m } -// NewItemArtifactsItemBranchesItemVersionsRequestBuilder instantiates a new VersionsRequestBuilder and sets the default values. +// NewItemArtifactsItemBranchesItemVersionsRequestBuilder instantiates a new ItemArtifactsItemBranchesItemVersionsRequestBuilder and sets the default values. func NewItemArtifactsItemBranchesItemVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemBranchesItemVersionsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -61,6 +61,9 @@ func NewItemArtifactsItemBranchesItemVersionsRequestBuilder(rawUrl string, reque } // Get get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a VersionSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesItemVersionsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -81,6 +84,9 @@ func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) Get(ctx context.Co } // Post add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.AddVersionToBranchable, requestConfiguration *ItemArtifactsItemBranchesItemVersionsRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -99,6 +105,8 @@ func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) Post(ctx context.C } // Put add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ReplaceBranchVersionsable, requestConfiguration *ItemArtifactsItemBranchesItemVersionsRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -116,6 +124,7 @@ func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) Put(ctx context.Co } // ToGetRequestInformation get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesItemVersionsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +139,7 @@ func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) ToGetRequestInform } // ToPostRequestInformation add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.AddVersionToBranchable, requestConfiguration *ItemArtifactsItemBranchesItemVersionsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +155,7 @@ func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) ToPostRequestInfor } // ToPutRequestInformation add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ReplaceBranchVersionsable, requestConfiguration *ItemArtifactsItemBranchesItemVersionsRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -160,6 +171,7 @@ func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) ToPutRequestInform } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemBranchesItemVersionsRequestBuilder when successful func (m *ItemArtifactsItemBranchesItemVersionsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemBranchesItemVersionsRequestBuilder { return NewItemArtifactsItemBranchesItemVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_request_builder.go index 973daf05d1..d82a871609 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_request_builder.go @@ -38,6 +38,7 @@ type ItemArtifactsItemBranchesRequestBuilderPostRequestConfiguration struct { } // ByBranchId manage a single branch. +// returns a *ItemArtifactsItemBranchesWithBranchItemRequestBuilder when successful func (m *ItemArtifactsItemBranchesRequestBuilder) ByBranchId(branchId string) *ItemArtifactsItemBranchesWithBranchItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -49,15 +50,15 @@ func (m *ItemArtifactsItemBranchesRequestBuilder) ByBranchId(branchId string) *I return NewItemArtifactsItemBranchesWithBranchItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemBranchesRequestBuilderInternal instantiates a new BranchesRequestBuilder and sets the default values. +// NewItemArtifactsItemBranchesRequestBuilderInternal instantiates a new ItemArtifactsItemBranchesRequestBuilder and sets the default values. func NewItemArtifactsItemBranchesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemBranchesRequestBuilder { m := &ItemArtifactsItemBranchesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/branches{?offset*,limit*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/branches{?limit*,offset*}", pathParameters), } return m } -// NewItemArtifactsItemBranchesRequestBuilder instantiates a new BranchesRequestBuilder and sets the default values. +// NewItemArtifactsItemBranchesRequestBuilder instantiates a new ItemArtifactsItemBranchesRequestBuilder and sets the default values. func NewItemArtifactsItemBranchesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemBranchesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -65,6 +66,9 @@ func NewItemArtifactsItemBranchesRequestBuilder(rawUrl string, requestAdapter i2 } // Get returns a list of all branches in the artifact. Each branch is a list of version identifiers,ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a BranchSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.BranchSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -85,6 +89,10 @@ func (m *ItemArtifactsItemBranchesRequestBuilder) Get(ctx context.Context, reque } // Post creates a new branch for the artifact. A new branch consists of metadata and alist of versions.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* A branch with the given `branchId` already exists (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a BranchMetaDataable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateBranchable, requestConfiguration *ItemArtifactsItemBranchesRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.BranchMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -106,6 +114,7 @@ func (m *ItemArtifactsItemBranchesRequestBuilder) Post(ctx context.Context, body } // ToGetRequestInformation returns a list of all branches in the artifact. Each branch is a list of version identifiers,ordered from the latest (tip of the branch) to the oldest.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -120,6 +129,7 @@ func (m *ItemArtifactsItemBranchesRequestBuilder) ToGetRequestInformation(ctx co } // ToPostRequestInformation creates a new branch for the artifact. A new branch consists of metadata and alist of versions.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* A branch with the given `branchId` already exists (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateBranchable, requestConfiguration *ItemArtifactsItemBranchesRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -135,6 +145,7 @@ func (m *ItemArtifactsItemBranchesRequestBuilder) ToPostRequestInformation(ctx c } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemBranchesRequestBuilder when successful func (m *ItemArtifactsItemBranchesRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemBranchesRequestBuilder { return NewItemArtifactsItemBranchesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_with_branch_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_with_branch_item_request_builder.go index b65b3efcd0..ead2df8bdc 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_with_branch_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_branches_with_branch_item_request_builder.go @@ -35,7 +35,7 @@ type ItemArtifactsItemBranchesWithBranchItemRequestBuilderPutRequestConfiguratio Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemBranchesWithBranchItemRequestBuilderInternal instantiates a new WithBranchItemRequestBuilder and sets the default values. +// NewItemArtifactsItemBranchesWithBranchItemRequestBuilderInternal instantiates a new ItemArtifactsItemBranchesWithBranchItemRequestBuilder and sets the default values. func NewItemArtifactsItemBranchesWithBranchItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemBranchesWithBranchItemRequestBuilder { m := &ItemArtifactsItemBranchesWithBranchItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}", pathParameters), @@ -43,7 +43,7 @@ func NewItemArtifactsItemBranchesWithBranchItemRequestBuilderInternal(pathParame return m } -// NewItemArtifactsItemBranchesWithBranchItemRequestBuilder instantiates a new WithBranchItemRequestBuilder and sets the default values. +// NewItemArtifactsItemBranchesWithBranchItemRequestBuilder instantiates a new ItemArtifactsItemBranchesWithBranchItemRequestBuilder and sets the default values. func NewItemArtifactsItemBranchesWithBranchItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemBranchesWithBranchItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,9 @@ func NewItemArtifactsItemBranchesWithBranchItemRequestBuilder(rawUrl string, req } // Delete deletes a single branch in the artifact.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesWithBranchItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -69,6 +72,9 @@ func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Delete(ctx conte } // Get returns the metaData of a branch.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a BranchMetaDataable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesWithBranchItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.BranchMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -89,6 +95,8 @@ func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Get(ctx context. } // Put updates the metadata of a branch.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableBranchMetaDataable, requestConfiguration *ItemArtifactsItemBranchesWithBranchItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -106,6 +114,7 @@ func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Put(ctx context. } // ToDeleteRequestInformation deletes a single branch in the artifact.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesWithBranchItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -117,6 +126,7 @@ func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) ToDeleteRequestI } // ToGetRequestInformation returns the metaData of a branch.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemBranchesWithBranchItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -128,6 +138,7 @@ func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) ToGetRequestInfo } // ToPutRequestInformation updates the metadata of a branch.This operation can fail for the following reasons:* No artifact with this `groupId` and `artifactId` exists (HTTP error `404`)* No branch with this `branchId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableBranchMetaDataable, requestConfiguration *ItemArtifactsItemBranchesWithBranchItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -143,11 +154,13 @@ func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) ToPutRequestInfo } // Versions manage the versions in a branch. +// returns a *ItemArtifactsItemBranchesItemVersionsRequestBuilder when successful func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) Versions() *ItemArtifactsItemBranchesItemVersionsRequestBuilder { return NewItemArtifactsItemBranchesItemVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemBranchesWithBranchItemRequestBuilder when successful func (m *ItemArtifactsItemBranchesWithBranchItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemBranchesWithBranchItemRequestBuilder { return NewItemArtifactsItemBranchesWithBranchItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_request_builder.go index c8d145740b..ba56b3b563 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_request_builder.go @@ -36,6 +36,7 @@ type ItemArtifactsItemRulesRequestBuilderPostRequestConfiguration struct { } // ByRuleType manage the configuration of a single artifact rule. +// returns a *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder when successful func (m *ItemArtifactsItemRulesRequestBuilder) ByRuleType(ruleType string) *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -47,7 +48,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ByRuleType(ruleType string) *Item return NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemRulesRequestBuilderInternal instantiates a new RulesRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesRequestBuilderInternal instantiates a new ItemArtifactsItemRulesRequestBuilder and sets the default values. func NewItemArtifactsItemRulesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesRequestBuilder { m := &ItemArtifactsItemRulesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/rules", pathParameters), @@ -55,7 +56,7 @@ func NewItemArtifactsItemRulesRequestBuilderInternal(pathParameters map[string]s return m } -// NewItemArtifactsItemRulesRequestBuilder instantiates a new RulesRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesRequestBuilder instantiates a new ItemArtifactsItemRulesRequestBuilder and sets the default values. func NewItemArtifactsItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -63,6 +64,8 @@ func NewItemArtifactsItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4 } // Delete deletes all of the rules configured for the artifact. After this is done, the globalrules apply to the artifact again.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemRulesRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -80,6 +83,9 @@ func (m *ItemArtifactsItemRulesRequestBuilder) Delete(ctx context.Context, reque } // Get returns a list of all rules configured for the artifact. The set of rules determineshow the content of an artifact can evolve over time. If no rules are configured foran artifact, then the rules configured for the group is used. If no rules are configured at the group level, then the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []RuleType when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemRulesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RuleType, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -103,6 +109,10 @@ func (m *ItemArtifactsItemRulesRequestBuilder) Get(ctx context.Context, requestC } // Post adds a rule to the list of rules that get applied to the artifact when adding newversions. All configured rules must pass to successfully add a new artifact version.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* Rule (named in the request body) is unknown (HTTP error `400`)* Rule is already configured (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemRulesRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleable, requestConfiguration *ItemArtifactsItemRulesRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -122,6 +132,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) Post(ctx context.Context, body i0 } // ToDeleteRequestInformation deletes all of the rules configured for the artifact. After this is done, the globalrules apply to the artifact again.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -133,6 +144,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ToDeleteRequestInformation(ctx co } // ToGetRequestInformation returns a list of all rules configured for the artifact. The set of rules determineshow the content of an artifact can evolve over time. If no rules are configured foran artifact, then the rules configured for the group is used. If no rules are configured at the group level, then the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -144,6 +156,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ToGetRequestInformation(ctx conte } // ToPostRequestInformation adds a rule to the list of rules that get applied to the artifact when adding newversions. All configured rules must pass to successfully add a new artifact version.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* Rule (named in the request body) is unknown (HTTP error `400`)* Rule is already configured (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleable, requestConfiguration *ItemArtifactsItemRulesRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -159,6 +172,7 @@ func (m *ItemArtifactsItemRulesRequestBuilder) ToPostRequestInformation(ctx cont } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemRulesRequestBuilder when successful func (m *ItemArtifactsItemRulesRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemRulesRequestBuilder { return NewItemArtifactsItemRulesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_with_rule_type_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_with_rule_type_item_request_builder.go index d5bbf685e2..d33fe262ad 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_with_rule_type_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_rules_with_rule_type_item_request_builder.go @@ -35,7 +35,7 @@ type ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderPutRequestConfiguration Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilderInternal instantiates a new WithRuleTypeItemRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilderInternal instantiates a new ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder and sets the default values. func NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder { m := &ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/rules/{ruleType}", pathParameters), @@ -43,7 +43,7 @@ func NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilderInternal(pathParamet return m } -// NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilder instantiates a new WithRuleTypeItemRequestBuilder and sets the default values. +// NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilder instantiates a new ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder and sets the default values. func NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilder(rawUrl string, requ } // Delete deletes a rule from the artifact. This results in the rule no longer applying forthis artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply tothis artifact.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) Delete(ctx contex } // Get returns information about a single rule configured for an artifact. This is usefulwhen you want to know what the current configuration settings are for a specific rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,9 @@ func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) Get(ctx context.C } // Put updates the configuration of a single rule for the artifact. The configuration datais specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, requestConfiguration *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderPutRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -108,6 +116,7 @@ func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) Put(ctx context.C } // ToDeleteRequestInformation deletes a rule from the artifact. This results in the rule no longer applying forthis artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply tothis artifact.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -119,6 +128,7 @@ func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) ToDeleteRequestIn } // ToGetRequestInformation returns information about a single rule configured for an artifact. This is usefulwhen you want to know what the current configuration settings are for a specific rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +140,7 @@ func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) ToGetRequestInfor } // ToPutRequestInformation updates the configuration of a single rule for the artifact. The configuration datais specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, requestConfiguration *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +156,7 @@ func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) ToPutRequestInfor } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder when successful func (m *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemRulesWithRuleTypeItemRequestBuilder { return NewItemArtifactsItemRulesWithRuleTypeItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_request_builder.go index 18afb47574..50740667cd 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_request_builder.go @@ -28,6 +28,7 @@ type ItemArtifactsItemVersionsItemCommentsRequestBuilderPostRequestConfiguration } // ByCommentId manage a single comment +// returns a *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ByCommentId(commentId string) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -39,7 +40,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ByCommentId(commen return NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal instantiates a new CommentsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemCommentsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsRequestBuilder { m := &ItemArtifactsItemVersionsItemCommentsRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments", pathParameters), @@ -47,7 +48,7 @@ func NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal(pathParamete return m } -// NewItemArtifactsItemVersionsItemCommentsRequestBuilder instantiates a new CommentsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsRequestBuilder instantiates a new ItemArtifactsItemVersionsItemCommentsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -55,6 +56,10 @@ func NewItemArtifactsItemVersionsItemCommentsRequestBuilder(rawUrl string, reque } // Get retrieves all comments for a version of an artifact. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []Commentable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Commentable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -79,6 +84,10 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Get(ctx context.Co } // Post adds a new comment to the artifact version. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a Commentable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Commentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -100,6 +109,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) Post(ctx context.C } // ToGetRequestInformation retrieves all comments for a version of an artifact. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -111,6 +121,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToGetRequestInform } // ToPostRequestInformation adds a new comment to the artifact version. Both the `artifactId` and theunique `version` number must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -126,6 +137,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) ToPostRequestInfor } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemCommentsRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemCommentsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemCommentsRequestBuilder { return NewItemArtifactsItemVersionsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go index b95c231088..515b6adf4a 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_comments_with_comment_item_request_builder.go @@ -27,7 +27,7 @@ type ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderPutReques Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal instantiates a new WithCommentItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { m := &ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments/{commentId}", pathParameters), @@ -35,7 +35,7 @@ func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderIntern return m } -// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder instantiates a new WithCommentItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder instantiates a new ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -43,6 +43,9 @@ func NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder(rawUr } // Delete deletes a single comment in an artifact version. Only the owner of thecomment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -61,6 +64,9 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Del } // Put updates the value of a single comment in an artifact version. Only the owner of thecomment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -79,6 +85,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) Put } // ToDeleteRequestInformation deletes a single comment in an artifact version. Only the owner of thecomment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -90,6 +97,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToD } // ToPutRequestInformation updates the value of a single comment in an artifact version. Only the owner of thecomment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* No comment with this `commentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.DTONewCommentable, requestConfiguration *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -105,6 +113,7 @@ func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) ToP } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder { return NewItemArtifactsItemVersionsItemCommentsWithCommentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_content_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_content_request_builder.go index 6aeb875968..2ff6133815 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_content_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_content_request_builder.go @@ -14,7 +14,7 @@ type ItemArtifactsItemVersionsItemContentRequestBuilder struct { // ItemArtifactsItemVersionsItemContentRequestBuilderGetQueryParameters retrieves a single version of the artifact content. Both the `artifactId` and theunique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) type ItemArtifactsItemVersionsItemContentRequestBuilderGetQueryParameters struct { // Allows the user to specify how references in the content should be treated. - // Deprecated: This property is deprecated, use referencesAsHandleReferencesType instead + // Deprecated: This property is deprecated, use ReferencesAsHandleReferencesType instead References *string `uriparametername:"references"` // Allows the user to specify how references in the content should be treated. ReferencesAsHandleReferencesType *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.HandleReferencesType `uriparametername:"references"` @@ -30,7 +30,7 @@ type ItemArtifactsItemVersionsItemContentRequestBuilderGetRequestConfiguration s QueryParameters *ItemArtifactsItemVersionsItemContentRequestBuilderGetQueryParameters } -// NewItemArtifactsItemVersionsItemContentRequestBuilderInternal instantiates a new ContentRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemContentRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemContentRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemContentRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemContentRequestBuilder { m := &ItemArtifactsItemVersionsItemContentRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/content{?references*}", pathParameters), @@ -38,7 +38,7 @@ func NewItemArtifactsItemVersionsItemContentRequestBuilderInternal(pathParameter return m } -// NewItemArtifactsItemVersionsItemContentRequestBuilder instantiates a new ContentRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemContentRequestBuilder instantiates a new ItemArtifactsItemVersionsItemContentRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemContentRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemContentRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -46,6 +46,10 @@ func NewItemArtifactsItemVersionsItemContentRequestBuilder(rawUrl string, reques } // Get retrieves a single version of the artifact content. Both the `artifactId` and theunique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemContentRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemContentRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -67,6 +71,7 @@ func (m *ItemArtifactsItemVersionsItemContentRequestBuilder) Get(ctx context.Con } // ToGetRequestInformation retrieves a single version of the artifact content. Both the `artifactId` and theunique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemContentRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemContentRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -81,6 +86,7 @@ func (m *ItemArtifactsItemVersionsItemContentRequestBuilder) ToGetRequestInforma } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemContentRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemContentRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemContentRequestBuilder { return NewItemArtifactsItemVersionsItemContentRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_references_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_references_request_builder.go index 27dbc73795..424b9831ac 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_item_references_request_builder.go @@ -14,7 +14,7 @@ type ItemArtifactsItemVersionsItemReferencesRequestBuilder struct { // ItemArtifactsItemVersionsItemReferencesRequestBuilderGetQueryParameters retrieves all references for a single version of an artifact. Both the `artifactId` and theunique `version` number must be provided. Using the `refType` query parameter, it is possibleto retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) type ItemArtifactsItemVersionsItemReferencesRequestBuilderGetQueryParameters struct { // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. - // Deprecated: This property is deprecated, use refTypeAsReferenceType instead + // Deprecated: This property is deprecated, use RefTypeAsReferenceType instead RefType *string `uriparametername:"refType"` // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. RefTypeAsReferenceType *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ReferenceType `uriparametername:"refType"` @@ -30,7 +30,7 @@ type ItemArtifactsItemVersionsItemReferencesRequestBuilderGetRequestConfiguratio QueryParameters *ItemArtifactsItemVersionsItemReferencesRequestBuilderGetQueryParameters } -// NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsItemReferencesRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemReferencesRequestBuilder { m := &ItemArtifactsItemVersionsItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/references{?refType*}", pathParameters), @@ -38,7 +38,7 @@ func NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal(pathParame return m } -// NewItemArtifactsItemVersionsItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsItemReferencesRequestBuilder instantiates a new ItemArtifactsItemVersionsItemReferencesRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -46,6 +46,10 @@ func NewItemArtifactsItemVersionsItemReferencesRequestBuilder(rawUrl string, req } // Get retrieves all references for a single version of an artifact. Both the `artifactId` and theunique `version` number must be provided. Using the `refType` query parameter, it is possibleto retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemReferencesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -70,6 +74,7 @@ func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) Get(ctx context. } // ToGetRequestInformation retrieves all references for a single version of an artifact. Both the `artifactId` and theunique `version` number must be provided. Using the `refType` query parameter, it is possibleto retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -84,6 +89,7 @@ func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) ToGetRequestInfo } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsItemReferencesRequestBuilder when successful func (m *ItemArtifactsItemVersionsItemReferencesRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsItemReferencesRequestBuilder { return NewItemArtifactsItemVersionsItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_request_builder.go index 1af135f29c..630beae04a 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_request_builder.go @@ -18,12 +18,12 @@ type ItemArtifactsItemVersionsRequestBuilderGetQueryParameters struct { // The number of versions to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `version`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsVersionSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsVersionSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `version`* `createdOn` OrderbyAsVersionSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSortBy `uriparametername:"orderby"` @@ -56,6 +56,7 @@ type ItemArtifactsItemVersionsRequestBuilderPostRequestConfiguration struct { } // ByVersionExpression manage a single version of a single artifact in the registry. +// returns a *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsRequestBuilder) ByVersionExpression(versionExpression string) *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -67,15 +68,15 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) ByVersionExpression(versionExp return NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemVersionsRequestBuilderInternal instantiates a new VersionsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsRequestBuilder { m := &ItemArtifactsItemVersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions{?offset*,limit*,order*,orderby*,dryRun*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions{?dryRun*,limit*,offset*,order*,orderby*}", pathParameters), } return m } -// NewItemArtifactsItemVersionsRequestBuilder instantiates a new VersionsRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsRequestBuilder instantiates a new ItemArtifactsItemVersionsRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -83,6 +84,9 @@ func NewItemArtifactsItemVersionsRequestBuilder(rawUrl string, requestAdapter i2 } // Get returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a VersionSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -103,6 +107,11 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) Get(ctx context.Context, reque } // Post creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was provided (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a VersionMetaDataable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a RuleViolationProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateVersionable, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionMetaDataable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -111,7 +120,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) Post(ctx context.Context, body errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ "400": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, "404": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, - "409": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, + "409": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleViolationProblemDetailsFromDiscriminatorValue, "500": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateVersionMetaDataFromDiscriminatorValue, errorMapping) @@ -125,6 +134,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) Post(ctx context.Context, body } // ToGetRequestInformation returns a list of all versions of the artifact. The result set is paged.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -139,6 +149,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) ToGetRequestInformation(ctx co } // ToPostRequestInformation creates a new version of the artifact by uploading new content. The configured rules forthe artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the typeof that content should match the artifact's type (for example if the artifact type is `AVRO`then the content of the request should be an Apache Avro document).This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was provided (HTTP error `400`)* No artifact with this `artifactId` exists (HTTP error `404`)* The new content violates one of the rules configured for the artifact (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateVersionable, requestConfiguration *ItemArtifactsItemVersionsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -157,6 +168,7 @@ func (m *ItemArtifactsItemVersionsRequestBuilder) ToPostRequestInformation(ctx c } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsRequestBuilder when successful func (m *ItemArtifactsItemVersionsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsRequestBuilder { return NewItemArtifactsItemVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_with_version_expression_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_with_version_expression_item_request_builder.go index 83e8328386..18813fb531 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_with_version_expression_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_item_versions_with_version_expression_item_request_builder.go @@ -36,11 +36,12 @@ type ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderPutRequestC } // Comments manage a collection of comments for an artifact version +// returns a *ItemArtifactsItemVersionsItemCommentsRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Comments() *ItemArtifactsItemVersionsItemCommentsRequestBuilder { return NewItemArtifactsItemVersionsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderInternal instantiates a new WithVersionExpressionItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderInternal instantiates a new ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder { m := &ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}", pathParameters), @@ -48,7 +49,7 @@ func NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderInternal return m } -// NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder instantiates a new WithVersionExpressionItemRequestBuilder and sets the default values. +// NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder instantiates a new ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder and sets the default values. func NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -56,11 +57,16 @@ func NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder(rawUrl } // Content manage a single version of a single artifact in the registry. +// returns a *ItemArtifactsItemVersionsItemContentRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Content() *ItemArtifactsItemVersionsItemContentRequestBuilder { return NewItemArtifactsItemVersionsItemContentRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Delete deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version`are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact.This feature is disabled by default and it's discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 405 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -80,6 +86,10 @@ func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Delet } // Get retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific tothe version (for example, this doesn't include `modifiedOn`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a VersionMetaDataable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -101,6 +111,9 @@ func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Get(c } // Put updates the user-editable portion of the artifact version's metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableVersionMetaDataable, requestConfiguration *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -119,11 +132,13 @@ func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) Put(c } // References manage the references for a single version of an artifact in the registry. +// returns a *ItemArtifactsItemVersionsItemReferencesRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) References() *ItemArtifactsItemVersionsItemReferencesRequestBuilder { return NewItemArtifactsItemVersionsItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToDeleteRequestInformation deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version`are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact.This feature is disabled by default and it's discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -135,6 +150,7 @@ func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) ToDel } // ToGetRequestInformation retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific tothe version (for example, this doesn't include `modifiedOn`).This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -146,6 +162,7 @@ func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) ToGet } // ToPutRequestInformation updates the user-editable portion of the artifact version's metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not.This operation can fail for the following reasons:* No artifact with this `artifactId` exists (HTTP error `404`)* No version with this `version` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableVersionMetaDataable, requestConfiguration *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -161,6 +178,7 @@ func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) ToPut } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder when successful func (m *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder { return NewItemArtifactsItemVersionsWithVersionExpressionItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_request_builder.go index d404ed4b70..2d84489535 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_request_builder.go @@ -26,12 +26,12 @@ type ItemArtifactsRequestBuilderGetQueryParameters struct { // The number of artifacts to skip before starting the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsArtifactSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsArtifactSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsArtifactSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactSortBy `uriparametername:"orderby"` @@ -54,7 +54,7 @@ type ItemArtifactsRequestBuilderPostQueryParameters struct { // When set to `true`, the operation will not result in any changes. Instead, itwill return a result based on whether the operation **would have succeeded**. DryRun *bool `uriparametername:"dryRun"` // Set this option to instruct the server on what to do if the artifact already exists. - // Deprecated: This property is deprecated, use ifExistsAsIfArtifactExists instead + // Deprecated: This property is deprecated, use IfExistsAsIfArtifactExists instead IfExists *string `uriparametername:"ifExists"` // Set this option to instruct the server on what to do if the artifact already exists. IfExistsAsIfArtifactExists *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.IfArtifactExists `uriparametername:"ifExists"` @@ -71,6 +71,7 @@ type ItemArtifactsRequestBuilderPostRequestConfiguration struct { } // ByArtifactId manage a single artifact. +// returns a *ItemArtifactsWithArtifactItemRequestBuilder when successful func (m *ItemArtifactsRequestBuilder) ByArtifactId(artifactId string) *ItemArtifactsWithArtifactItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -82,15 +83,15 @@ func (m *ItemArtifactsRequestBuilder) ByArtifactId(artifactId string) *ItemArtif return NewItemArtifactsWithArtifactItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsRequestBuilderInternal instantiates a new ArtifactsRequestBuilder and sets the default values. +// NewItemArtifactsRequestBuilderInternal instantiates a new ItemArtifactsRequestBuilder and sets the default values. func NewItemArtifactsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsRequestBuilder { m := &ItemArtifactsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts{?limit*,offset*,order*,orderby*,ifExists*,canonical*,dryRun*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts{?canonical*,dryRun*,ifExists*,limit*,offset*,order*,orderby*}", pathParameters), } return m } -// NewItemArtifactsRequestBuilder instantiates a new ArtifactsRequestBuilder and sets the default values. +// NewItemArtifactsRequestBuilder instantiates a new ItemArtifactsRequestBuilder and sets the default values. func NewItemArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -98,6 +99,7 @@ func NewItemArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee } // Delete deletes all of the artifacts that exist in a given group. +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -114,6 +116,8 @@ func (m *ItemArtifactsRequestBuilder) Delete(ctx context.Context, requestConfigu } // Get returns a list of all artifacts in the group. This list is paged. +// returns a ArtifactSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -133,6 +137,10 @@ func (m *ItemArtifactsRequestBuilder) Get(ctx context.Context, requestConfigurat } // Post creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, the registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server willgenerate a unique ID for the artifact. It is typically recommended that callersprovide the ID, because it is typically a meaningful identifier, and as suchfor most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was used for the optional included first version (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`)Note that if the `dryRun` query parameter is set to `true`, then this operationwill not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if anartifact is valid or if a new version passes configured compatibility checks. +// returns a CreateArtifactResponseable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a RuleViolationProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateArtifactable, requestConfiguration *ItemArtifactsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateArtifactResponseable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -140,7 +148,7 @@ func (m *ItemArtifactsRequestBuilder) Post(ctx context.Context, body i00eb2e63d1 } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ "400": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, - "409": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, + "409": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleViolationProblemDetailsFromDiscriminatorValue, "500": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateProblemDetailsFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateCreateArtifactResponseFromDiscriminatorValue, errorMapping) @@ -154,6 +162,7 @@ func (m *ItemArtifactsRequestBuilder) Post(ctx context.Context, body i00eb2e63d1 } // ToDeleteRequestInformation deletes all of the artifacts that exist in a given group. +// returns a *RequestInformation when successful func (m *ItemArtifactsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -165,6 +174,7 @@ func (m *ItemArtifactsRequestBuilder) ToDeleteRequestInformation(ctx context.Con } // ToGetRequestInformation returns a list of all artifacts in the group. This list is paged. +// returns a *RequestInformation when successful func (m *ItemArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -179,6 +189,7 @@ func (m *ItemArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Contex } // ToPostRequestInformation creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, the registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server willgenerate a unique ID for the artifact. It is typically recommended that callersprovide the ID, because it is typically a meaningful identifier, and as suchfor most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An invalid version number was used for the optional included first version (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`)Note that if the `dryRun` query parameter is set to `true`, then this operationwill not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if anartifact is valid or if a new version passes configured compatibility checks. +// returns a *RequestInformation when successful func (m *ItemArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateArtifactable, requestConfiguration *ItemArtifactsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -197,6 +208,7 @@ func (m *ItemArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Conte } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsRequestBuilder when successful func (m *ItemArtifactsRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsRequestBuilder { return NewItemArtifactsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_with_artifact_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_with_artifact_item_request_builder.go index 096f2ac198..82052f63e9 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_artifacts_with_artifact_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_artifacts_with_artifact_item_request_builder.go @@ -36,11 +36,12 @@ type ItemArtifactsWithArtifactItemRequestBuilderPutRequestConfiguration struct { } // Branches manage branches of an artifact. +// returns a *ItemArtifactsItemBranchesRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Branches() *ItemArtifactsItemBranchesRequestBuilder { return NewItemArtifactsItemBranchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// NewItemArtifactsWithArtifactItemRequestBuilderInternal instantiates a new WithArtifactItemRequestBuilder and sets the default values. +// NewItemArtifactsWithArtifactItemRequestBuilderInternal instantiates a new ItemArtifactsWithArtifactItemRequestBuilder and sets the default values. func NewItemArtifactsWithArtifactItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsWithArtifactItemRequestBuilder { m := &ItemArtifactsWithArtifactItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/artifacts/{artifactId}", pathParameters), @@ -48,7 +49,7 @@ func NewItemArtifactsWithArtifactItemRequestBuilderInternal(pathParameters map[s return m } -// NewItemArtifactsWithArtifactItemRequestBuilder instantiates a new WithArtifactItemRequestBuilder and sets the default values. +// NewItemArtifactsWithArtifactItemRequestBuilder instantiates a new ItemArtifactsWithArtifactItemRequestBuilder and sets the default values. func NewItemArtifactsWithArtifactItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemArtifactsWithArtifactItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -56,6 +57,8 @@ func NewItemArtifactsWithArtifactItemRequestBuilder(rawUrl string, requestAdapte } // Delete deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsWithArtifactItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -73,6 +76,9 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) Delete(ctx context.Context } // Get gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includesboth generated (read-only) and editable metadata (such as name and description).This operation can fail for the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ArtifactMetaDataable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsWithArtifactItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -93,6 +99,8 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) Get(ctx context.Context, r } // Put updates the editable parts of the artifact's metadata. Not all metadata fields canbe updated. Note that only the properties included will be updated. You can updateonly the name by including only the `name` property in the payload of the request.Properties that are allowed but not present will result in the artifact's metadatanot being changed.This operation can fail for the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemArtifactsWithArtifactItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableArtifactMetaDataable, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -110,11 +118,13 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) Put(ctx context.Context, b } // Rules manage the rules for a single artifact. +// returns a *ItemArtifactsItemRulesRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Rules() *ItemArtifactsItemRulesRequestBuilder { return NewItemArtifactsItemRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToDeleteRequestInformation deletes an artifact completely, resulting in all versions of the artifact also beingdeleted. This may fail for one of the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -126,6 +136,7 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToDeleteRequestInformation } // ToGetRequestInformation gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includesboth generated (read-only) and editable metadata (such as name and description).This operation can fail for the following reasons:* No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -137,6 +148,7 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToGetRequestInformation(ct } // ToPutRequestInformation updates the editable parts of the artifact's metadata. Not all metadata fields canbe updated. Note that only the properties included will be updated. You can updateonly the name by including only the `name` property in the payload of the request.Properties that are allowed but not present will result in the artifact's metadatanot being changed.This operation can fail for the following reasons:* No artifact with the `artifactId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableArtifactMetaDataable, requestConfiguration *ItemArtifactsWithArtifactItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -152,11 +164,13 @@ func (m *ItemArtifactsWithArtifactItemRequestBuilder) ToPutRequestInformation(ct } // Versions manage all the versions of an artifact in the registry. +// returns a *ItemArtifactsItemVersionsRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) Versions() *ItemArtifactsItemVersionsRequestBuilder { return NewItemArtifactsItemVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemArtifactsWithArtifactItemRequestBuilder when successful func (m *ItemArtifactsWithArtifactItemRequestBuilder) WithUrl(rawUrl string) *ItemArtifactsWithArtifactItemRequestBuilder { return NewItemArtifactsWithArtifactItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_rules_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_rules_request_builder.go index ac14abd498..73ab24ff4e 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_rules_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_rules_request_builder.go @@ -36,6 +36,7 @@ type ItemRulesRequestBuilderPostRequestConfiguration struct { } // ByRuleType manage the configuration of a single group rule. +// returns a *ItemRulesWithRuleTypeItemRequestBuilder when successful func (m *ItemRulesRequestBuilder) ByRuleType(ruleType string) *ItemRulesWithRuleTypeItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -47,7 +48,7 @@ func (m *ItemRulesRequestBuilder) ByRuleType(ruleType string) *ItemRulesWithRule return NewItemRulesWithRuleTypeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } -// NewItemRulesRequestBuilderInternal instantiates a new RulesRequestBuilder and sets the default values. +// NewItemRulesRequestBuilderInternal instantiates a new ItemRulesRequestBuilder and sets the default values. func NewItemRulesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemRulesRequestBuilder { m := &ItemRulesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/rules", pathParameters), @@ -55,7 +56,7 @@ func NewItemRulesRequestBuilderInternal(pathParameters map[string]string, reques return m } -// NewItemRulesRequestBuilder instantiates a new RulesRequestBuilder and sets the default values. +// NewItemRulesRequestBuilder instantiates a new ItemRulesRequestBuilder and sets the default values. func NewItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemRulesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -63,6 +64,8 @@ func NewItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 } // Delete deletes all of the rules configured for the group. After this is done, the globalrules apply to artifacts in the group again.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemRulesRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemRulesRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -80,6 +83,9 @@ func (m *ItemRulesRequestBuilder) Delete(ctx context.Context, requestConfigurati } // Get returns a list of all rules configured for the group. The set of rules determineshow the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []RuleType when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemRulesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemRulesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.RuleType, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -103,6 +109,10 @@ func (m *ItemRulesRequestBuilder) Get(ctx context.Context, requestConfiguration } // Post adds a rule to the list of rules that get applied to an artifact in the group when adding newversions. All configured rules must pass to successfully add a new artifact version.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* Rule (named in the request body) is unknown (HTTP error `400`)* Rule is already configured (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 409 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemRulesRequestBuilder) Post(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleable, requestConfiguration *ItemRulesRequestBuilderPostRequestConfiguration) error { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -122,6 +132,7 @@ func (m *ItemRulesRequestBuilder) Post(ctx context.Context, body i00eb2e63d15692 } // ToDeleteRequestInformation deletes all of the rules configured for the group. After this is done, the globalrules apply to artifacts in the group again.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemRulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemRulesRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -133,6 +144,7 @@ func (m *ItemRulesRequestBuilder) ToDeleteRequestInformation(ctx context.Context } // ToGetRequestInformation returns a list of all rules configured for the group. The set of rules determineshow the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemRulesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemRulesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -144,6 +156,7 @@ func (m *ItemRulesRequestBuilder) ToGetRequestInformation(ctx context.Context, r } // ToPostRequestInformation adds a rule to the list of rules that get applied to an artifact in the group when adding newversions. All configured rules must pass to successfully add a new artifact version.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* Rule (named in the request body) is unknown (HTTP error `400`)* Rule is already configured (HTTP error `409`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemRulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateRuleable, requestConfiguration *ItemRulesRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -159,6 +172,7 @@ func (m *ItemRulesRequestBuilder) ToPostRequestInformation(ctx context.Context, } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesRequestBuilder when successful func (m *ItemRulesRequestBuilder) WithUrl(rawUrl string) *ItemRulesRequestBuilder { return NewItemRulesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/item_rules_with_rule_type_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/item_rules_with_rule_type_item_request_builder.go index 4168456037..c181915188 100644 --- a/go-sdk/pkg/registryclient-v3/groups/item_rules_with_rule_type_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/item_rules_with_rule_type_item_request_builder.go @@ -35,7 +35,7 @@ type ItemRulesWithRuleTypeItemRequestBuilderPutRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewItemRulesWithRuleTypeItemRequestBuilderInternal instantiates a new WithRuleTypeItemRequestBuilder and sets the default values. +// NewItemRulesWithRuleTypeItemRequestBuilderInternal instantiates a new ItemRulesWithRuleTypeItemRequestBuilder and sets the default values. func NewItemRulesWithRuleTypeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemRulesWithRuleTypeItemRequestBuilder { m := &ItemRulesWithRuleTypeItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{groupId}/rules/{ruleType}", pathParameters), @@ -43,7 +43,7 @@ func NewItemRulesWithRuleTypeItemRequestBuilderInternal(pathParameters map[strin return m } -// NewItemRulesWithRuleTypeItemRequestBuilder instantiates a new WithRuleTypeItemRequestBuilder and sets the default values. +// NewItemRulesWithRuleTypeItemRequestBuilder instantiates a new ItemRulesWithRuleTypeItemRequestBuilder and sets the default values. func NewItemRulesWithRuleTypeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemRulesWithRuleTypeItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -51,6 +51,8 @@ func NewItemRulesWithRuleTypeItemRequestBuilder(rawUrl string, requestAdapter i2 } // Delete deletes a rule from the group. This results in the rule no longer applying forthis group. If this is the only rule configured for the group, this is the same as deleting **all** rules, and the globally configured rules now apply tothis group.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* No rule with this name/type is configured for this group (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemRulesWithRuleTypeItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemRulesWithRuleTypeItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -68,6 +70,9 @@ func (m *ItemRulesWithRuleTypeItemRequestBuilder) Delete(ctx context.Context, re } // Get returns information about a single rule configured for a group. This is usefulwhen you want to know what the current configuration settings are for a specific rule.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemRulesWithRuleTypeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemRulesWithRuleTypeItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -88,6 +93,9 @@ func (m *ItemRulesWithRuleTypeItemRequestBuilder) Get(ctx context.Context, reque } // Put updates the configuration of a single rule for the group. The configuration datais specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a Ruleable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ItemRulesWithRuleTypeItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, requestConfiguration *ItemRulesWithRuleTypeItemRequestBuilderPutRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -108,6 +116,7 @@ func (m *ItemRulesWithRuleTypeItemRequestBuilder) Put(ctx context.Context, body } // ToDeleteRequestInformation deletes a rule from the group. This results in the rule no longer applying forthis group. If this is the only rule configured for the group, this is the same as deleting **all** rules, and the globally configured rules now apply tothis group.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* No rule with this name/type is configured for this group (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemRulesWithRuleTypeItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemRulesWithRuleTypeItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -119,6 +128,7 @@ func (m *ItemRulesWithRuleTypeItemRequestBuilder) ToDeleteRequestInformation(ctx } // ToGetRequestInformation returns information about a single rule configured for a group. This is usefulwhen you want to know what the current configuration settings are for a specific rule.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemRulesWithRuleTypeItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemRulesWithRuleTypeItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -130,6 +140,7 @@ func (m *ItemRulesWithRuleTypeItemRequestBuilder) ToGetRequestInformation(ctx co } // ToPutRequestInformation updates the configuration of a single rule for the group. The configuration datais specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule.This operation can fail for the following reasons:* No group with this `groupId` exists (HTTP error `404`)* No rule with this name/type is configured for this artifact (HTTP error `404`)* Invalid rule type (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ItemRulesWithRuleTypeItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Ruleable, requestConfiguration *ItemRulesWithRuleTypeItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -145,6 +156,7 @@ func (m *ItemRulesWithRuleTypeItemRequestBuilder) ToPutRequestInformation(ctx co } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesWithRuleTypeItemRequestBuilder when successful func (m *ItemRulesWithRuleTypeItemRequestBuilder) WithUrl(rawUrl string) *ItemRulesWithRuleTypeItemRequestBuilder { return NewItemRulesWithRuleTypeItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/groups/with_group_item_request_builder.go b/go-sdk/pkg/registryclient-v3/groups/with_group_item_request_builder.go index c96ac0f56f..927b5efe2c 100644 --- a/go-sdk/pkg/registryclient-v3/groups/with_group_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/groups/with_group_item_request_builder.go @@ -36,6 +36,7 @@ type WithGroupItemRequestBuilderPutRequestConfiguration struct { } // Artifacts manage the collection of artifacts within a single group in the registry. +// returns a *ItemArtifactsRequestBuilder when successful func (m *WithGroupItemRequestBuilder) Artifacts() *ItemArtifactsRequestBuilder { return NewItemArtifactsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -56,6 +57,8 @@ func NewWithGroupItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee } // Delete deletes a group by identifier. This operation also deletes all artifacts withinthe group, so should be used very carefully.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group does not exist (HTTP error `404`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *WithGroupItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderDeleteRequestConfiguration) error { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration) if err != nil { @@ -73,6 +76,9 @@ func (m *WithGroupItemRequestBuilder) Delete(ctx context.Context, requestConfigu } // Get returns a group using the specified id.This operation can fail for the following reasons:* No group exists with the specified ID (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a GroupMetaDataable when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *WithGroupItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.GroupMetaDataable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -93,6 +99,8 @@ func (m *WithGroupItemRequestBuilder) Get(ctx context.Context, requestConfigurat } // Put updates the metadata of a group using the specified id.This operation can fail for the following reasons:* No group exists with the specified ID (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *WithGroupItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableGroupMetaDataable, requestConfiguration *WithGroupItemRequestBuilderPutRequestConfiguration) error { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration) if err != nil { @@ -110,11 +118,13 @@ func (m *WithGroupItemRequestBuilder) Put(ctx context.Context, body i00eb2e63d15 } // Rules manage the rules for a group. +// returns a *ItemRulesRequestBuilder when successful func (m *WithGroupItemRequestBuilder) Rules() *ItemRulesRequestBuilder { return NewItemRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToDeleteRequestInformation deletes a group by identifier. This operation also deletes all artifacts withinthe group, so should be used very carefully.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`)* The group does not exist (HTTP error `404`) +// returns a *RequestInformation when successful func (m *WithGroupItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -126,6 +136,7 @@ func (m *WithGroupItemRequestBuilder) ToDeleteRequestInformation(ctx context.Con } // ToGetRequestInformation returns a group using the specified id.This operation can fail for the following reasons:* No group exists with the specified ID (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *WithGroupItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WithGroupItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -137,6 +148,7 @@ func (m *WithGroupItemRequestBuilder) ToGetRequestInformation(ctx context.Contex } // ToPutRequestInformation updates the metadata of a group using the specified id.This operation can fail for the following reasons:* No group exists with the specified ID (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *WithGroupItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.EditableGroupMetaDataable, requestConfiguration *WithGroupItemRequestBuilderPutRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -152,6 +164,7 @@ func (m *WithGroupItemRequestBuilder) ToPutRequestInformation(ctx context.Contex } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithGroupItemRequestBuilder when successful func (m *WithGroupItemRequestBuilder) WithUrl(rawUrl string) *WithGroupItemRequestBuilder { return NewWithGroupItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/content_hashes_item_references_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/content_hashes_item_references_request_builder.go index b357085f89..d7b5b62d0a 100644 --- a/go-sdk/pkg/registryclient-v3/ids/content_hashes_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/content_hashes_item_references_request_builder.go @@ -19,7 +19,7 @@ type ContentHashesItemReferencesRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentHashesItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentHashesItemReferencesRequestBuilderInternal instantiates a new ContentHashesItemReferencesRequestBuilder and sets the default values. func NewContentHashesItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesItemReferencesRequestBuilder { m := &ContentHashesItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentHashes/{contentHash}/references", pathParameters), @@ -27,7 +27,7 @@ func NewContentHashesItemReferencesRequestBuilderInternal(pathParameters map[str return m } -// NewContentHashesItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentHashesItemReferencesRequestBuilder instantiates a new ContentHashesItemReferencesRequestBuilder and sets the default values. func NewContentHashesItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,7 @@ func NewContentHashesItemReferencesRequestBuilder(rawUrl string, requestAdapter } // Get returns a list containing all the artifact references using the artifact content hash.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful func (m *ContentHashesItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentHashesItemReferencesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +55,7 @@ func (m *ContentHashesItemReferencesRequestBuilder) Get(ctx context.Context, req } // ToGetRequestInformation returns a list containing all the artifact references using the artifact content hash.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentHashesItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentHashesItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +67,7 @@ func (m *ContentHashesItemReferencesRequestBuilder) ToGetRequestInformation(ctx } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentHashesItemReferencesRequestBuilder when successful func (m *ContentHashesItemReferencesRequestBuilder) WithUrl(rawUrl string) *ContentHashesItemReferencesRequestBuilder { return NewContentHashesItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/content_hashes_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/content_hashes_request_builder.go index 56388eb34f..14825ede34 100644 --- a/go-sdk/pkg/registryclient-v3/ids/content_hashes_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/content_hashes_request_builder.go @@ -10,6 +10,7 @@ type ContentHashesRequestBuilder struct { } // ByContentHash access artifact content utilizing the SHA-256 hash of the content. +// returns a *ContentHashesWithContentHashItemRequestBuilder when successful func (m *ContentHashesRequestBuilder) ByContentHash(contentHash string) *ContentHashesWithContentHashItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { diff --git a/go-sdk/pkg/registryclient-v3/ids/content_hashes_with_content_hash_item_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/content_hashes_with_content_hash_item_request_builder.go index 867681b8c2..420c79d5ae 100644 --- a/go-sdk/pkg/registryclient-v3/ids/content_hashes_with_content_hash_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/content_hashes_with_content_hash_item_request_builder.go @@ -19,7 +19,7 @@ type ContentHashesWithContentHashItemRequestBuilderGetRequestConfiguration struc Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentHashesWithContentHashItemRequestBuilderInternal instantiates a new WithContentHashItemRequestBuilder and sets the default values. +// NewContentHashesWithContentHashItemRequestBuilderInternal instantiates a new ContentHashesWithContentHashItemRequestBuilder and sets the default values. func NewContentHashesWithContentHashItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesWithContentHashItemRequestBuilder { m := &ContentHashesWithContentHashItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentHashes/{contentHash}", pathParameters), @@ -27,7 +27,7 @@ func NewContentHashesWithContentHashItemRequestBuilderInternal(pathParameters ma return m } -// NewContentHashesWithContentHashItemRequestBuilder instantiates a new WithContentHashItemRequestBuilder and sets the default values. +// NewContentHashesWithContentHashItemRequestBuilder instantiates a new ContentHashesWithContentHashItemRequestBuilder and sets the default values. func NewContentHashesWithContentHashItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentHashesWithContentHashItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewContentHashesWithContentHashItemRequestBuilder(rawUrl string, requestAda } // Get gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifactversions in the case where the artifact versions have identical content.This operation may fail for one of the following reasons:* No content with this `contentHash` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ContentHashesWithContentHashItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentHashesWithContentHashItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -55,11 +58,13 @@ func (m *ContentHashesWithContentHashItemRequestBuilder) Get(ctx context.Context } // References the references property +// returns a *ContentHashesItemReferencesRequestBuilder when successful func (m *ContentHashesWithContentHashItemRequestBuilder) References() *ContentHashesItemReferencesRequestBuilder { return NewContentHashesItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToGetRequestInformation gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifactversions in the case where the artifact versions have identical content.This operation may fail for one of the following reasons:* No content with this `contentHash` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentHashesWithContentHashItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentHashesWithContentHashItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -71,6 +76,7 @@ func (m *ContentHashesWithContentHashItemRequestBuilder) ToGetRequestInformation } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentHashesWithContentHashItemRequestBuilder when successful func (m *ContentHashesWithContentHashItemRequestBuilder) WithUrl(rawUrl string) *ContentHashesWithContentHashItemRequestBuilder { return NewContentHashesWithContentHashItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/content_ids_item_references_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/content_ids_item_references_request_builder.go index 382354f3b9..27be7720b6 100644 --- a/go-sdk/pkg/registryclient-v3/ids/content_ids_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/content_ids_item_references_request_builder.go @@ -19,7 +19,7 @@ type ContentIdsItemReferencesRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentIdsItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentIdsItemReferencesRequestBuilderInternal instantiates a new ContentIdsItemReferencesRequestBuilder and sets the default values. func NewContentIdsItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsItemReferencesRequestBuilder { m := &ContentIdsItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentIds/{contentId}/references", pathParameters), @@ -27,7 +27,7 @@ func NewContentIdsItemReferencesRequestBuilderInternal(pathParameters map[string return m } -// NewContentIdsItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewContentIdsItemReferencesRequestBuilder instantiates a new ContentIdsItemReferencesRequestBuilder and sets the default values. func NewContentIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,7 @@ func NewContentIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2a } // Get returns a list containing all the artifact references using the artifact content ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful func (m *ContentIdsItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentIdsItemReferencesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +55,7 @@ func (m *ContentIdsItemReferencesRequestBuilder) Get(ctx context.Context, reques } // ToGetRequestInformation returns a list containing all the artifact references using the artifact content ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentIdsItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +67,7 @@ func (m *ContentIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx con } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentIdsItemReferencesRequestBuilder when successful func (m *ContentIdsItemReferencesRequestBuilder) WithUrl(rawUrl string) *ContentIdsItemReferencesRequestBuilder { return NewContentIdsItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/content_ids_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/content_ids_request_builder.go index a2f9354765..6882de2f1b 100644 --- a/go-sdk/pkg/registryclient-v3/ids/content_ids_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/content_ids_request_builder.go @@ -12,6 +12,7 @@ type ContentIdsRequestBuilder struct { // ByContentId access artifact content utilizing the unique content identifier for that content. // Deprecated: This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead. +// returns a *ContentIdsWithContentItemRequestBuilder when successful func (m *ContentIdsRequestBuilder) ByContentId(contentId string) *ContentIdsWithContentItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -24,6 +25,7 @@ func (m *ContentIdsRequestBuilder) ByContentId(contentId string) *ContentIdsWith } // ByContentIdInt64 access artifact content utilizing the unique content identifier for that content. +// returns a *ContentIdsWithContentItemRequestBuilder when successful func (m *ContentIdsRequestBuilder) ByContentIdInt64(contentId int64) *ContentIdsWithContentItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { diff --git a/go-sdk/pkg/registryclient-v3/ids/content_ids_with_content_item_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/content_ids_with_content_item_request_builder.go index 6fd57f76dd..720e328a0d 100644 --- a/go-sdk/pkg/registryclient-v3/ids/content_ids_with_content_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/content_ids_with_content_item_request_builder.go @@ -19,7 +19,7 @@ type ContentIdsWithContentItemRequestBuilderGetRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewContentIdsWithContentItemRequestBuilderInternal instantiates a new WithContentItemRequestBuilder and sets the default values. +// NewContentIdsWithContentItemRequestBuilderInternal instantiates a new ContentIdsWithContentItemRequestBuilder and sets the default values. func NewContentIdsWithContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsWithContentItemRequestBuilder { m := &ContentIdsWithContentItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/contentIds/{contentId}", pathParameters), @@ -27,7 +27,7 @@ func NewContentIdsWithContentItemRequestBuilderInternal(pathParameters map[strin return m } -// NewContentIdsWithContentItemRequestBuilder instantiates a new WithContentItemRequestBuilder and sets the default values. +// NewContentIdsWithContentItemRequestBuilder instantiates a new ContentIdsWithContentItemRequestBuilder and sets the default values. func NewContentIdsWithContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ContentIdsWithContentItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -35,6 +35,9 @@ func NewContentIdsWithContentItemRequestBuilder(rawUrl string, requestAdapter i2 } // Get gets the content for an artifact version in the registry using the unique contentidentifier for that content. This content ID may be shared by multiple artifactversions in the case where the artifact versions are identical.This operation may fail for one of the following reasons:* No content with this `contentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ContentIdsWithContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ContentIdsWithContentItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -55,11 +58,13 @@ func (m *ContentIdsWithContentItemRequestBuilder) Get(ctx context.Context, reque } // References the references property +// returns a *ContentIdsItemReferencesRequestBuilder when successful func (m *ContentIdsWithContentItemRequestBuilder) References() *ContentIdsItemReferencesRequestBuilder { return NewContentIdsItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToGetRequestInformation gets the content for an artifact version in the registry using the unique contentidentifier for that content. This content ID may be shared by multiple artifactversions in the case where the artifact versions are identical.This operation may fail for one of the following reasons:* No content with this `contentId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ContentIdsWithContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ContentIdsWithContentItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -71,6 +76,7 @@ func (m *ContentIdsWithContentItemRequestBuilder) ToGetRequestInformation(ctx co } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ContentIdsWithContentItemRequestBuilder when successful func (m *ContentIdsWithContentItemRequestBuilder) WithUrl(rawUrl string) *ContentIdsWithContentItemRequestBuilder { return NewContentIdsWithContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/global_ids_item_references_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/global_ids_item_references_request_builder.go index ad1e906fad..012f90794f 100644 --- a/go-sdk/pkg/registryclient-v3/ids/global_ids_item_references_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/global_ids_item_references_request_builder.go @@ -14,7 +14,7 @@ type GlobalIdsItemReferencesRequestBuilder struct { // GlobalIdsItemReferencesRequestBuilderGetQueryParameters returns a list containing all the artifact references using the artifact global ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) type GlobalIdsItemReferencesRequestBuilderGetQueryParameters struct { // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. - // Deprecated: This property is deprecated, use refTypeAsReferenceType instead + // Deprecated: This property is deprecated, use RefTypeAsReferenceType instead RefType *string `uriparametername:"refType"` // Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. RefTypeAsReferenceType *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ReferenceType `uriparametername:"refType"` @@ -30,7 +30,7 @@ type GlobalIdsItemReferencesRequestBuilderGetRequestConfiguration struct { QueryParameters *GlobalIdsItemReferencesRequestBuilderGetQueryParameters } -// NewGlobalIdsItemReferencesRequestBuilderInternal instantiates a new ReferencesRequestBuilder and sets the default values. +// NewGlobalIdsItemReferencesRequestBuilderInternal instantiates a new GlobalIdsItemReferencesRequestBuilder and sets the default values. func NewGlobalIdsItemReferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsItemReferencesRequestBuilder { m := &GlobalIdsItemReferencesRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/globalIds/{globalId}/references{?refType*}", pathParameters), @@ -38,7 +38,7 @@ func NewGlobalIdsItemReferencesRequestBuilderInternal(pathParameters map[string] return m } -// NewGlobalIdsItemReferencesRequestBuilder instantiates a new ReferencesRequestBuilder and sets the default values. +// NewGlobalIdsItemReferencesRequestBuilder instantiates a new GlobalIdsItemReferencesRequestBuilder and sets the default values. func NewGlobalIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsItemReferencesRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -46,6 +46,7 @@ func NewGlobalIdsItemReferencesRequestBuilder(rawUrl string, requestAdapter i2ae } // Get returns a list containing all the artifact references using the artifact global ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a []ArtifactReferenceable when successful func (m *GlobalIdsItemReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *GlobalIdsItemReferencesRequestBuilderGetRequestConfiguration) ([]i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactReferenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -65,6 +66,7 @@ func (m *GlobalIdsItemReferencesRequestBuilder) Get(ctx context.Context, request } // ToGetRequestInformation returns a list containing all the artifact references using the artifact global ID.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *GlobalIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GlobalIdsItemReferencesRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -79,6 +81,7 @@ func (m *GlobalIdsItemReferencesRequestBuilder) ToGetRequestInformation(ctx cont } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GlobalIdsItemReferencesRequestBuilder when successful func (m *GlobalIdsItemReferencesRequestBuilder) WithUrl(rawUrl string) *GlobalIdsItemReferencesRequestBuilder { return NewGlobalIdsItemReferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/global_ids_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/global_ids_request_builder.go index 4956115247..716382c6c0 100644 --- a/go-sdk/pkg/registryclient-v3/ids/global_ids_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/global_ids_request_builder.go @@ -12,6 +12,7 @@ type GlobalIdsRequestBuilder struct { // ByGlobalId access artifact content utilizing an artifact version's globally unique identifier. // Deprecated: This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead. +// returns a *GlobalIdsWithGlobalItemRequestBuilder when successful func (m *GlobalIdsRequestBuilder) ByGlobalId(globalId string) *GlobalIdsWithGlobalItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { @@ -24,6 +25,7 @@ func (m *GlobalIdsRequestBuilder) ByGlobalId(globalId string) *GlobalIdsWithGlob } // ByGlobalIdInt64 access artifact content utilizing an artifact version's globally unique identifier. +// returns a *GlobalIdsWithGlobalItemRequestBuilder when successful func (m *GlobalIdsRequestBuilder) ByGlobalIdInt64(globalId int64) *GlobalIdsWithGlobalItemRequestBuilder { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { diff --git a/go-sdk/pkg/registryclient-v3/ids/global_ids_with_global_item_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/global_ids_with_global_item_request_builder.go index 828d1e625c..29cca7a012 100644 --- a/go-sdk/pkg/registryclient-v3/ids/global_ids_with_global_item_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/global_ids_with_global_item_request_builder.go @@ -14,7 +14,7 @@ type GlobalIdsWithGlobalItemRequestBuilder struct { // GlobalIdsWithGlobalItemRequestBuilderGetQueryParameters gets the content for an artifact version in the registry using its globally uniqueidentifier.This operation may fail for one of the following reasons:* No artifact version with this `globalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) type GlobalIdsWithGlobalItemRequestBuilderGetQueryParameters struct { // Allows the user to specify how references in the content should be treated. - // Deprecated: This property is deprecated, use referencesAsHandleReferencesType instead + // Deprecated: This property is deprecated, use ReferencesAsHandleReferencesType instead References *string `uriparametername:"references"` // Allows the user to specify how references in the content should be treated. ReferencesAsHandleReferencesType *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.HandleReferencesType `uriparametername:"references"` @@ -30,7 +30,7 @@ type GlobalIdsWithGlobalItemRequestBuilderGetRequestConfiguration struct { QueryParameters *GlobalIdsWithGlobalItemRequestBuilderGetQueryParameters } -// NewGlobalIdsWithGlobalItemRequestBuilderInternal instantiates a new WithGlobalItemRequestBuilder and sets the default values. +// NewGlobalIdsWithGlobalItemRequestBuilderInternal instantiates a new GlobalIdsWithGlobalItemRequestBuilder and sets the default values. func NewGlobalIdsWithGlobalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsWithGlobalItemRequestBuilder { m := &GlobalIdsWithGlobalItemRequestBuilder{ BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/ids/globalIds/{globalId}{?references*}", pathParameters), @@ -38,7 +38,7 @@ func NewGlobalIdsWithGlobalItemRequestBuilderInternal(pathParameters map[string] return m } -// NewGlobalIdsWithGlobalItemRequestBuilder instantiates a new WithGlobalItemRequestBuilder and sets the default values. +// NewGlobalIdsWithGlobalItemRequestBuilder instantiates a new GlobalIdsWithGlobalItemRequestBuilder and sets the default values. func NewGlobalIdsWithGlobalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GlobalIdsWithGlobalItemRequestBuilder { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl @@ -46,6 +46,9 @@ func NewGlobalIdsWithGlobalItemRequestBuilder(rawUrl string, requestAdapter i2ae } // Get gets the content for an artifact version in the registry using its globally uniqueidentifier.This operation may fail for one of the following reasons:* No artifact version with this `globalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a []byte when successful +// returns a ProblemDetails error when the service returns a 404 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *GlobalIdsWithGlobalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *GlobalIdsWithGlobalItemRequestBuilderGetRequestConfiguration) ([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -66,11 +69,13 @@ func (m *GlobalIdsWithGlobalItemRequestBuilder) Get(ctx context.Context, request } // References the references property +// returns a *GlobalIdsItemReferencesRequestBuilder when successful func (m *GlobalIdsWithGlobalItemRequestBuilder) References() *GlobalIdsItemReferencesRequestBuilder { return NewGlobalIdsItemReferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ToGetRequestInformation gets the content for an artifact version in the registry using its globally uniqueidentifier.This operation may fail for one of the following reasons:* No artifact version with this `globalId` exists (HTTP error `404`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *GlobalIdsWithGlobalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GlobalIdsWithGlobalItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -85,6 +90,7 @@ func (m *GlobalIdsWithGlobalItemRequestBuilder) ToGetRequestInformation(ctx cont } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GlobalIdsWithGlobalItemRequestBuilder when successful func (m *GlobalIdsWithGlobalItemRequestBuilder) WithUrl(rawUrl string) *GlobalIdsWithGlobalItemRequestBuilder { return NewGlobalIdsWithGlobalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/ids/ids_request_builder.go b/go-sdk/pkg/registryclient-v3/ids/ids_request_builder.go index db637809ce..b60f83cb92 100644 --- a/go-sdk/pkg/registryclient-v3/ids/ids_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/ids/ids_request_builder.go @@ -25,16 +25,19 @@ func NewIdsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c } // ContentHashes the contentHashes property +// returns a *ContentHashesRequestBuilder when successful func (m *IdsRequestBuilder) ContentHashes() *ContentHashesRequestBuilder { return NewContentHashesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // ContentIds the contentIds property +// returns a *ContentIdsRequestBuilder when successful func (m *IdsRequestBuilder) ContentIds() *ContentIdsRequestBuilder { return NewContentIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // GlobalIds the globalIds property +// returns a *GlobalIdsRequestBuilder when successful func (m *IdsRequestBuilder) GlobalIds() *GlobalIdsRequestBuilder { return NewGlobalIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/kiota-lock.json b/go-sdk/pkg/registryclient-v3/kiota-lock.json index 6c1937f4df..cc2b7bc5e4 100644 --- a/go-sdk/pkg/registryclient-v3/kiota-lock.json +++ b/go-sdk/pkg/registryclient-v3/kiota-lock.json @@ -1,14 +1,15 @@ { - "descriptionHash": "79B205310FA70DD9DA535BB286F89E27394E5714135C8039E068DE7A312B64AB9124702A6EAD6829511FBCC23221D53BA3EC93E5D48B1D092FA94A188B4BA76F", + "descriptionHash": "63458FA9F74D289AF7723F27696C3DBA642832DEC01628597EEF51657803AE44946245B0BD2B46A22E96261A48CF659102629051B9F248F60040E7914A2A029C", "descriptionLocation": "../../v3.json", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.10.1", + "kiotaVersion": "1.18.0", "clientClassName": "ApiClient", "clientNamespaceName": "github.com/apicurio/apicurio-registry/go-sdk/pkg/registryclient-v3", "language": "Go", "usesBackingStore": false, "excludeBackwardCompatible": false, "includeAdditionalData": true, + "disableSSLValidation": false, "serializers": [ "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", diff --git a/go-sdk/pkg/registryclient-v3/models/add_version_to_branch.go b/go-sdk/pkg/registryclient-v3/models/add_version_to_branch.go index a88a36d6eb..abe46e4b0a 100644 --- a/go-sdk/pkg/registryclient-v3/models/add_version_to_branch.go +++ b/go-sdk/pkg/registryclient-v3/models/add_version_to_branch.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// AddVersionToBranch type AddVersionToBranch struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewAddVersionToBranch() *AddVersionToBranch { } // CreateAddVersionToBranchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateAddVersionToBranchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewAddVersionToBranch(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *AddVersionToBranch) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *AddVersionToBranch) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["version"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *AddVersionToBranch) GetFieldDeserializers() map[string]func(i878a80d233 } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *AddVersionToBranch) GetVersion() *string { return m.version } @@ -77,7 +80,6 @@ func (m *AddVersionToBranch) SetVersion(value *string) { m.version = value } -// AddVersionToBranchable type AddVersionToBranchable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/artifact_meta_data.go b/go-sdk/pkg/registryclient-v3/models/artifact_meta_data.go index f1d1cd4604..8b159cd09d 100644 --- a/go-sdk/pkg/registryclient-v3/models/artifact_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/artifact_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// ArtifactMetaData type ArtifactMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -39,36 +38,43 @@ func NewArtifactMetaData() *ArtifactMetaData { } // CreateArtifactMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *ArtifactMetaData) GetArtifactId() *string { return m.artifactId } // GetArtifactType gets the artifactType property value. The artifactType property +// returns a *string when successful func (m *ArtifactMetaData) GetArtifactType() *string { return m.artifactType } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *ArtifactMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *ArtifactMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -175,31 +181,37 @@ func (m *ArtifactMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *ArtifactMetaData) GetGroupId() *string { return m.groupId } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *ArtifactMetaData) GetLabels() Labelsable { return m.labels } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *ArtifactMetaData) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *ArtifactMetaData) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ArtifactMetaData) GetName() *string { return m.name } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *ArtifactMetaData) GetOwner() *string { return m.owner } @@ -330,7 +342,6 @@ func (m *ArtifactMetaData) SetOwner(value *string) { m.owner = value } -// ArtifactMetaDataable type ArtifactMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/artifact_reference.go b/go-sdk/pkg/registryclient-v3/models/artifact_reference.go index abe393d87c..4d268ce3d1 100644 --- a/go-sdk/pkg/registryclient-v3/models/artifact_reference.go +++ b/go-sdk/pkg/registryclient-v3/models/artifact_reference.go @@ -26,21 +26,25 @@ func NewArtifactReference() *ArtifactReference { } // CreateArtifactReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactReference(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactReference) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The artifactId property +// returns a *string when successful func (m *ArtifactReference) GetArtifactId() *string { return m.artifactId } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactReference) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -87,16 +91,19 @@ func (m *ArtifactReference) GetFieldDeserializers() map[string]func(i878a80d2330 } // GetGroupId gets the groupId property value. The groupId property +// returns a *string when successful func (m *ArtifactReference) GetGroupId() *string { return m.groupId } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ArtifactReference) GetName() *string { return m.name } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *ArtifactReference) GetVersion() *string { return m.version } @@ -161,7 +168,6 @@ func (m *ArtifactReference) SetVersion(value *string) { m.version = value } -// ArtifactReferenceable type ArtifactReferenceable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/artifact_search_results.go b/go-sdk/pkg/registryclient-v3/models/artifact_search_results.go index e3937d6f6b..0439457f2e 100644 --- a/go-sdk/pkg/registryclient-v3/models/artifact_search_results.go +++ b/go-sdk/pkg/registryclient-v3/models/artifact_search_results.go @@ -22,26 +22,31 @@ func NewArtifactSearchResults() *ArtifactSearchResults { } // CreateArtifactSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifacts gets the artifacts property value. The artifacts returned in the result set. +// returns a []SearchedArtifactable when successful func (m *ArtifactSearchResults) GetArtifacts() []SearchedArtifactable { return m.artifacts } // GetCount gets the count property value. The total number of artifacts that matched the query that produced the result set (may be more than the number of artifacts in the result set). +// returns a *int32 when successful func (m *ArtifactSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifacts"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -117,7 +122,6 @@ func (m *ArtifactSearchResults) SetCount(value *int32) { m.count = value } -// ArtifactSearchResultsable type ArtifactSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/artifact_sort_by.go b/go-sdk/pkg/registryclient-v3/models/artifact_sort_by.go index 8096a92771..8c3058d819 100644 --- a/go-sdk/pkg/registryclient-v3/models/artifact_sort_by.go +++ b/go-sdk/pkg/registryclient-v3/models/artifact_sort_by.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type ArtifactSortBy int const ( @@ -31,7 +27,7 @@ func ParseArtifactSortBy(v string) (any, error) { case "name": result = NAME_ARTIFACTSORTBY default: - return 0, errors.New("Unknown ArtifactSortBy value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/artifact_type_info.go b/go-sdk/pkg/registryclient-v3/models/artifact_type_info.go index 32d78f5d4f..7da85c7e50 100644 --- a/go-sdk/pkg/registryclient-v3/models/artifact_type_info.go +++ b/go-sdk/pkg/registryclient-v3/models/artifact_type_info.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ArtifactTypeInfo type ArtifactTypeInfo struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewArtifactTypeInfo() *ArtifactTypeInfo { } // CreateArtifactTypeInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateArtifactTypeInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewArtifactTypeInfo(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ArtifactTypeInfo) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ArtifactTypeInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["name"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *ArtifactTypeInfo) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ArtifactTypeInfo) GetName() *string { return m.name } @@ -77,7 +80,6 @@ func (m *ArtifactTypeInfo) SetName(value *string) { m.name = value } -// ArtifactTypeInfoable type ArtifactTypeInfoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/branch_meta_data.go b/go-sdk/pkg/registryclient-v3/models/branch_meta_data.go index 9326737922..a5f5477e71 100644 --- a/go-sdk/pkg/registryclient-v3/models/branch_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/branch_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// BranchMetaData type BranchMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -37,36 +36,43 @@ func NewBranchMetaData() *BranchMetaData { } // CreateBranchMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateBranchMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewBranchMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *BranchMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *BranchMetaData) GetArtifactId() *string { return m.artifactId } // GetBranchId gets the branchId property value. The ID of a single artifact branch. +// returns a *string when successful func (m *BranchMetaData) GetBranchId() *string { return m.branchId } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *BranchMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *BranchMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *BranchMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -163,26 +169,31 @@ func (m *BranchMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89 } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *BranchMetaData) GetGroupId() *string { return m.groupId } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *BranchMetaData) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *BranchMetaData) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *BranchMetaData) GetOwner() *string { return m.owner } // GetSystemDefined gets the systemDefined property value. The systemDefined property +// returns a *bool when successful func (m *BranchMetaData) GetSystemDefined() *bool { return m.systemDefined } @@ -302,7 +313,6 @@ func (m *BranchMetaData) SetSystemDefined(value *bool) { m.systemDefined = value } -// BranchMetaDataable type BranchMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/branch_search_results.go b/go-sdk/pkg/registryclient-v3/models/branch_search_results.go index 494513d994..6d8a0528aa 100644 --- a/go-sdk/pkg/registryclient-v3/models/branch_search_results.go +++ b/go-sdk/pkg/registryclient-v3/models/branch_search_results.go @@ -22,26 +22,31 @@ func NewBranchSearchResults() *BranchSearchResults { } // CreateBranchSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateBranchSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewBranchSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *BranchSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetBranches gets the branches property value. The branches returned in the result set. +// returns a []SearchedBranchable when successful func (m *BranchSearchResults) GetBranches() []SearchedBranchable { return m.branches } // GetCount gets the count property value. The total number of branches that matched the query that produced the result set (may be more than the number of branches in the result set). +// returns a *int32 when successful func (m *BranchSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *BranchSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["branches"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -117,7 +122,6 @@ func (m *BranchSearchResults) SetCount(value *int32) { m.count = value } -// BranchSearchResultsable type BranchSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/comment.go b/go-sdk/pkg/registryclient-v3/models/comment.go index c9802ba261..25305bfff8 100644 --- a/go-sdk/pkg/registryclient-v3/models/comment.go +++ b/go-sdk/pkg/registryclient-v3/models/comment.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// Comment type Comment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -27,26 +26,31 @@ func NewComment() *Comment { } // CreateCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewComment(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Comment) GetAdditionalData() map[string]any { return m.additionalData } // GetCommentId gets the commentId property value. The commentId property +// returns a *string when successful func (m *Comment) GetCommentId() *string { return m.commentId } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *Comment) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Comment) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["commentId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -93,11 +97,13 @@ func (m *Comment) GetFieldDeserializers() map[string]func(i878a80d2330e89d268963 } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *Comment) GetOwner() *string { return m.owner } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *Comment) GetValue() *string { return m.value } @@ -162,7 +168,6 @@ func (m *Comment) SetValue(value *string) { m.value = value } -// Commentable type Commentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/configuration_property.go b/go-sdk/pkg/registryclient-v3/models/configuration_property.go index 1654aa3166..28c240748a 100644 --- a/go-sdk/pkg/registryclient-v3/models/configuration_property.go +++ b/go-sdk/pkg/registryclient-v3/models/configuration_property.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ConfigurationProperty type ConfigurationProperty struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -28,21 +27,25 @@ func NewConfigurationProperty() *ConfigurationProperty { } // CreateConfigurationPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateConfigurationPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewConfigurationProperty(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ConfigurationProperty) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *ConfigurationProperty) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ConfigurationProperty) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -99,21 +102,25 @@ func (m *ConfigurationProperty) GetFieldDeserializers() map[string]func(i878a80d } // GetLabel gets the label property value. The label property +// returns a *string when successful func (m *ConfigurationProperty) GetLabel() *string { return m.label } // GetName gets the name property value. The name property +// returns a *string when successful func (m *ConfigurationProperty) GetName() *string { return m.name } // GetTypeEscaped gets the type property value. The type property +// returns a *string when successful func (m *ConfigurationProperty) GetTypeEscaped() *string { return m.typeEscaped } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *ConfigurationProperty) GetValue() *string { return m.value } @@ -189,7 +196,6 @@ func (m *ConfigurationProperty) SetValue(value *string) { m.value = value } -// ConfigurationPropertyable type ConfigurationPropertyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/create_artifact.go b/go-sdk/pkg/registryclient-v3/models/create_artifact.go index 1e9c41f80d..b44acd21cd 100644 --- a/go-sdk/pkg/registryclient-v3/models/create_artifact.go +++ b/go-sdk/pkg/registryclient-v3/models/create_artifact.go @@ -30,31 +30,37 @@ func NewCreateArtifact() *CreateArtifact { } // CreateCreateArtifactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateArtifactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateArtifact(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateArtifact) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *CreateArtifact) GetArtifactId() *string { return m.artifactId } // GetArtifactType gets the artifactType property value. The artifactType property +// returns a *string when successful func (m *CreateArtifact) GetArtifactType() *string { return m.artifactType } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *CreateArtifact) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateArtifact) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -121,16 +127,19 @@ func (m *CreateArtifact) GetFieldDeserializers() map[string]func(i878a80d2330e89 } // GetFirstVersion gets the firstVersion property value. The firstVersion property +// returns a CreateVersionable when successful func (m *CreateArtifact) GetFirstVersion() CreateVersionable { return m.firstVersion } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *CreateArtifact) GetLabels() Labelsable { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *CreateArtifact) GetName() *string { return m.name } @@ -217,7 +226,6 @@ func (m *CreateArtifact) SetName(value *string) { m.name = value } -// CreateArtifactable type CreateArtifactable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/create_artifact_response.go b/go-sdk/pkg/registryclient-v3/models/create_artifact_response.go index 350774cb86..e35732c99e 100644 --- a/go-sdk/pkg/registryclient-v3/models/create_artifact_response.go +++ b/go-sdk/pkg/registryclient-v3/models/create_artifact_response.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CreateArtifactResponse type CreateArtifactResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,21 +21,25 @@ func NewCreateArtifactResponse() *CreateArtifactResponse { } // CreateCreateArtifactResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateArtifactResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateArtifactResponse(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateArtifactResponse) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifact gets the artifact property value. The artifact property +// returns a ArtifactMetaDataable when successful func (m *CreateArtifactResponse) GetArtifact() ArtifactMetaDataable { return m.artifact } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateArtifactResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifact"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +66,7 @@ func (m *CreateArtifactResponse) GetFieldDeserializers() map[string]func(i878a80 } // GetVersion gets the version property value. The version property +// returns a VersionMetaDataable when successful func (m *CreateArtifactResponse) GetVersion() VersionMetaDataable { return m.version } @@ -105,7 +109,6 @@ func (m *CreateArtifactResponse) SetVersion(value VersionMetaDataable) { m.version = value } -// CreateArtifactResponseable type CreateArtifactResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/create_branch.go b/go-sdk/pkg/registryclient-v3/models/create_branch.go index 9f974884fb..ca34e3a1c2 100644 --- a/go-sdk/pkg/registryclient-v3/models/create_branch.go +++ b/go-sdk/pkg/registryclient-v3/models/create_branch.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CreateBranch type CreateBranch struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -24,26 +23,31 @@ func NewCreateBranch() *CreateBranch { } // CreateCreateBranchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateBranchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateBranch(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateBranch) GetAdditionalData() map[string]any { return m.additionalData } // GetBranchId gets the branchId property value. The ID of a single artifact branch. +// returns a *string when successful func (m *CreateBranch) GetBranchId() *string { return m.branchId } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *CreateBranch) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateBranch) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["branchId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -86,6 +90,7 @@ func (m *CreateBranch) GetFieldDeserializers() map[string]func(i878a80d2330e89d2 } // GetVersions gets the versions property value. The versions property +// returns a []string when successful func (m *CreateBranch) GetVersions() []string { return m.versions } @@ -139,7 +144,6 @@ func (m *CreateBranch) SetVersions(value []string) { m.versions = value } -// CreateBranchable type CreateBranchable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/create_group.go b/go-sdk/pkg/registryclient-v3/models/create_group.go index a12b4df4c4..0aec7a1484 100644 --- a/go-sdk/pkg/registryclient-v3/models/create_group.go +++ b/go-sdk/pkg/registryclient-v3/models/create_group.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CreateGroup type CreateGroup struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -24,21 +23,25 @@ func NewCreateGroup() *CreateGroup { } // CreateCreateGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateGroup(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateGroup) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *CreateGroup) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateGroup) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -75,11 +78,13 @@ func (m *CreateGroup) GetFieldDeserializers() map[string]func(i878a80d2330e89d26 } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *CreateGroup) GetGroupId() *string { return m.groupId } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *CreateGroup) GetLabels() Labelsable { return m.labels } @@ -133,7 +138,6 @@ func (m *CreateGroup) SetLabels(value Labelsable) { m.labels = value } -// CreateGroupable type CreateGroupable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/create_rule.go b/go-sdk/pkg/registryclient-v3/models/create_rule.go index d1f53207cb..8f6f33ab56 100644 --- a/go-sdk/pkg/registryclient-v3/models/create_rule.go +++ b/go-sdk/pkg/registryclient-v3/models/create_rule.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CreateRule type CreateRule struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,21 +21,25 @@ func NewCreateRule() *CreateRule { } // CreateCreateRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateRule(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateRule) GetAdditionalData() map[string]any { return m.additionalData } // GetConfig gets the config property value. The config property +// returns a *string when successful func (m *CreateRule) GetConfig() *string { return m.config } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateRule) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["config"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +66,7 @@ func (m *CreateRule) GetFieldDeserializers() map[string]func(i878a80d2330e89d268 } // GetRuleType gets the ruleType property value. The ruleType property +// returns a *RuleType when successful func (m *CreateRule) GetRuleType() *RuleType { return m.ruleType } @@ -106,7 +110,6 @@ func (m *CreateRule) SetRuleType(value *RuleType) { m.ruleType = value } -// CreateRuleable type CreateRuleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/create_version.go b/go-sdk/pkg/registryclient-v3/models/create_version.go index 333788bc9c..a49e1f6945 100644 --- a/go-sdk/pkg/registryclient-v3/models/create_version.go +++ b/go-sdk/pkg/registryclient-v3/models/create_version.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CreateVersion type CreateVersion struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -30,31 +29,37 @@ func NewCreateVersion() *CreateVersion { } // CreateCreateVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateCreateVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCreateVersion(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *CreateVersion) GetAdditionalData() map[string]any { return m.additionalData } // GetBranches gets the branches property value. The branches property +// returns a []string when successful func (m *CreateVersion) GetBranches() []string { return m.branches } // GetContent gets the content property value. The content property +// returns a VersionContentable when successful func (m *CreateVersion) GetContent() VersionContentable { return m.content } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *CreateVersion) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CreateVersion) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["branches"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -127,16 +132,19 @@ func (m *CreateVersion) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *CreateVersion) GetLabels() Labelsable { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *CreateVersion) GetName() *string { return m.name } // GetVersion gets the version property value. A single version of an artifact. Can be provided by the client when creating a new version,or it can be server-generated. The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value. +// returns a *string when successful func (m *CreateVersion) GetVersion() *string { return m.version } @@ -223,7 +231,6 @@ func (m *CreateVersion) SetVersion(value *string) { m.version = value } -// CreateVersionable type CreateVersionable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/d_t_o_new_comment.go b/go-sdk/pkg/registryclient-v3/models/d_t_o_new_comment.go index 8c9839fb75..a4c450e773 100644 --- a/go-sdk/pkg/registryclient-v3/models/d_t_o_new_comment.go +++ b/go-sdk/pkg/registryclient-v3/models/d_t_o_new_comment.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// DTONewComment type DTONewComment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewDTONewComment() *DTONewComment { } // CreateDTONewCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateDTONewCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDTONewComment(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *DTONewComment) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DTONewComment) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *DTONewComment) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *DTONewComment) GetValue() *string { return m.value } @@ -77,7 +80,6 @@ func (m *DTONewComment) SetValue(value *string) { m.value = value } -// DTONewCommentable type DTONewCommentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/download_ref.go b/go-sdk/pkg/registryclient-v3/models/download_ref.go index 1bb57142fb..90d3986338 100644 --- a/go-sdk/pkg/registryclient-v3/models/download_ref.go +++ b/go-sdk/pkg/registryclient-v3/models/download_ref.go @@ -22,21 +22,25 @@ func NewDownloadRef() *DownloadRef { } // CreateDownloadRefFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateDownloadRefFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDownloadRef(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *DownloadRef) GetAdditionalData() map[string]any { return m.additionalData } // GetDownloadId gets the downloadId property value. The downloadId property +// returns a *string when successful func (m *DownloadRef) GetDownloadId() *string { return m.downloadId } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DownloadRef) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["downloadId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +67,7 @@ func (m *DownloadRef) GetFieldDeserializers() map[string]func(i878a80d2330e89d26 } // GetHref gets the href property value. The href property +// returns a *string when successful func (m *DownloadRef) GetHref() *string { return m.href } @@ -105,7 +110,6 @@ func (m *DownloadRef) SetHref(value *string) { m.href = value } -// DownloadRefable type DownloadRefable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/editable_artifact_meta_data.go b/go-sdk/pkg/registryclient-v3/models/editable_artifact_meta_data.go index be19bd7372..1f02c3c276 100644 --- a/go-sdk/pkg/registryclient-v3/models/editable_artifact_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/editable_artifact_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// EditableArtifactMetaData type EditableArtifactMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -26,21 +25,25 @@ func NewEditableArtifactMetaData() *EditableArtifactMetaData { } // CreateEditableArtifactMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateEditableArtifactMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEditableArtifactMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *EditableArtifactMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *EditableArtifactMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EditableArtifactMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -87,16 +90,19 @@ func (m *EditableArtifactMetaData) GetFieldDeserializers() map[string]func(i878a } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *EditableArtifactMetaData) GetLabels() Labelsable { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *EditableArtifactMetaData) GetName() *string { return m.name } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *EditableArtifactMetaData) GetOwner() *string { return m.owner } @@ -161,7 +167,6 @@ func (m *EditableArtifactMetaData) SetOwner(value *string) { m.owner = value } -// EditableArtifactMetaDataable type EditableArtifactMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/editable_branch_meta_data.go b/go-sdk/pkg/registryclient-v3/models/editable_branch_meta_data.go index eb4fe2c8db..60b35ca97b 100644 --- a/go-sdk/pkg/registryclient-v3/models/editable_branch_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/editable_branch_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// EditableBranchMetaData type EditableBranchMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,21 +19,25 @@ func NewEditableBranchMetaData() *EditableBranchMetaData { } // CreateEditableBranchMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateEditableBranchMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEditableBranchMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *EditableBranchMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *EditableBranchMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EditableBranchMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -77,7 +80,6 @@ func (m *EditableBranchMetaData) SetDescription(value *string) { m.description = value } -// EditableBranchMetaDataable type EditableBranchMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/editable_group_meta_data.go b/go-sdk/pkg/registryclient-v3/models/editable_group_meta_data.go index 0f49e90a5a..fb0e2d28bf 100644 --- a/go-sdk/pkg/registryclient-v3/models/editable_group_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/editable_group_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// EditableGroupMetaData type EditableGroupMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,21 +21,25 @@ func NewEditableGroupMetaData() *EditableGroupMetaData { } // CreateEditableGroupMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateEditableGroupMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEditableGroupMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *EditableGroupMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *EditableGroupMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EditableGroupMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +66,7 @@ func (m *EditableGroupMetaData) GetFieldDeserializers() map[string]func(i878a80d } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *EditableGroupMetaData) GetLabels() Labelsable { return m.labels } @@ -105,7 +109,6 @@ func (m *EditableGroupMetaData) SetLabels(value Labelsable) { m.labels = value } -// EditableGroupMetaDataable type EditableGroupMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/editable_version_meta_data.go b/go-sdk/pkg/registryclient-v3/models/editable_version_meta_data.go index e5ab0f53f3..ffdab100bb 100644 --- a/go-sdk/pkg/registryclient-v3/models/editable_version_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/editable_version_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// EditableVersionMetaData type EditableVersionMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -26,21 +25,25 @@ func NewEditableVersionMetaData() *EditableVersionMetaData { } // CreateEditableVersionMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateEditableVersionMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEditableVersionMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *EditableVersionMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *EditableVersionMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EditableVersionMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -87,16 +90,19 @@ func (m *EditableVersionMetaData) GetFieldDeserializers() map[string]func(i878a8 } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *EditableVersionMetaData) GetLabels() Labelsable { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *EditableVersionMetaData) GetName() *string { return m.name } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *VersionState when successful func (m *EditableVersionMetaData) GetState() *VersionState { return m.state } @@ -162,7 +168,6 @@ func (m *EditableVersionMetaData) SetState(value *VersionState) { m.state = value } -// EditableVersionMetaDataable type EditableVersionMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/group_meta_data.go b/go-sdk/pkg/registryclient-v3/models/group_meta_data.go index 93f00055de..02660f364a 100644 --- a/go-sdk/pkg/registryclient-v3/models/group_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/group_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// GroupMetaData type GroupMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -33,26 +32,31 @@ func NewGroupMetaData() *GroupMetaData { } // CreateGroupMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateGroupMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewGroupMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *GroupMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *GroupMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *GroupMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *GroupMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["createdOn"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -129,26 +133,31 @@ func (m *GroupMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *GroupMetaData) GetGroupId() *string { return m.groupId } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *GroupMetaData) GetLabels() Labelsable { return m.labels } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *GroupMetaData) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *GroupMetaData) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *GroupMetaData) GetOwner() *string { return m.owner } @@ -246,7 +255,6 @@ func (m *GroupMetaData) SetOwner(value *string) { m.owner = value } -// GroupMetaDataable type GroupMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/group_search_results.go b/go-sdk/pkg/registryclient-v3/models/group_search_results.go index 9c70490dbc..ef28fb9b20 100644 --- a/go-sdk/pkg/registryclient-v3/models/group_search_results.go +++ b/go-sdk/pkg/registryclient-v3/models/group_search_results.go @@ -22,21 +22,25 @@ func NewGroupSearchResults() *GroupSearchResults { } // CreateGroupSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateGroupSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewGroupSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *GroupSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetCount gets the count property value. The total number of groups that matched the query that produced the result set (may be more than the number of groups in the result set). +// returns a *int32 when successful func (m *GroupSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *GroupSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["count"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -69,6 +73,7 @@ func (m *GroupSearchResults) GetFieldDeserializers() map[string]func(i878a80d233 } // GetGroups gets the groups property value. The groups returned in the result set. +// returns a []SearchedGroupable when successful func (m *GroupSearchResults) GetGroups() []SearchedGroupable { return m.groups } @@ -117,7 +122,6 @@ func (m *GroupSearchResults) SetGroups(value []SearchedGroupable) { m.groups = value } -// GroupSearchResultsable type GroupSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/group_sort_by.go b/go-sdk/pkg/registryclient-v3/models/group_sort_by.go index 9040ff1dde..cd9e176e53 100644 --- a/go-sdk/pkg/registryclient-v3/models/group_sort_by.go +++ b/go-sdk/pkg/registryclient-v3/models/group_sort_by.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type GroupSortBy int const ( @@ -22,7 +18,7 @@ func ParseGroupSortBy(v string) (any, error) { case "createdOn": result = CREATEDON_GROUPSORTBY default: - return 0, errors.New("Unknown GroupSortBy value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/handle_references_type.go b/go-sdk/pkg/registryclient-v3/models/handle_references_type.go index 8997f57901..327c20d1fa 100644 --- a/go-sdk/pkg/registryclient-v3/models/handle_references_type.go +++ b/go-sdk/pkg/registryclient-v3/models/handle_references_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - // How to handle references when retrieving content. References can either beleft unchanged (`PRESERVE`), re-written so they are valid in the context of theregistry (`REWRITE`), or fully dereferenced such that all externally referencedcontent is internalized (`DEREFERENCE`). type HandleReferencesType int @@ -26,7 +22,7 @@ func ParseHandleReferencesType(v string) (any, error) { case "REWRITE": result = REWRITE_HANDLEREFERENCESTYPE default: - return 0, errors.New("Unknown HandleReferencesType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/if_artifact_exists.go b/go-sdk/pkg/registryclient-v3/models/if_artifact_exists.go index c4b58efc49..15386434eb 100644 --- a/go-sdk/pkg/registryclient-v3/models/if_artifact_exists.go +++ b/go-sdk/pkg/registryclient-v3/models/if_artifact_exists.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type IfArtifactExists int const ( @@ -25,7 +21,7 @@ func ParseIfArtifactExists(v string) (any, error) { case "FIND_OR_CREATE_VERSION": result = FIND_OR_CREATE_VERSION_IFARTIFACTEXISTS default: - return 0, errors.New("Unknown IfArtifactExists value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/labels.go b/go-sdk/pkg/registryclient-v3/models/labels.go index 857413e41f..eb5245ce9e 100644 --- a/go-sdk/pkg/registryclient-v3/models/labels.go +++ b/go-sdk/pkg/registryclient-v3/models/labels.go @@ -18,16 +18,19 @@ func NewLabels() *Labels { } // CreateLabelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateLabelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewLabels(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Labels) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Labels) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) return res @@ -49,7 +52,6 @@ func (m *Labels) SetAdditionalData(value map[string]any) { m.additionalData = value } -// Labelsable type Labelsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/limits.go b/go-sdk/pkg/registryclient-v3/models/limits.go index 8a0c0ff849..fc0d12e206 100644 --- a/go-sdk/pkg/registryclient-v3/models/limits.go +++ b/go-sdk/pkg/registryclient-v3/models/limits.go @@ -42,16 +42,19 @@ func NewLimits() *Limits { } // CreateLimitsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateLimitsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewLimits(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Limits) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Limits) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["maxArtifactDescriptionLengthChars"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -178,61 +181,73 @@ func (m *Limits) GetFieldDeserializers() map[string]func(i878a80d2330e89d2689638 } // GetMaxArtifactDescriptionLengthChars gets the maxArtifactDescriptionLengthChars property value. The maxArtifactDescriptionLengthChars property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactDescriptionLengthChars() *int64 { return m.maxArtifactDescriptionLengthChars } // GetMaxArtifactLabelsCount gets the maxArtifactLabelsCount property value. The maxArtifactLabelsCount property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactLabelsCount() *int64 { return m.maxArtifactLabelsCount } // GetMaxArtifactNameLengthChars gets the maxArtifactNameLengthChars property value. The maxArtifactNameLengthChars property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactNameLengthChars() *int64 { return m.maxArtifactNameLengthChars } // GetMaxArtifactPropertiesCount gets the maxArtifactPropertiesCount property value. The maxArtifactPropertiesCount property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactPropertiesCount() *int64 { return m.maxArtifactPropertiesCount } // GetMaxArtifactsCount gets the maxArtifactsCount property value. The maxArtifactsCount property +// returns a *int64 when successful func (m *Limits) GetMaxArtifactsCount() *int64 { return m.maxArtifactsCount } // GetMaxLabelSizeBytes gets the maxLabelSizeBytes property value. The maxLabelSizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxLabelSizeBytes() *int64 { return m.maxLabelSizeBytes } // GetMaxPropertyKeySizeBytes gets the maxPropertyKeySizeBytes property value. The maxPropertyKeySizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxPropertyKeySizeBytes() *int64 { return m.maxPropertyKeySizeBytes } // GetMaxPropertyValueSizeBytes gets the maxPropertyValueSizeBytes property value. The maxPropertyValueSizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxPropertyValueSizeBytes() *int64 { return m.maxPropertyValueSizeBytes } // GetMaxRequestsPerSecondCount gets the maxRequestsPerSecondCount property value. The maxRequestsPerSecondCount property +// returns a *int64 when successful func (m *Limits) GetMaxRequestsPerSecondCount() *int64 { return m.maxRequestsPerSecondCount } // GetMaxSchemaSizeBytes gets the maxSchemaSizeBytes property value. The maxSchemaSizeBytes property +// returns a *int64 when successful func (m *Limits) GetMaxSchemaSizeBytes() *int64 { return m.maxSchemaSizeBytes } // GetMaxTotalSchemasCount gets the maxTotalSchemasCount property value. The maxTotalSchemasCount property +// returns a *int64 when successful func (m *Limits) GetMaxTotalSchemasCount() *int64 { return m.maxTotalSchemasCount } // GetMaxVersionsPerArtifactCount gets the maxVersionsPerArtifactCount property value. The maxVersionsPerArtifactCount property +// returns a *int64 when successful func (m *Limits) GetMaxVersionsPerArtifactCount() *int64 { return m.maxVersionsPerArtifactCount } @@ -385,7 +400,6 @@ func (m *Limits) SetMaxVersionsPerArtifactCount(value *int64) { m.maxVersionsPerArtifactCount = value } -// Limitsable type Limitsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/problem_details.go b/go-sdk/pkg/registryclient-v3/models/problem_details.go index 354e3b2771..083205e196 100644 --- a/go-sdk/pkg/registryclient-v3/models/problem_details.go +++ b/go-sdk/pkg/registryclient-v3/models/problem_details.go @@ -34,26 +34,31 @@ func NewProblemDetails() *ProblemDetails { } // CreateProblemDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateProblemDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewProblemDetails(), nil } // Error the primary error message. +// returns a string when successful func (m *ProblemDetails) Error() string { return m.ApiError.Error() } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ProblemDetails) GetAdditionalData() map[string]any { return m.additionalData } // GetDetail gets the detail property value. A human-readable explanation specific to this occurrence of the problem. +// returns a *string when successful func (m *ProblemDetails) GetDetail() *string { return m.detail } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ProblemDetails) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["detail"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -120,26 +125,31 @@ func (m *ProblemDetails) GetFieldDeserializers() map[string]func(i878a80d2330e89 } // GetInstance gets the instance property value. A URI reference that identifies the specific occurrence of the problem. +// returns a *string when successful func (m *ProblemDetails) GetInstance() *string { return m.instance } // GetName gets the name property value. The name of the error (typically a server exception class name). +// returns a *string when successful func (m *ProblemDetails) GetName() *string { return m.name } // GetStatus gets the status property value. The HTTP status code. +// returns a *int32 when successful func (m *ProblemDetails) GetStatus() *int32 { return m.status } // GetTitle gets the title property value. A short, human-readable summary of the problem type. +// returns a *string when successful func (m *ProblemDetails) GetTitle() *string { return m.title } // GetTypeEscaped gets the type property value. A URI reference [RFC3986] that identifies the problem type. +// returns a *string when successful func (m *ProblemDetails) GetTypeEscaped() *string { return m.typeEscaped } @@ -226,7 +236,6 @@ func (m *ProblemDetails) SetTypeEscaped(value *string) { m.typeEscaped = value } -// ProblemDetailsable type ProblemDetailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/reference_type.go b/go-sdk/pkg/registryclient-v3/models/reference_type.go index 2497ba119a..cd06d1ce4c 100644 --- a/go-sdk/pkg/registryclient-v3/models/reference_type.go +++ b/go-sdk/pkg/registryclient-v3/models/reference_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type ReferenceType int const ( @@ -22,7 +18,7 @@ func ParseReferenceType(v string) (any, error) { case "INBOUND": result = INBOUND_REFERENCETYPE default: - return 0, errors.New("Unknown ReferenceType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/replace_branch_versions.go b/go-sdk/pkg/registryclient-v3/models/replace_branch_versions.go index 7d2e2dbfc0..91fe18b457 100644 --- a/go-sdk/pkg/registryclient-v3/models/replace_branch_versions.go +++ b/go-sdk/pkg/registryclient-v3/models/replace_branch_versions.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ReplaceBranchVersions type ReplaceBranchVersions struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewReplaceBranchVersions() *ReplaceBranchVersions { } // CreateReplaceBranchVersionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateReplaceBranchVersionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewReplaceBranchVersions(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *ReplaceBranchVersions) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ReplaceBranchVersions) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["versions"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -52,6 +54,7 @@ func (m *ReplaceBranchVersions) GetFieldDeserializers() map[string]func(i878a80d } // GetVersions gets the versions property value. The versions property +// returns a []string when successful func (m *ReplaceBranchVersions) GetVersions() []string { return m.versions } @@ -83,7 +86,6 @@ func (m *ReplaceBranchVersions) SetVersions(value []string) { m.versions = value } -// ReplaceBranchVersionsable type ReplaceBranchVersionsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/role_mapping.go b/go-sdk/pkg/registryclient-v3/models/role_mapping.go index 6af45e1fd8..470d75278e 100644 --- a/go-sdk/pkg/registryclient-v3/models/role_mapping.go +++ b/go-sdk/pkg/registryclient-v3/models/role_mapping.go @@ -24,16 +24,19 @@ func NewRoleMapping() *RoleMapping { } // CreateRoleMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRoleMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRoleMapping(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *RoleMapping) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RoleMapping) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["principalId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -70,16 +73,19 @@ func (m *RoleMapping) GetFieldDeserializers() map[string]func(i878a80d2330e89d26 } // GetPrincipalId gets the principalId property value. The principalId property +// returns a *string when successful func (m *RoleMapping) GetPrincipalId() *string { return m.principalId } // GetPrincipalName gets the principalName property value. A friendly name for the principal. +// returns a *string when successful func (m *RoleMapping) GetPrincipalName() *string { return m.principalName } // GetRole gets the role property value. The role property +// returns a *RoleType when successful func (m *RoleMapping) GetRole() *RoleType { return m.role } @@ -134,7 +140,6 @@ func (m *RoleMapping) SetRole(value *RoleType) { m.role = value } -// RoleMappingable type RoleMappingable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/role_mapping_search_results.go b/go-sdk/pkg/registryclient-v3/models/role_mapping_search_results.go index 6197cf2cb5..32d8330d84 100644 --- a/go-sdk/pkg/registryclient-v3/models/role_mapping_search_results.go +++ b/go-sdk/pkg/registryclient-v3/models/role_mapping_search_results.go @@ -22,21 +22,25 @@ func NewRoleMappingSearchResults() *RoleMappingSearchResults { } // CreateRoleMappingSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRoleMappingSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRoleMappingSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *RoleMappingSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetCount gets the count property value. The total number of role mappings that matched the query that produced the result set (may be more than the number of role mappings in the result set). +// returns a *int32 when successful func (m *RoleMappingSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RoleMappingSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["count"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -69,6 +73,7 @@ func (m *RoleMappingSearchResults) GetFieldDeserializers() map[string]func(i878a } // GetRoleMappings gets the roleMappings property value. The role mappings returned in the result set. +// returns a []RoleMappingable when successful func (m *RoleMappingSearchResults) GetRoleMappings() []RoleMappingable { return m.roleMappings } @@ -117,7 +122,6 @@ func (m *RoleMappingSearchResults) SetRoleMappings(value []RoleMappingable) { m.roleMappings = value } -// RoleMappingSearchResultsable type RoleMappingSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/role_type.go b/go-sdk/pkg/registryclient-v3/models/role_type.go index 47616edc63..cc1e715b61 100644 --- a/go-sdk/pkg/registryclient-v3/models/role_type.go +++ b/go-sdk/pkg/registryclient-v3/models/role_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type RoleType int const ( @@ -25,7 +21,7 @@ func ParseRoleType(v string) (any, error) { case "ADMIN": result = ADMIN_ROLETYPE default: - return 0, errors.New("Unknown RoleType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/rule.go b/go-sdk/pkg/registryclient-v3/models/rule.go index 24ab7bc68d..c0fdf55803 100644 --- a/go-sdk/pkg/registryclient-v3/models/rule.go +++ b/go-sdk/pkg/registryclient-v3/models/rule.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// Rule type Rule struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,21 +21,25 @@ func NewRule() *Rule { } // CreateRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRule(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *Rule) GetAdditionalData() map[string]any { return m.additionalData } // GetConfig gets the config property value. The config property +// returns a *string when successful func (m *Rule) GetConfig() *string { return m.config } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Rule) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["config"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -63,6 +66,7 @@ func (m *Rule) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a } // GetRuleType gets the ruleType property value. The ruleType property +// returns a *RuleType when successful func (m *Rule) GetRuleType() *RuleType { return m.ruleType } @@ -106,7 +110,6 @@ func (m *Rule) SetRuleType(value *RuleType) { m.ruleType = value } -// Ruleable type Ruleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/rule_type.go b/go-sdk/pkg/registryclient-v3/models/rule_type.go index 4550ed541f..dbec88af77 100644 --- a/go-sdk/pkg/registryclient-v3/models/rule_type.go +++ b/go-sdk/pkg/registryclient-v3/models/rule_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type RuleType int const ( @@ -25,7 +21,7 @@ func ParseRuleType(v string) (any, error) { case "INTEGRITY": result = INTEGRITY_RULETYPE default: - return 0, errors.New("Unknown RuleType value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/rule_violation_cause.go b/go-sdk/pkg/registryclient-v3/models/rule_violation_cause.go index 688b049fc2..9fb54d4007 100644 --- a/go-sdk/pkg/registryclient-v3/models/rule_violation_cause.go +++ b/go-sdk/pkg/registryclient-v3/models/rule_violation_cause.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// RuleViolationCause type RuleViolationCause struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -22,26 +21,31 @@ func NewRuleViolationCause() *RuleViolationCause { } // CreateRuleViolationCauseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRuleViolationCauseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRuleViolationCause(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *RuleViolationCause) GetAdditionalData() map[string]any { return m.additionalData } // GetContext gets the context property value. The context property +// returns a *string when successful func (m *RuleViolationCause) GetContext() *string { return m.context } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *RuleViolationCause) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RuleViolationCause) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["context"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -105,7 +109,6 @@ func (m *RuleViolationCause) SetDescription(value *string) { m.description = value } -// RuleViolationCauseable type RuleViolationCauseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/rule_violation_problem_details.go b/go-sdk/pkg/registryclient-v3/models/rule_violation_problem_details.go index 12ce310f4a..14593a110a 100644 --- a/go-sdk/pkg/registryclient-v3/models/rule_violation_problem_details.go +++ b/go-sdk/pkg/registryclient-v3/models/rule_violation_problem_details.go @@ -1,37 +1,74 @@ package models import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) // RuleViolationProblemDetails all error responses, whether `4xx` or `5xx` will include one of these as the responsebody. type RuleViolationProblemDetails struct { - ProblemDetails + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any // List of rule violation causes. causes []RuleViolationCauseable + // A human-readable explanation specific to this occurrence of the problem. + detail *string + // A URI reference that identifies the specific occurrence of the problem. + instance *string + // The name of the error (typically a server exception class name). + name *string + // The HTTP status code. + status *int32 + // A short, human-readable summary of the problem type. + title *string + // A URI reference [RFC3986] that identifies the problem type. + typeEscaped *string } // NewRuleViolationProblemDetails instantiates a new RuleViolationProblemDetails and sets the default values. func NewRuleViolationProblemDetails() *RuleViolationProblemDetails { m := &RuleViolationProblemDetails{ - ProblemDetails: *NewProblemDetails(), + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), } + m.SetAdditionalData(make(map[string]any)) return m } // CreateRuleViolationProblemDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateRuleViolationProblemDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRuleViolationProblemDetails(), nil } +// Error the primary error message. +// returns a string when successful +func (m *RuleViolationProblemDetails) Error() string { + return m.ApiError.Error() +} + +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RuleViolationProblemDetails) GetAdditionalData() map[string]any { + return m.additionalData +} + // GetCauses gets the causes property value. List of rule violation causes. +// returns a []RuleViolationCauseable when successful func (m *RuleViolationProblemDetails) GetCauses() []RuleViolationCauseable { return m.causes } +// GetDetail gets the detail property value. A human-readable explanation specific to this occurrence of the problem. +// returns a *string when successful +func (m *RuleViolationProblemDetails) GetDetail() *string { + return m.detail +} + // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RuleViolationProblemDetails) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - res := m.ProblemDetails.GetFieldDeserializers() + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["causes"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateRuleViolationCauseFromDiscriminatorValue) if err != nil { @@ -48,15 +85,101 @@ func (m *RuleViolationProblemDetails) GetFieldDeserializers() map[string]func(i8 } return nil } + res["detail"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(val) + } + return nil + } + res["instance"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstance(val) + } + return nil + } + res["name"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["status"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["title"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } return res } +// GetInstance gets the instance property value. A URI reference that identifies the specific occurrence of the problem. +// returns a *string when successful +func (m *RuleViolationProblemDetails) GetInstance() *string { + return m.instance +} + +// GetName gets the name property value. The name of the error (typically a server exception class name). +// returns a *string when successful +func (m *RuleViolationProblemDetails) GetName() *string { + return m.name +} + +// GetStatus gets the status property value. The HTTP status code. +// returns a *int32 when successful +func (m *RuleViolationProblemDetails) GetStatus() *int32 { + return m.status +} + +// GetTitle gets the title property value. A short, human-readable summary of the problem type. +// returns a *string when successful +func (m *RuleViolationProblemDetails) GetTitle() *string { + return m.title +} + +// GetTypeEscaped gets the type property value. A URI reference [RFC3986] that identifies the problem type. +// returns a *string when successful +func (m *RuleViolationProblemDetails) GetTypeEscaped() *string { + return m.typeEscaped +} + // Serialize serializes information the current object func (m *RuleViolationProblemDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { - err := m.ProblemDetails.Serialize(writer) - if err != nil { - return err - } if m.GetCauses() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCauses())) for i, v := range m.GetCauses() { @@ -64,7 +187,49 @@ func (m *RuleViolationProblemDetails) Serialize(writer i878a80d2330e89d26896388a cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) } } - err = writer.WriteCollectionOfObjectValues("causes", cast) + err := writer.WriteCollectionOfObjectValues("causes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("instance", m.GetInstance()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { return err } @@ -72,15 +237,60 @@ func (m *RuleViolationProblemDetails) Serialize(writer i878a80d2330e89d26896388a return nil } +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RuleViolationProblemDetails) SetAdditionalData(value map[string]any) { + m.additionalData = value +} + // SetCauses sets the causes property value. List of rule violation causes. func (m *RuleViolationProblemDetails) SetCauses(value []RuleViolationCauseable) { m.causes = value } -// RuleViolationProblemDetailsable +// SetDetail sets the detail property value. A human-readable explanation specific to this occurrence of the problem. +func (m *RuleViolationProblemDetails) SetDetail(value *string) { + m.detail = value +} + +// SetInstance sets the instance property value. A URI reference that identifies the specific occurrence of the problem. +func (m *RuleViolationProblemDetails) SetInstance(value *string) { + m.instance = value +} + +// SetName sets the name property value. The name of the error (typically a server exception class name). +func (m *RuleViolationProblemDetails) SetName(value *string) { + m.name = value +} + +// SetStatus sets the status property value. The HTTP status code. +func (m *RuleViolationProblemDetails) SetStatus(value *int32) { + m.status = value +} + +// SetTitle sets the title property value. A short, human-readable summary of the problem type. +func (m *RuleViolationProblemDetails) SetTitle(value *string) { + m.title = value +} + +// SetTypeEscaped sets the type property value. A URI reference [RFC3986] that identifies the problem type. +func (m *RuleViolationProblemDetails) SetTypeEscaped(value *string) { + m.typeEscaped = value +} + type RuleViolationProblemDetailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - ProblemDetailsable GetCauses() []RuleViolationCauseable + GetDetail() *string + GetInstance() *string + GetName() *string + GetStatus() *int32 + GetTitle() *string + GetTypeEscaped() *string SetCauses(value []RuleViolationCauseable) + SetDetail(value *string) + SetInstance(value *string) + SetName(value *string) + SetStatus(value *int32) + SetTitle(value *string) + SetTypeEscaped(value *string) } diff --git a/go-sdk/pkg/registryclient-v3/models/searched_artifact.go b/go-sdk/pkg/registryclient-v3/models/searched_artifact.go index c2109844ed..9f32bb61dd 100644 --- a/go-sdk/pkg/registryclient-v3/models/searched_artifact.go +++ b/go-sdk/pkg/registryclient-v3/models/searched_artifact.go @@ -37,36 +37,43 @@ func NewSearchedArtifact() *SearchedArtifact { } // CreateSearchedArtifactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedArtifactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedArtifact(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedArtifact) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *SearchedArtifact) GetArtifactId() *string { return m.artifactId } // GetArtifactType gets the artifactType property value. The artifactType property +// returns a *string when successful func (m *SearchedArtifact) GetArtifactType() *string { return m.artifactType } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedArtifact) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedArtifact) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedArtifact) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -163,26 +170,31 @@ func (m *SearchedArtifact) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *SearchedArtifact) GetGroupId() *string { return m.groupId } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *SearchedArtifact) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *SearchedArtifact) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetName gets the name property value. The name property +// returns a *string when successful func (m *SearchedArtifact) GetName() *string { return m.name } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *SearchedArtifact) GetOwner() *string { return m.owner } @@ -302,7 +314,6 @@ func (m *SearchedArtifact) SetOwner(value *string) { m.owner = value } -// SearchedArtifactable type SearchedArtifactable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/searched_branch.go b/go-sdk/pkg/registryclient-v3/models/searched_branch.go index 4e24183feb..b48386beab 100644 --- a/go-sdk/pkg/registryclient-v3/models/searched_branch.go +++ b/go-sdk/pkg/registryclient-v3/models/searched_branch.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// SearchedBranch type SearchedBranch struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -37,36 +36,43 @@ func NewSearchedBranch() *SearchedBranch { } // CreateSearchedBranchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedBranchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedBranch(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedBranch) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *SearchedBranch) GetArtifactId() *string { return m.artifactId } // GetBranchId gets the branchId property value. The ID of a single artifact branch. +// returns a *string when successful func (m *SearchedBranch) GetBranchId() *string { return m.branchId } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedBranch) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedBranch) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedBranch) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -163,26 +169,31 @@ func (m *SearchedBranch) GetFieldDeserializers() map[string]func(i878a80d2330e89 } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *SearchedBranch) GetGroupId() *string { return m.groupId } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *SearchedBranch) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *SearchedBranch) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *SearchedBranch) GetOwner() *string { return m.owner } // GetSystemDefined gets the systemDefined property value. The systemDefined property +// returns a *bool when successful func (m *SearchedBranch) GetSystemDefined() *bool { return m.systemDefined } @@ -302,7 +313,6 @@ func (m *SearchedBranch) SetSystemDefined(value *bool) { m.systemDefined = value } -// SearchedBranchable type SearchedBranchable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/searched_group.go b/go-sdk/pkg/registryclient-v3/models/searched_group.go index 3588313596..c1424294b0 100644 --- a/go-sdk/pkg/registryclient-v3/models/searched_group.go +++ b/go-sdk/pkg/registryclient-v3/models/searched_group.go @@ -31,26 +31,31 @@ func NewSearchedGroup() *SearchedGroup { } // CreateSearchedGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedGroup(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedGroup) GetAdditionalData() map[string]any { return m.additionalData } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedGroup) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedGroup) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedGroup) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["createdOn"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -117,21 +122,25 @@ func (m *SearchedGroup) GetFieldDeserializers() map[string]func(i878a80d2330e89d } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *SearchedGroup) GetGroupId() *string { return m.groupId } // GetModifiedBy gets the modifiedBy property value. The modifiedBy property +// returns a *string when successful func (m *SearchedGroup) GetModifiedBy() *string { return m.modifiedBy } // GetModifiedOn gets the modifiedOn property value. The modifiedOn property +// returns a *Time when successful func (m *SearchedGroup) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.modifiedOn } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *SearchedGroup) GetOwner() *string { return m.owner } @@ -218,7 +227,6 @@ func (m *SearchedGroup) SetOwner(value *string) { m.owner = value } -// SearchedGroupable type SearchedGroupable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/searched_version.go b/go-sdk/pkg/registryclient-v3/models/searched_version.go index b5df3d603f..6afa27c5d5 100644 --- a/go-sdk/pkg/registryclient-v3/models/searched_version.go +++ b/go-sdk/pkg/registryclient-v3/models/searched_version.go @@ -41,41 +41,49 @@ func NewSearchedVersion() *SearchedVersion { } // CreateSearchedVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSearchedVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchedVersion(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SearchedVersion) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *SearchedVersion) GetArtifactId() *string { return m.artifactId } // GetArtifactType gets the artifactType property value. The artifactType property +// returns a *string when successful func (m *SearchedVersion) GetArtifactType() *string { return m.artifactType } // GetContentId gets the contentId property value. The contentId property +// returns a *int64 when successful func (m *SearchedVersion) GetContentId() *int64 { return m.contentId } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *SearchedVersion) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SearchedVersion) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SearchedVersion) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -192,31 +200,37 @@ func (m *SearchedVersion) GetFieldDeserializers() map[string]func(i878a80d2330e8 } // GetGlobalId gets the globalId property value. The globalId property +// returns a *int64 when successful func (m *SearchedVersion) GetGlobalId() *int64 { return m.globalId } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *SearchedVersion) GetGroupId() *string { return m.groupId } // GetName gets the name property value. The name property +// returns a *string when successful func (m *SearchedVersion) GetName() *string { return m.name } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *SearchedVersion) GetOwner() *string { return m.owner } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *VersionState when successful func (m *SearchedVersion) GetState() *VersionState { return m.state } // GetVersion gets the version property value. A single version of an artifact. Can be provided by the client when creating a new version,or it can be server-generated. The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value. +// returns a *string when successful func (m *SearchedVersion) GetVersion() *string { return m.version } @@ -359,7 +373,6 @@ func (m *SearchedVersion) SetVersion(value *string) { m.version = value } -// SearchedVersionable type SearchedVersionable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/snapshot_meta_data.go b/go-sdk/pkg/registryclient-v3/models/snapshot_meta_data.go index d4f1a86d29..cb5e3612a7 100644 --- a/go-sdk/pkg/registryclient-v3/models/snapshot_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/snapshot_meta_data.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// SnapshotMetaData type SnapshotMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewSnapshotMetaData() *SnapshotMetaData { } // CreateSnapshotMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSnapshotMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSnapshotMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SnapshotMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SnapshotMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["snapshotId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *SnapshotMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e } // GetSnapshotId gets the snapshotId property value. The snapshotId property +// returns a *string when successful func (m *SnapshotMetaData) GetSnapshotId() *string { return m.snapshotId } @@ -77,7 +80,6 @@ func (m *SnapshotMetaData) SetSnapshotId(value *string) { m.snapshotId = value } -// SnapshotMetaDataable type SnapshotMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/sort_order.go b/go-sdk/pkg/registryclient-v3/models/sort_order.go index 645adcf3c2..8dd148a895 100644 --- a/go-sdk/pkg/registryclient-v3/models/sort_order.go +++ b/go-sdk/pkg/registryclient-v3/models/sort_order.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type SortOrder int const ( @@ -22,7 +18,7 @@ func ParseSortOrder(v string) (any, error) { case "desc": result = DESC_SORTORDER default: - return 0, errors.New("Unknown SortOrder value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/system_info.go b/go-sdk/pkg/registryclient-v3/models/system_info.go index a82f6b9a31..56f135be54 100644 --- a/go-sdk/pkg/registryclient-v3/models/system_info.go +++ b/go-sdk/pkg/registryclient-v3/models/system_info.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// SystemInfo type SystemInfo struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -27,26 +26,31 @@ func NewSystemInfo() *SystemInfo { } // CreateSystemInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateSystemInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSystemInfo(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *SystemInfo) GetAdditionalData() map[string]any { return m.additionalData } // GetBuiltOn gets the builtOn property value. The builtOn property +// returns a *Time when successful func (m *SystemInfo) GetBuiltOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.builtOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *SystemInfo) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *SystemInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["builtOn"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -93,11 +97,13 @@ func (m *SystemInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d268 } // GetName gets the name property value. The name property +// returns a *string when successful func (m *SystemInfo) GetName() *string { return m.name } // GetVersion gets the version property value. The version property +// returns a *string when successful func (m *SystemInfo) GetVersion() *string { return m.version } @@ -162,7 +168,6 @@ func (m *SystemInfo) SetVersion(value *string) { m.version = value } -// SystemInfoable type SystemInfoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/update_configuration_property.go b/go-sdk/pkg/registryclient-v3/models/update_configuration_property.go index fdeeca5485..163c0943c9 100644 --- a/go-sdk/pkg/registryclient-v3/models/update_configuration_property.go +++ b/go-sdk/pkg/registryclient-v3/models/update_configuration_property.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UpdateConfigurationProperty type UpdateConfigurationProperty struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewUpdateConfigurationProperty() *UpdateConfigurationProperty { } // CreateUpdateConfigurationPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUpdateConfigurationPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUpdateConfigurationProperty(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UpdateConfigurationProperty) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UpdateConfigurationProperty) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *UpdateConfigurationProperty) GetFieldDeserializers() map[string]func(i8 } // GetValue gets the value property value. The value property +// returns a *string when successful func (m *UpdateConfigurationProperty) GetValue() *string { return m.value } @@ -77,7 +80,6 @@ func (m *UpdateConfigurationProperty) SetValue(value *string) { m.value = value } -// UpdateConfigurationPropertyable type UpdateConfigurationPropertyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/update_role.go b/go-sdk/pkg/registryclient-v3/models/update_role.go index a42077f68c..3fac917f50 100644 --- a/go-sdk/pkg/registryclient-v3/models/update_role.go +++ b/go-sdk/pkg/registryclient-v3/models/update_role.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UpdateRole type UpdateRole struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -20,16 +19,19 @@ func NewUpdateRole() *UpdateRole { } // CreateUpdateRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUpdateRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUpdateRole(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UpdateRole) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UpdateRole) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["role"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -46,6 +48,7 @@ func (m *UpdateRole) GetFieldDeserializers() map[string]func(i878a80d2330e89d268 } // GetRole gets the role property value. The role property +// returns a *RoleType when successful func (m *UpdateRole) GetRole() *RoleType { return m.role } @@ -78,7 +81,6 @@ func (m *UpdateRole) SetRole(value *RoleType) { m.role = value } -// UpdateRoleable type UpdateRoleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/user_info.go b/go-sdk/pkg/registryclient-v3/models/user_info.go index 857629a5b6..6908a820c8 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_info.go +++ b/go-sdk/pkg/registryclient-v3/models/user_info.go @@ -28,31 +28,37 @@ func NewUserInfo() *UserInfo { } // CreateUserInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUserInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUserInfo(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UserInfo) GetAdditionalData() map[string]any { return m.additionalData } // GetAdmin gets the admin property value. The admin property +// returns a *bool when successful func (m *UserInfo) GetAdmin() *bool { return m.admin } // GetDeveloper gets the developer property value. The developer property +// returns a *bool when successful func (m *UserInfo) GetDeveloper() *bool { return m.developer } // GetDisplayName gets the displayName property value. The displayName property +// returns a *string when successful func (m *UserInfo) GetDisplayName() *string { return m.displayName } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["admin"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -109,11 +115,13 @@ func (m *UserInfo) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896 } // GetUsername gets the username property value. The username property +// returns a *string when successful func (m *UserInfo) GetUsername() *string { return m.username } // GetViewer gets the viewer property value. The viewer property +// returns a *bool when successful func (m *UserInfo) GetViewer() *bool { return m.viewer } @@ -189,7 +197,6 @@ func (m *UserInfo) SetViewer(value *bool) { m.viewer = value } -// UserInfoable type UserInfoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config.go index 4a7340fa75..4cf0f8d3dd 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_interface_config.go +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config.go @@ -24,26 +24,31 @@ func NewUserInterfaceConfig() *UserInterfaceConfig { } // CreateUserInterfaceConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUserInterfaceConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUserInterfaceConfig(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UserInterfaceConfig) GetAdditionalData() map[string]any { return m.additionalData } // GetAuth gets the auth property value. The auth property +// returns a UserInterfaceConfigAuthable when successful func (m *UserInterfaceConfig) GetAuth() UserInterfaceConfigAuthable { return m.auth } // GetFeatures gets the features property value. The features property +// returns a UserInterfaceConfigFeaturesable when successful func (m *UserInterfaceConfig) GetFeatures() UserInterfaceConfigFeaturesable { return m.features } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInterfaceConfig) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["auth"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -80,6 +85,7 @@ func (m *UserInterfaceConfig) GetFieldDeserializers() map[string]func(i878a80d23 } // GetUi gets the ui property value. The ui property +// returns a UserInterfaceConfigUiable when successful func (m *UserInterfaceConfig) GetUi() UserInterfaceConfigUiable { return m.ui } @@ -133,7 +139,6 @@ func (m *UserInterfaceConfig) SetUi(value UserInterfaceConfigUiable) { m.ui = value } -// UserInterfaceConfigable type UserInterfaceConfigable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go index 6c266d42bb..39acd98ec7 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UserInterfaceConfigAuth type UserInterfaceConfigAuth struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -26,16 +25,19 @@ func NewUserInterfaceConfigAuth() *UserInterfaceConfigAuth { } // CreateUserInterfaceConfigAuthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUserInterfaceConfigAuthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUserInterfaceConfigAuth(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UserInterfaceConfigAuth) GetAdditionalData() map[string]any { return m.additionalData } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInterfaceConfigAuth) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["obacEnabled"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -82,21 +84,25 @@ func (m *UserInterfaceConfigAuth) GetFieldDeserializers() map[string]func(i878a8 } // GetObacEnabled gets the obacEnabled property value. The obacEnabled property +// returns a *bool when successful func (m *UserInterfaceConfigAuth) GetObacEnabled() *bool { return m.obacEnabled } // GetOptions gets the options property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *UserInterfaceConfigAuth) GetOptions() Labelsable { return m.options } // GetRbacEnabled gets the rbacEnabled property value. The rbacEnabled property +// returns a *bool when successful func (m *UserInterfaceConfigAuth) GetRbacEnabled() *bool { return m.rbacEnabled } // GetTypeEscaped gets the type property value. The type property +// returns a *UserInterfaceConfigAuth_type when successful func (m *UserInterfaceConfigAuth) GetTypeEscaped() *UserInterfaceConfigAuth_type { return m.typeEscaped } @@ -162,7 +168,6 @@ func (m *UserInterfaceConfigAuth) SetTypeEscaped(value *UserInterfaceConfigAuth_ m.typeEscaped = value } -// UserInterfaceConfigAuthable type UserInterfaceConfigAuthable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_escaped_type.go similarity index 92% rename from go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go rename to go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_escaped_type.go index 7d81c24cdd..1dbef9975a 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_escaped_type.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - // This endpoint is used by the user interface to retrieve UI specific configurationin a JSON payload. This allows the UI and the backend to be configured in the same place (the backend process/pod). When the UI loads, it will make an API callto this endpoint to determine what UI features and options are configured. type UserInterfaceConfigAuth_type int @@ -26,7 +22,7 @@ func ParseUserInterfaceConfigAuth_type(v string) (any, error) { case "oidc": result = OIDC_USERINTERFACECONFIGAUTH_TYPE default: - return 0, errors.New("Unknown UserInterfaceConfigAuth_type value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go index 15d97ab79a..b6e7ac9e21 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UserInterfaceConfigFeatures type UserInterfaceConfigFeatures struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -32,36 +31,43 @@ func NewUserInterfaceConfigFeatures() *UserInterfaceConfigFeatures { } // CreateUserInterfaceConfigFeaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUserInterfaceConfigFeaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUserInterfaceConfigFeatures(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UserInterfaceConfigFeatures) GetAdditionalData() map[string]any { return m.additionalData } // GetBreadcrumbs gets the breadcrumbs property value. The breadcrumbs property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetBreadcrumbs() *bool { return m.breadcrumbs } // GetDeleteArtifact gets the deleteArtifact property value. The deleteArtifact property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetDeleteArtifact() *bool { return m.deleteArtifact } // GetDeleteGroup gets the deleteGroup property value. The deleteGroup property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetDeleteGroup() *bool { return m.deleteGroup } // GetDeleteVersion gets the deleteVersion property value. The deleteVersion property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetDeleteVersion() *bool { return m.deleteVersion } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInterfaceConfigFeatures) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["breadcrumbs"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -138,16 +144,19 @@ func (m *UserInterfaceConfigFeatures) GetFieldDeserializers() map[string]func(i8 } // GetReadOnly gets the readOnly property value. The readOnly property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetReadOnly() *bool { return m.readOnly } // GetRoleManagement gets the roleManagement property value. The roleManagement property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetRoleManagement() *bool { return m.roleManagement } // GetSettings gets the settings property value. The settings property +// returns a *bool when successful func (m *UserInterfaceConfigFeatures) GetSettings() *bool { return m.settings } @@ -245,7 +254,6 @@ func (m *UserInterfaceConfigFeatures) SetSettings(value *bool) { m.settings = value } -// UserInterfaceConfigFeaturesable type UserInterfaceConfigFeaturesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go index 20eb722b6a..32f8d6a11d 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// UserInterfaceConfigUi type UserInterfaceConfigUi struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -24,21 +23,25 @@ func NewUserInterfaceConfigUi() *UserInterfaceConfigUi { } // CreateUserInterfaceConfigUiFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateUserInterfaceConfigUiFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewUserInterfaceConfigUi(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *UserInterfaceConfigUi) GetAdditionalData() map[string]any { return m.additionalData } // GetContextPath gets the contextPath property value. The contextPath property +// returns a *string when successful func (m *UserInterfaceConfigUi) GetContextPath() *string { return m.contextPath } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInterfaceConfigUi) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["contextPath"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -75,11 +78,13 @@ func (m *UserInterfaceConfigUi) GetFieldDeserializers() map[string]func(i878a80d } // GetNavPrefixPath gets the navPrefixPath property value. The navPrefixPath property +// returns a *string when successful func (m *UserInterfaceConfigUi) GetNavPrefixPath() *string { return m.navPrefixPath } // GetOaiDocsUrl gets the oaiDocsUrl property value. The oaiDocsUrl property +// returns a *string when successful func (m *UserInterfaceConfigUi) GetOaiDocsUrl() *string { return m.oaiDocsUrl } @@ -133,7 +138,6 @@ func (m *UserInterfaceConfigUi) SetOaiDocsUrl(value *string) { m.oaiDocsUrl = value } -// UserInterfaceConfigUiable type UserInterfaceConfigUiable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/version_content.go b/go-sdk/pkg/registryclient-v3/models/version_content.go index df72a48a0b..673b323374 100644 --- a/go-sdk/pkg/registryclient-v3/models/version_content.go +++ b/go-sdk/pkg/registryclient-v3/models/version_content.go @@ -4,7 +4,6 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// VersionContent type VersionContent struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -24,26 +23,31 @@ func NewVersionContent() *VersionContent { } // CreateVersionContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateVersionContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVersionContent(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *VersionContent) GetAdditionalData() map[string]any { return m.additionalData } // GetContent gets the content property value. Raw content of the artifact version or a valid (and accessible) URL where the content can be found. +// returns a *string when successful func (m *VersionContent) GetContent() *string { return m.content } // GetContentType gets the contentType property value. The content-type, such as `application/json` or `text/xml`. +// returns a *string when successful func (m *VersionContent) GetContentType() *string { return m.contentType } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VersionContent) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["content"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -86,6 +90,7 @@ func (m *VersionContent) GetFieldDeserializers() map[string]func(i878a80d2330e89 } // GetReferences gets the references property value. Collection of references to other artifacts. +// returns a []ArtifactReferenceable when successful func (m *VersionContent) GetReferences() []ArtifactReferenceable { return m.references } @@ -145,7 +150,6 @@ func (m *VersionContent) SetReferences(value []ArtifactReferenceable) { m.references = value } -// VersionContentable type VersionContentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/version_meta_data.go b/go-sdk/pkg/registryclient-v3/models/version_meta_data.go index f658094b08..1883aa0538 100644 --- a/go-sdk/pkg/registryclient-v3/models/version_meta_data.go +++ b/go-sdk/pkg/registryclient-v3/models/version_meta_data.go @@ -5,7 +5,6 @@ import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" ) -// VersionMetaData type VersionMetaData struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -43,41 +42,49 @@ func NewVersionMetaData() *VersionMetaData { } // CreateVersionMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateVersionMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVersionMetaData(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *VersionMetaData) GetAdditionalData() map[string]any { return m.additionalData } // GetArtifactId gets the artifactId property value. The ID of a single artifact. +// returns a *string when successful func (m *VersionMetaData) GetArtifactId() *string { return m.artifactId } // GetArtifactType gets the artifactType property value. The artifactType property +// returns a *string when successful func (m *VersionMetaData) GetArtifactType() *string { return m.artifactType } // GetContentId gets the contentId property value. The contentId property +// returns a *int64 when successful func (m *VersionMetaData) GetContentId() *int64 { return m.contentId } // GetCreatedOn gets the createdOn property value. The createdOn property +// returns a *Time when successful func (m *VersionMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time { return m.createdOn } // GetDescription gets the description property value. The description property +// returns a *string when successful func (m *VersionMetaData) GetDescription() *string { return m.description } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VersionMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -204,36 +211,43 @@ func (m *VersionMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e8 } // GetGlobalId gets the globalId property value. The globalId property +// returns a *int64 when successful func (m *VersionMetaData) GetGlobalId() *int64 { return m.globalId } // GetGroupId gets the groupId property value. An ID of a single artifact group. +// returns a *string when successful func (m *VersionMetaData) GetGroupId() *string { return m.groupId } // GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings. +// returns a Labelsable when successful func (m *VersionMetaData) GetLabels() Labelsable { return m.labels } // GetName gets the name property value. The name property +// returns a *string when successful func (m *VersionMetaData) GetName() *string { return m.name } // GetOwner gets the owner property value. The owner property +// returns a *string when successful func (m *VersionMetaData) GetOwner() *string { return m.owner } // GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED +// returns a *VersionState when successful func (m *VersionMetaData) GetState() *VersionState { return m.state } // GetVersion gets the version property value. A single version of an artifact. Can be provided by the client when creating a new version,or it can be server-generated. The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value. +// returns a *string when successful func (m *VersionMetaData) GetVersion() *string { return m.version } @@ -387,7 +401,6 @@ func (m *VersionMetaData) SetVersion(value *string) { m.version = value } -// VersionMetaDataable type VersionMetaDataable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/version_search_results.go b/go-sdk/pkg/registryclient-v3/models/version_search_results.go index b71b85e482..bc6f9e296d 100644 --- a/go-sdk/pkg/registryclient-v3/models/version_search_results.go +++ b/go-sdk/pkg/registryclient-v3/models/version_search_results.go @@ -22,21 +22,25 @@ func NewVersionSearchResults() *VersionSearchResults { } // CreateVersionSearchResultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful func CreateVersionSearchResultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVersionSearchResults(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful func (m *VersionSearchResults) GetAdditionalData() map[string]any { return m.additionalData } // GetCount gets the count property value. The total number of versions that matched the query (may be more than the number of versionsreturned in the result set). +// returns a *int32 when successful func (m *VersionSearchResults) GetCount() *int32 { return m.count } // GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VersionSearchResults) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) res["count"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -69,6 +73,7 @@ func (m *VersionSearchResults) GetFieldDeserializers() map[string]func(i878a80d2 } // GetVersions gets the versions property value. The collection of artifact versions returned in the result set. +// returns a []SearchedVersionable when successful func (m *VersionSearchResults) GetVersions() []SearchedVersionable { return m.versions } @@ -117,7 +122,6 @@ func (m *VersionSearchResults) SetVersions(value []SearchedVersionable) { m.versions = value } -// VersionSearchResultsable type VersionSearchResultsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go-sdk/pkg/registryclient-v3/models/version_sort_by.go b/go-sdk/pkg/registryclient-v3/models/version_sort_by.go index 5ae6490478..878075083c 100644 --- a/go-sdk/pkg/registryclient-v3/models/version_sort_by.go +++ b/go-sdk/pkg/registryclient-v3/models/version_sort_by.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - type VersionSortBy int const ( @@ -31,7 +27,7 @@ func ParseVersionSortBy(v string) (any, error) { case "globalId": result = GLOBALID_VERSIONSORTBY default: - return 0, errors.New("Unknown VersionSortBy value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/models/version_state.go b/go-sdk/pkg/registryclient-v3/models/version_state.go index 05329df231..095b024152 100644 --- a/go-sdk/pkg/registryclient-v3/models/version_state.go +++ b/go-sdk/pkg/registryclient-v3/models/version_state.go @@ -1,9 +1,5 @@ package models -import ( - "errors" -) - // Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED type VersionState int @@ -26,7 +22,7 @@ func ParseVersionState(v string) (any, error) { case "DEPRECATED": result = DEPRECATED_VERSIONSTATE default: - return 0, errors.New("Unknown VersionState value: " + v) + return nil, nil } return &result, nil } diff --git a/go-sdk/pkg/registryclient-v3/search/artifacts_request_builder.go b/go-sdk/pkg/registryclient-v3/search/artifacts_request_builder.go index c6c68efc06..024a74ff76 100644 --- a/go-sdk/pkg/registryclient-v3/search/artifacts_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/search/artifacts_request_builder.go @@ -32,12 +32,12 @@ type ArtifactsRequestBuilderGetQueryParameters struct { // The number of artifacts to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsArtifactSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsArtifactSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsArtifactSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactSortBy `uriparametername:"orderby"` @@ -66,12 +66,12 @@ type ArtifactsRequestBuilderPostQueryParameters struct { // The number of artifacts to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsArtifactSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsArtifactSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsArtifactSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactSortBy `uriparametername:"orderby"` @@ -90,7 +90,7 @@ type ArtifactsRequestBuilderPostRequestConfiguration struct { // NewArtifactsRequestBuilderInternal instantiates a new ArtifactsRequestBuilder and sets the default values. func NewArtifactsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ArtifactsRequestBuilder { m := &ArtifactsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/artifacts{?name*,offset*,limit*,order*,orderby*,labels*,description*,groupId*,globalId*,contentId*,artifactId*,canonical*,artifactType*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/artifacts{?artifactId*,artifactType*,canonical*,contentId*,description*,globalId*,groupId*,labels*,limit*,name*,offset*,order*,orderby*}", pathParameters), } return m } @@ -103,6 +103,8 @@ func NewArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 } // Get returns a paginated list of all artifacts that match the provided filter criteria.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a ArtifactSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *ArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration *ArtifactsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -122,6 +124,9 @@ func (m *ArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration } // Post returns a paginated list of all artifacts with at least one version that matches theposted content.This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a ArtifactSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *ArtifactsRequestBuilder) Post(ctx context.Context, body []byte, contentType *string, requestConfiguration *ArtifactsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.ArtifactSearchResultsable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, contentType, requestConfiguration) if err != nil { @@ -142,6 +147,7 @@ func (m *ArtifactsRequestBuilder) Post(ctx context.Context, body []byte, content } // ToGetRequestInformation returns a paginated list of all artifacts that match the provided filter criteria.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ArtifactsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -156,6 +162,7 @@ func (m *ArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, r } // ToPostRequestInformation returns a paginated list of all artifacts with at least one version that matches theposted content.This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *ArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, contentType *string, requestConfiguration *ArtifactsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -171,6 +178,7 @@ func (m *ArtifactsRequestBuilder) ToPostRequestInformation(ctx context.Context, } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ArtifactsRequestBuilder when successful func (m *ArtifactsRequestBuilder) WithUrl(rawUrl string) *ArtifactsRequestBuilder { return NewArtifactsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/search/groups_request_builder.go b/go-sdk/pkg/registryclient-v3/search/groups_request_builder.go index 1d6bc0b2b5..3232c60e8b 100644 --- a/go-sdk/pkg/registryclient-v3/search/groups_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/search/groups_request_builder.go @@ -24,12 +24,12 @@ type GroupsRequestBuilderGetQueryParameters struct { // The number of artifacts to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsGroupSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsGroupSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsGroupSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.GroupSortBy `uriparametername:"orderby"` @@ -48,7 +48,7 @@ type GroupsRequestBuilderGetRequestConfiguration struct { // NewGroupsRequestBuilderInternal instantiates a new GroupsRequestBuilder and sets the default values. func NewGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *GroupsRequestBuilder { m := &GroupsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/groups{?offset*,limit*,order*,orderby*,labels*,description*,groupId*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/groups{?description*,groupId*,labels*,limit*,offset*,order*,orderby*}", pathParameters), } return m } @@ -61,6 +61,8 @@ func NewGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get returns a paginated list of all groups that match the provided filter criteria.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a GroupSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *GroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *GroupsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.GroupSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -80,6 +82,7 @@ func (m *GroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *Gr } // ToGetRequestInformation returns a paginated list of all groups that match the provided filter criteria.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GroupsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -94,6 +97,7 @@ func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GroupsRequestBuilder when successful func (m *GroupsRequestBuilder) WithUrl(rawUrl string) *GroupsRequestBuilder { return NewGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/search/search_request_builder.go b/go-sdk/pkg/registryclient-v3/search/search_request_builder.go index 1fc8c59ede..f5e2eeead2 100644 --- a/go-sdk/pkg/registryclient-v3/search/search_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/search/search_request_builder.go @@ -10,6 +10,7 @@ type SearchRequestBuilder struct { } // Artifacts search for artifacts in the registry. +// returns a *ArtifactsRequestBuilder when successful func (m *SearchRequestBuilder) Artifacts() *ArtifactsRequestBuilder { return NewArtifactsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } @@ -30,11 +31,13 @@ func NewSearchRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Groups search for groups in the registry. +// returns a *GroupsRequestBuilder when successful func (m *SearchRequestBuilder) Groups() *GroupsRequestBuilder { return NewGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Versions search for versions in the registry. +// returns a *VersionsRequestBuilder when successful func (m *SearchRequestBuilder) Versions() *VersionsRequestBuilder { return NewVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/search/versions_request_builder.go b/go-sdk/pkg/registryclient-v3/search/versions_request_builder.go index 120ffa7520..322a6aa1ae 100644 --- a/go-sdk/pkg/registryclient-v3/search/versions_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/search/versions_request_builder.go @@ -32,12 +32,12 @@ type VersionsRequestBuilderGetQueryParameters struct { // The number of versions to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsVersionSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsVersionSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsVersionSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSortBy `uriparametername:"orderby"` @@ -70,12 +70,12 @@ type VersionsRequestBuilderPostQueryParameters struct { // The number of versions to skip before starting to collect the result set. Defaults to 0. Offset *int32 `uriparametername:"offset"` // Sort order, ascending (`asc`) or descending (`desc`). - // Deprecated: This property is deprecated, use orderAsSortOrder instead + // Deprecated: This property is deprecated, use OrderAsSortOrder instead Order *string `uriparametername:"order"` // Sort order, ascending (`asc`) or descending (`desc`). OrderAsSortOrder *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SortOrder `uriparametername:"order"` // The field to sort by. Can be one of:* `name`* `createdOn` - // Deprecated: This property is deprecated, use orderbyAsVersionSortBy instead + // Deprecated: This property is deprecated, use OrderbyAsVersionSortBy instead Orderby *string `uriparametername:"orderby"` // The field to sort by. Can be one of:* `name`* `createdOn` OrderbyAsVersionSortBy *i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSortBy `uriparametername:"orderby"` @@ -94,7 +94,7 @@ type VersionsRequestBuilderPostRequestConfiguration struct { // NewVersionsRequestBuilderInternal instantiates a new VersionsRequestBuilder and sets the default values. func NewVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *VersionsRequestBuilder { m := &VersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/versions{?version*,offset*,limit*,order*,orderby*,labels*,description*,groupId*,globalId*,contentId*,artifactId*,name*,canonical*,artifactType*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/versions{?artifactId*,artifactType*,canonical*,contentId*,description*,globalId*,groupId*,labels*,limit*,name*,offset*,order*,orderby*,version*}", pathParameters), } return m } @@ -107,6 +107,8 @@ func NewVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26337 } // Get returns a paginated list of all versions that match the provided filter criteria.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a VersionSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *VersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *VersionsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSearchResultsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -126,6 +128,9 @@ func (m *VersionsRequestBuilder) Get(ctx context.Context, requestConfiguration * } // Post returns a paginated list of all versions that match the posted content.This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a VersionSearchResultsable when successful +// returns a ProblemDetails error when the service returns a 400 status code +// returns a ProblemDetails error when the service returns a 500 status code func (m *VersionsRequestBuilder) Post(ctx context.Context, body []byte, contentType *string, requestConfiguration *VersionsRequestBuilderPostRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.VersionSearchResultsable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, contentType, requestConfiguration) if err != nil { @@ -146,6 +151,7 @@ func (m *VersionsRequestBuilder) Post(ctx context.Context, body []byte, contentT } // ToGetRequestInformation returns a paginated list of all versions that match the provided filter criteria.This operation can fail for the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *VersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VersionsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -160,6 +166,7 @@ func (m *VersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, re } // ToPostRequestInformation returns a paginated list of all versions that match the posted content.This operation can fail for the following reasons:* Provided content (request body) was empty (HTTP error `400`)* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *VersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, contentType *string, requestConfiguration *VersionsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -175,6 +182,7 @@ func (m *VersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, b } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *VersionsRequestBuilder when successful func (m *VersionsRequestBuilder) WithUrl(rawUrl string) *VersionsRequestBuilder { return NewVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/system/info_request_builder.go b/go-sdk/pkg/registryclient-v3/system/info_request_builder.go index f90d564dd9..3df2a98078 100644 --- a/go-sdk/pkg/registryclient-v3/system/info_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/system/info_request_builder.go @@ -35,6 +35,8 @@ func NewInfoRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1 } // Get this operation retrieves information about the running registry system, such as the versionof the software and when it was built. +// returns a SystemInfoable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *InfoRequestBuilder) Get(ctx context.Context, requestConfiguration *InfoRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.SystemInfoable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *InfoRequestBuilder) Get(ctx context.Context, requestConfiguration *Info } // ToGetRequestInformation this operation retrieves information about the running registry system, such as the versionof the software and when it was built. +// returns a *RequestInformation when successful func (m *InfoRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *InfoRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *InfoRequestBuilder) ToGetRequestInformation(ctx context.Context, reques } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InfoRequestBuilder when successful func (m *InfoRequestBuilder) WithUrl(rawUrl string) *InfoRequestBuilder { return NewInfoRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/system/limits_request_builder.go b/go-sdk/pkg/registryclient-v3/system/limits_request_builder.go index ff9bc3a565..db148c00bf 100644 --- a/go-sdk/pkg/registryclient-v3/system/limits_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/system/limits_request_builder.go @@ -35,6 +35,8 @@ func NewLimitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Get this operation retrieves the list of limitations on used resources, that are applied on the current instance of Registry. +// returns a Limitsable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *LimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *LimitsRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.Limitsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *LimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *Li } // ToGetRequestInformation this operation retrieves the list of limitations on used resources, that are applied on the current instance of Registry. +// returns a *RequestInformation when successful func (m *LimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LimitsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *LimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *LimitsRequestBuilder when successful func (m *LimitsRequestBuilder) WithUrl(rawUrl string) *LimitsRequestBuilder { return NewLimitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/system/system_request_builder.go b/go-sdk/pkg/registryclient-v3/system/system_request_builder.go index 32f00dab79..b6ed54b818 100644 --- a/go-sdk/pkg/registryclient-v3/system/system_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/system/system_request_builder.go @@ -25,16 +25,19 @@ func NewSystemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c } // Info retrieve system information +// returns a *InfoRequestBuilder when successful func (m *SystemRequestBuilder) Info() *InfoRequestBuilder { return NewInfoRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Limits retrieve resource limits information +// returns a *LimitsRequestBuilder when successful func (m *SystemRequestBuilder) Limits() *LimitsRequestBuilder { return NewLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // UiConfig this endpoint is used by the user interface to retrieve UI specific configurationin a JSON payload. This allows the UI and the backend to be configured in the same place (the backend process/pod). When the UI loads, it will make an API callto this endpoint to determine what UI features and options are configured. +// returns a *UiConfigRequestBuilder when successful func (m *SystemRequestBuilder) UiConfig() *UiConfigRequestBuilder { return NewUiConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go b/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go index f479ada48a..db5630e4a4 100644 --- a/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go @@ -35,6 +35,8 @@ func NewUiConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26337 } // Get returns the UI configuration properties for this server. The registry UI can beconnected to a backend using just a URL. The rest of the UI configuration can thenbe fetched from the backend using this operation. This allows UI and backend toboth be configured in the same place.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a UserInterfaceConfigable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *UiConfigRequestBuilder) Get(ctx context.Context, requestConfiguration *UiConfigRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UserInterfaceConfigable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *UiConfigRequestBuilder) Get(ctx context.Context, requestConfiguration * } // ToGetRequestInformation returns the UI configuration properties for this server. The registry UI can beconnected to a backend using just a URL. The rest of the UI configuration can thenbe fetched from the backend using this operation. This allows UI and backend toboth be configured in the same place.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +// returns a *RequestInformation when successful func (m *UiConfigRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *UiConfigRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *UiConfigRequestBuilder) ToGetRequestInformation(ctx context.Context, re } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *UiConfigRequestBuilder when successful func (m *UiConfigRequestBuilder) WithUrl(rawUrl string) *UiConfigRequestBuilder { return NewUiConfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/users/me_request_builder.go b/go-sdk/pkg/registryclient-v3/users/me_request_builder.go index e58271fcef..384594c2e5 100644 --- a/go-sdk/pkg/registryclient-v3/users/me_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/users/me_request_builder.go @@ -35,6 +35,8 @@ func NewMeRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c9 } // Get returns information about the currently authenticated user. +// returns a UserInfoable when successful +// returns a ProblemDetails error when the service returns a 500 status code func (m *MeRequestBuilder) Get(ctx context.Context, requestConfiguration *MeRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UserInfoable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) if err != nil { @@ -54,6 +56,7 @@ func (m *MeRequestBuilder) Get(ctx context.Context, requestConfiguration *MeRequ } // ToGetRequestInformation returns information about the currently authenticated user. +// returns a *RequestInformation when successful func (m *MeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MeRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -65,6 +68,7 @@ func (m *MeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestC } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MeRequestBuilder when successful func (m *MeRequestBuilder) WithUrl(rawUrl string) *MeRequestBuilder { return NewMeRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) } diff --git a/go-sdk/pkg/registryclient-v3/users/users_request_builder.go b/go-sdk/pkg/registryclient-v3/users/users_request_builder.go index 787e9f0b24..08da845efe 100644 --- a/go-sdk/pkg/registryclient-v3/users/users_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/users/users_request_builder.go @@ -25,6 +25,7 @@ func NewUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb } // Me retrieves information about the current user +// returns a *MeRequestBuilder when successful func (m *UsersRequestBuilder) Me() *MeRequestBuilder { return NewMeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } diff --git a/integration-tests/src/test/java/io/apicurio/tests/ApicurioRegistryBaseIT.java b/integration-tests/src/test/java/io/apicurio/tests/ApicurioRegistryBaseIT.java index b3dba569f8..8651db2a96 100644 --- a/integration-tests/src/test/java/io/apicurio/tests/ApicurioRegistryBaseIT.java +++ b/integration-tests/src/test/java/io/apicurio/tests/ApicurioRegistryBaseIT.java @@ -455,12 +455,20 @@ private void internalAssertClientError(String expectedErrorName, int expectedCod Assertions.fail("Expected (but didn't get) a registry client application exception with code: " + expectedCode); } catch (Exception e) { - Assertions.assertEquals(io.apicurio.registry.rest.client.models.ProblemDetails.class, - e.getClass()); - Assertions.assertEquals(expectedErrorName, - ((io.apicurio.registry.rest.client.models.ProblemDetails) e).getName()); - Assertions.assertEquals(expectedCode, - ((io.apicurio.registry.rest.client.models.ProblemDetails) e).getStatus()); + if (e instanceof io.apicurio.registry.rest.client.models.RuleViolationProblemDetails) { + Assertions.assertEquals(expectedErrorName, + ((io.apicurio.registry.rest.client.models.RuleViolationProblemDetails) e).getName()); + Assertions.assertEquals(expectedCode, + ((io.apicurio.registry.rest.client.models.RuleViolationProblemDetails) e) + .getStatus()); + } else if (e instanceof io.apicurio.registry.rest.client.models.ProblemDetails) { + Assertions.assertEquals(expectedErrorName, + ((io.apicurio.registry.rest.client.models.ProblemDetails) e).getName()); + Assertions.assertEquals(expectedCode, + ((io.apicurio.registry.rest.client.models.ProblemDetails) e).getStatus()); + } else { + throw new RuntimeException("Unhandled exception type"); + } } } diff --git a/java-sdk-v2/pom.xml b/java-sdk-v2/pom.xml index bb2d1a9953..bc8fe53032 100644 --- a/java-sdk-v2/pom.xml +++ b/java-sdk-v2/pom.xml @@ -25,7 +25,7 @@ apicurio-registry-v2-java-sdk ${project.basedir}/.. - 1.4.0 + 1.5.1 0.0.18 https://github.com/microsoft/kiota/releases/download @@ -82,7 +82,7 @@ generate - 1.10.1 + 1.18.0 ${kiota.base.url} ../common/src/main/resources/META-INF/openapi-v2.json io.apicurio.registry.rest.client.v2 diff --git a/java-sdk/pom.xml b/java-sdk/pom.xml index 94ed8466e5..5bbf882377 100644 --- a/java-sdk/pom.xml +++ b/java-sdk/pom.xml @@ -25,7 +25,7 @@ apicurio-registry-java-sdk ${project.basedir}/.. - 1.4.0 + 1.5.1 0.0.18 11 11 @@ -78,7 +78,7 @@ kiota-maven-plugin ${kiota.community.version} - 1.10.1 + 1.18.0 ${kiota.base.url} ../common/src/main/resources/META-INF/openapi.json io.apicurio.registry.rest.client diff --git a/operator/controller/Readme.md b/operator/controller/Readme.md index f58a30af6b..aea6ba9089 100644 --- a/operator/controller/Readme.md +++ b/operator/controller/Readme.md @@ -29,3 +29,15 @@ To execute the tests in `remote` mode you need to perform the following steps: - run `eval $(minikube -p minikube docker-env)` in the teerminal yuo are going to build the container image - build the image `mvn clean package -Dquarkus.container-image.build=true -f operator/controller/pom.xml` - run the tests `mvn verify -f operator/controller/pom.xml -Dtest.operator.deployment=remote -Dquarkus.kubernetes.deployment-target=minikube -DskipOperatorTests=false` + +#### Testing of Ingresses + +To allow the testing of Ingresses when using minikube, run: + ```shell + minikube addons enable ingress + minikube tunnel + ``` + +On other clusters, you might need to provide `test.operator.ingress-host` property that contains the base hostname from where applications on your cluster are accessible. + +If your cluster does not have an accessible ingress host, you can skip them using `test.operator.ingress-skip=true` (**not recommended**). diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/ApicurioRegistry3Reconciler.java b/operator/controller/src/main/java/io/apicurio/registry/operator/ApicurioRegistry3Reconciler.java index 9656e83698..39a983a467 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/ApicurioRegistry3Reconciler.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/ApicurioRegistry3Reconciler.java @@ -1,11 +1,13 @@ package io.apicurio.registry.operator; import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.apicurio.registry.operator.resource.ResourceKey; -import io.apicurio.registry.operator.resource.app.AppDeploymentDiscriminator; +import io.apicurio.registry.operator.resource.ActivationConditions.UIIngressActivationCondition; +import io.apicurio.registry.operator.resource.LabelDiscriminators.AppDeploymentDiscriminator; import io.apicurio.registry.operator.resource.app.AppDeploymentResource; +import io.apicurio.registry.operator.resource.app.AppIngressResource; import io.apicurio.registry.operator.resource.app.AppServiceResource; import io.apicurio.registry.operator.resource.ui.UIDeploymentResource; +import io.apicurio.registry.operator.resource.ui.UIIngressResource; import io.apicurio.registry.operator.resource.ui.UIServiceResource; import io.fabric8.kubernetes.api.model.apps.Deployment; import io.javaoperatorsdk.operator.api.reconciler.*; @@ -13,28 +15,44 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static io.apicurio.registry.operator.resource.ActivationConditions.*; +import static io.apicurio.registry.operator.resource.ResourceKey.*; + // spotless:off @ControllerConfiguration( dependents = { + // App @Dependent( type = AppDeploymentResource.class, - name = ResourceKey.APP_DEPLOYMENT_ID + name = APP_DEPLOYMENT_ID ), @Dependent( type = AppServiceResource.class, - name = ResourceKey.APP_SERVICE_ID, - dependsOn = {ResourceKey.APP_DEPLOYMENT_ID} + name = APP_SERVICE_ID, + dependsOn = {APP_DEPLOYMENT_ID} + ), + @Dependent( + type = AppIngressResource.class, + name = APP_INGRESS_ID, + dependsOn = {APP_SERVICE_ID}, + activationCondition = AppIngressActivationCondition.class ), + // UI @Dependent( type = UIDeploymentResource.class, - name = ResourceKey.UI_DEPLOYMENT_ID, - dependsOn = {ResourceKey.APP_SERVICE_ID} + name = UI_DEPLOYMENT_ID ), @Dependent( type = UIServiceResource.class, - name = ResourceKey.UI_SERVICE_ID, - dependsOn = {ResourceKey.UI_DEPLOYMENT_ID} + name = UI_SERVICE_ID, + dependsOn = {UI_DEPLOYMENT_ID} ), + @Dependent( + type = UIIngressResource.class, + name = UI_INGRESS_ID, + dependsOn = {UI_SERVICE_ID}, + activationCondition = UIIngressActivationCondition.class + ) } ) // spotless:on diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ActivationConditions.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ActivationConditions.java new file mode 100644 index 0000000000..be6a18b22e --- /dev/null +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ActivationConditions.java @@ -0,0 +1,45 @@ +package io.apicurio.registry.operator.resource; + +import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; +import io.apicurio.registry.operator.resource.app.AppIngressResource; +import io.apicurio.registry.operator.resource.ui.UIIngressResource; +import io.fabric8.kubernetes.api.model.networking.v1.Ingress; +import io.javaoperatorsdk.operator.api.reconciler.Context; +import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResource; +import io.javaoperatorsdk.operator.processing.dependent.workflow.Condition; + +import static io.apicurio.registry.operator.util.Util.isBlank; + +public class ActivationConditions { + + private ActivationConditions() { + } + + public static class AppIngressActivationCondition implements Condition { + + @Override + public boolean isMet(DependentResource resource, + ApicurioRegistry3 primary, Context context) { + + var disabled = isBlank(primary.getSpec().getApp().getHost()); + if (disabled) { + ((AppIngressResource) resource).delete(primary, context); + } + return !disabled; + } + } + + public static class UIIngressActivationCondition implements Condition { + + @Override + public boolean isMet(DependentResource resource, + ApicurioRegistry3 primary, Context context) { + + var disabled = isBlank(primary.getSpec().getUi().getHost()); + if (disabled) { + ((UIIngressResource) resource).delete(primary, context); + } + return !disabled; + } + } +} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/LabelDiscriminators.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/LabelDiscriminators.java new file mode 100644 index 0000000000..a2610fc0a4 --- /dev/null +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/LabelDiscriminators.java @@ -0,0 +1,102 @@ +package io.apicurio.registry.operator.resource; + +import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; +import io.fabric8.kubernetes.api.model.Service; +import io.fabric8.kubernetes.api.model.apps.Deployment; +import io.fabric8.kubernetes.api.model.networking.v1.Ingress; +import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator; + +import java.util.Map; + +import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_APP; +import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; + +public class LabelDiscriminators { + + private LabelDiscriminators() { + } + + public static class AppDeploymentDiscriminator extends LabelDiscriminator { + + public static final ResourceDiscriminator INSTANCE = new AppDeploymentDiscriminator(); + + public AppDeploymentDiscriminator() { + // spotless:off + super(Map.of( + "app.kubernetes.io/name", "apicurio-registry", + "app.kubernetes.io/component", COMPONENT_APP + )); + // spotless:on + } + } + + public static class UIDeploymentDiscriminator extends LabelDiscriminator { + + public static final ResourceDiscriminator INSTANCE = new UIDeploymentDiscriminator(); + + public UIDeploymentDiscriminator() { + // spotless:off + super(Map.of( + "app.kubernetes.io/name", "apicurio-registry", + "app.kubernetes.io/component", COMPONENT_UI + )); + // spotless:on + } + } + + public static class AppServiceDiscriminator extends LabelDiscriminator { + + public static final ResourceDiscriminator INSTANCE = new AppServiceDiscriminator(); + + public AppServiceDiscriminator() { + // spotless:off + super(Map.of( + "app.kubernetes.io/name", "apicurio-registry", + "app.kubernetes.io/component", COMPONENT_APP + )); + // spotless:on + } + } + + public static class UIServiceDiscriminator extends LabelDiscriminator { + + public static ResourceDiscriminator INSTANCE = new UIServiceDiscriminator(); + + public UIServiceDiscriminator() { + // spotless:off + super(Map.of( + "app.kubernetes.io/name", "apicurio-registry", + "app.kubernetes.io/component", COMPONENT_UI + )); + // spotless:on + } + } + + public static class AppIngressDiscriminator extends LabelDiscriminator { + + public static final ResourceDiscriminator INSTANCE = new AppIngressDiscriminator(); + + public AppIngressDiscriminator() { + // spotless:off + super(Map.of( + "app.kubernetes.io/name", "apicurio-registry", + "app.kubernetes.io/component", COMPONENT_APP + )); + // spotless:on + } + } + + public static class UIIngressDiscriminator extends LabelDiscriminator { + + public static ResourceDiscriminator INSTANCE = new UIIngressDiscriminator(); + + public UIIngressDiscriminator() { + // spotless:off + super(Map.of( + "app.kubernetes.io/name", "apicurio-registry", + "app.kubernetes.io/component", COMPONENT_UI + )); + // spotless:on + } + } +} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceFactory.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceFactory.java index d80e17b45b..b0814bab8e 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceFactory.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceFactory.java @@ -6,6 +6,7 @@ import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.apps.Deployment; +import io.fabric8.kubernetes.api.model.networking.v1.Ingress; import java.nio.charset.Charset; import java.util.Map; @@ -21,6 +22,7 @@ public class ResourceFactory { public static final String RESOURCE_TYPE_DEPLOYMENT = "deployment"; public static final String RESOURCE_TYPE_SERVICE = "service"; + public static final String RESOURCE_TYPE_INGRESS = "ingress"; public static final String APP_CONTAINER_NAME = "apicurio-registry-app"; public static final String UI_CONTAINER_NAME = "apicurio-registry-ui"; @@ -51,6 +53,20 @@ public Service getDefaultUIService(ApicurioRegistry3 primary) { return r; } + public Ingress getDefaultAppIngress(ApicurioRegistry3 primary) { + var r = getDefaultResource(primary, Ingress.class, RESOURCE_TYPE_INGRESS, COMPONENT_APP); + r.getSpec().getRules().get(0).getHttp().getPaths().get(0).getBackend().getService() + .setName(primary.getMetadata().getName() + "-" + COMPONENT_APP + "-" + RESOURCE_TYPE_SERVICE); + return r; + } + + public Ingress getDefaultUIIngress(ApicurioRegistry3 primary) { + var r = getDefaultResource(primary, Ingress.class, RESOURCE_TYPE_INGRESS, COMPONENT_UI); + r.getSpec().getRules().get(0).getHttp().getPaths().get(0).getBackend().getService() + .setName(primary.getMetadata().getName() + "-" + COMPONENT_UI + "-" + RESOURCE_TYPE_SERVICE); + return r; + } + private T getDefaultResource(ApicurioRegistry3 primary, Class klass, String resourceType, String component) { var r = deserialize("/k8s/default/" + component + "." + resourceType + ".yaml", klass); @@ -86,7 +102,7 @@ private void addSelectorLabels(Map labels, ApicurioRegistry3 pri // spotless:on } - private T deserialize(String path, Class klass) { + public static T deserialize(String path, Class klass) { try { return YAML_MAPPER.readValue(load(path), klass); } catch (JsonProcessingException ex) { @@ -94,7 +110,7 @@ private T deserialize(String path, Class klass) { } } - private String load(String path) { + private static String load(String path) { try (var stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(path)) { return new String(stream.readAllBytes(), Charset.defaultCharset()); } catch (Exception ex) { diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceKey.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceKey.java index 8d82c41fe7..a588efe09a 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceKey.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ResourceKey.java @@ -1,12 +1,11 @@ package io.apicurio.registry.operator.resource; import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.apicurio.registry.operator.resource.app.AppDeploymentDiscriminator; -import io.apicurio.registry.operator.resource.app.AppServiceDiscriminator; -import io.apicurio.registry.operator.resource.ui.UIDeploymentDiscriminator; -import io.apicurio.registry.operator.resource.ui.UIServiceDiscriminator; +import io.apicurio.registry.operator.resource.LabelDiscriminators.AppDeploymentDiscriminator; +import io.apicurio.registry.operator.resource.LabelDiscriminators.UIDeploymentDiscriminator; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.apps.Deployment; +import io.fabric8.kubernetes.api.model.networking.v1.Ingress; import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; @@ -15,6 +14,8 @@ import java.util.function.Function; +import static io.apicurio.registry.operator.resource.LabelDiscriminators.*; + @AllArgsConstructor @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) @@ -30,6 +31,9 @@ public class ResourceKey { public static final String APP_SERVICE_ID = "AppServiceResource"; public static final String UI_SERVICE_ID = "UIServiceResource"; + public static final String APP_INGRESS_ID = "AppIngressResource"; + public static final String UI_INGRESS_ID = "UIIngressResource"; + public static final ResourceKey REGISTRY_KEY = new ResourceKey<>( REGISTRY_ID, ApicurioRegistry3.class, null, null @@ -54,6 +58,16 @@ public class ResourceKey { UI_SERVICE_ID, Service.class, UIServiceDiscriminator.INSTANCE, ResourceFactory.INSTANCE::getDefaultUIService ); + + public static final ResourceKey APP_INGRESS_KEY = new ResourceKey<>( + APP_INGRESS_ID, Ingress.class, + AppIngressDiscriminator.INSTANCE, ResourceFactory.INSTANCE::getDefaultAppIngress + ); + + public static final ResourceKey UI_INGRESS_KEY = new ResourceKey<>( + UI_INGRESS_ID, Ingress.class, + UIIngressDiscriminator.INSTANCE, ResourceFactory.INSTANCE::getDefaultUIIngress + ); // spotless:on @EqualsAndHashCode.Include diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentDiscriminator.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentDiscriminator.java deleted file mode 100644 index c1a934f0bc..0000000000 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentDiscriminator.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.apicurio.registry.operator.resource.app; - -import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.apicurio.registry.operator.resource.LabelDiscriminator; -import io.fabric8.kubernetes.api.model.apps.Deployment; -import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator; - -import java.util.Map; - -import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_APP; - -public class AppDeploymentDiscriminator extends LabelDiscriminator { - - public static final ResourceDiscriminator INSTANCE = new AppDeploymentDiscriminator(); - - public AppDeploymentDiscriminator() { - // spotless:off - super(Map.of( - "app.kubernetes.io/name", "apicurio-registry", - "app.kubernetes.io/component", COMPONENT_APP - )); - // spotless:on - } -} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentResource.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentResource.java index bc0117b7f3..cbdf808dfc 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentResource.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppDeploymentResource.java @@ -13,11 +13,16 @@ import java.util.List; import static io.apicurio.registry.operator.Mapper.toYAML; +import static io.apicurio.registry.operator.resource.LabelDiscriminators.*; import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_APP; import static io.apicurio.registry.operator.resource.ResourceKey.APP_DEPLOYMENT_KEY; -@KubernetesDependent(labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" - + COMPONENT_APP, resourceDiscriminator = AppDeploymentDiscriminator.class) +// spotless:off +@KubernetesDependent( + labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" + COMPONENT_APP, + resourceDiscriminator = AppDeploymentDiscriminator.class +) +// spotless:on public class AppDeploymentResource extends CRUDKubernetesDependentResource { private static final Logger log = LoggerFactory.getLogger(AppDeploymentResource.class); @@ -47,7 +52,6 @@ protected Deployment desired(ApicurioRegistry3 primary, Context { + + private static final Logger log = LoggerFactory.getLogger(AppIngressResource.class); + + public AppIngressResource() { + super(Ingress.class); + } + + @Override + protected Ingress desired(ApicurioRegistry3 primary, Context context) { + + var i = APP_INGRESS_KEY.getFactory().apply(primary); + + var sOpt = context.getSecondaryResource(APP_SERVICE_KEY.getKlass(), + APP_SERVICE_KEY.getDiscriminator()); + sOpt.ifPresent(s -> withIngressRule(s, i, rule -> rule.setHost(getHost(COMPONENT_APP, primary)))); + + log.debug("Desired {} is {}", APP_INGRESS_KEY.getId(), toYAML(i)); + return i; + } +} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceDiscriminator.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceDiscriminator.java deleted file mode 100644 index 760aaf4080..0000000000 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceDiscriminator.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.apicurio.registry.operator.resource.app; - -import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.apicurio.registry.operator.resource.LabelDiscriminator; -import io.fabric8.kubernetes.api.model.Service; -import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator; - -import java.util.Map; - -import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_APP; - -public class AppServiceDiscriminator extends LabelDiscriminator { - - public static final ResourceDiscriminator INSTANCE = new AppServiceDiscriminator(); - - public AppServiceDiscriminator() { - // spotless:off - super(Map.of( - "app.kubernetes.io/name", "apicurio-registry", - "app.kubernetes.io/component", COMPONENT_APP - )); - // spotless:on - } -} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceResource.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceResource.java index 4e50e93868..0c8432cb23 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceResource.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/app/AppServiceResource.java @@ -9,11 +9,16 @@ import org.slf4j.LoggerFactory; import static io.apicurio.registry.operator.Mapper.toYAML; +import static io.apicurio.registry.operator.resource.LabelDiscriminators.*; import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_APP; import static io.apicurio.registry.operator.resource.ResourceKey.APP_SERVICE_KEY; -@KubernetesDependent(labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" - + COMPONENT_APP, resourceDiscriminator = AppServiceDiscriminator.class) +// spotless:off +@KubernetesDependent( + labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" + COMPONENT_APP, + resourceDiscriminator = AppServiceDiscriminator.class +) +// spotless:on public class AppServiceResource extends CRUDKubernetesDependentResource { private static final Logger log = LoggerFactory.getLogger(AppServiceResource.class); diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentDiscriminator.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentDiscriminator.java deleted file mode 100644 index 725cc97dd9..0000000000 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentDiscriminator.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.apicurio.registry.operator.resource.ui; - -import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.apicurio.registry.operator.resource.LabelDiscriminator; -import io.fabric8.kubernetes.api.model.apps.Deployment; -import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator; - -import java.util.Map; - -import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; - -public class UIDeploymentDiscriminator extends LabelDiscriminator { - - public static final ResourceDiscriminator INSTANCE = new UIDeploymentDiscriminator(); - - public UIDeploymentDiscriminator() { - // spotless:off - super(Map.of( - "app.kubernetes.io/name", "apicurio-registry", - "app.kubernetes.io/component", COMPONENT_UI - )); - // spotless:on - } -} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentResource.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentResource.java index b594a4071b..63b8dc7f78 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentResource.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIDeploymentResource.java @@ -1,6 +1,7 @@ package io.apicurio.registry.operator.resource.ui; import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; +import io.fabric8.kubernetes.api.model.EnvVar; import io.fabric8.kubernetes.api.model.EnvVarBuilder; import io.fabric8.kubernetes.api.model.apps.Deployment; import io.javaoperatorsdk.operator.api.reconciler.Context; @@ -10,14 +11,19 @@ import org.slf4j.LoggerFactory; import java.util.ArrayList; -import java.util.List; import static io.apicurio.registry.operator.Mapper.toYAML; +import static io.apicurio.registry.operator.resource.LabelDiscriminators.UIDeploymentDiscriminator; import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; import static io.apicurio.registry.operator.resource.ResourceKey.*; - -@KubernetesDependent(labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" - + COMPONENT_UI, resourceDiscriminator = UIDeploymentDiscriminator.class) +import static io.apicurio.registry.operator.util.IngressUtil.withIngressRule; + +// spotless:off +@KubernetesDependent( + labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" + COMPONENT_UI, + resourceDiscriminator = UIDeploymentDiscriminator.class +) +// spotless:on public class UIDeploymentResource extends CRUDKubernetesDependentResource { private static final Logger log = LoggerFactory.getLogger(UIDeploymentResource.class); @@ -31,16 +37,26 @@ protected Deployment desired(ApicurioRegistry3 primary, Context(List.of( + var uiEnv = new ArrayList(); + + var sOpt = context.getSecondaryResource(APP_SERVICE_KEY.getKlass(), + APP_SERVICE_KEY.getDiscriminator()); + sOpt.ifPresent(s -> { + var iOpt = context.getSecondaryResource(APP_INGRESS_KEY.getKlass(), + APP_INGRESS_KEY.getDiscriminator()); + iOpt.ifPresent(i -> withIngressRule(s, i, rule -> { // spotless:off - new EnvVarBuilder().withName("REGISTRY_API_URL").withValue("TODO").build() + uiEnv.add(new EnvVarBuilder() + .withName("REGISTRY_API_URL") + .withValue("http://%s/apis/registry/v3".formatted(rule.getHost())) + .build()); // spotless:on - )); + })); + }); d.getSpec().getTemplate().getSpec().getContainers().get(0).setEnv(uiEnv); log.debug("Desired {} is {}", UI_DEPLOYMENT_KEY.getId(), toYAML(d)); - return d; } } diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIIngressResource.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIIngressResource.java new file mode 100644 index 0000000000..1610a26aff --- /dev/null +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIIngressResource.java @@ -0,0 +1,44 @@ +package io.apicurio.registry.operator.resource.ui; + +import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; +import io.fabric8.kubernetes.api.model.networking.v1.Ingress; +import io.javaoperatorsdk.operator.api.reconciler.Context; +import io.javaoperatorsdk.operator.processing.dependent.kubernetes.CRUDKubernetesDependentResource; +import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static io.apicurio.registry.operator.Mapper.toYAML; +import static io.apicurio.registry.operator.resource.LabelDiscriminators.*; +import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; +import static io.apicurio.registry.operator.resource.ResourceKey.UI_INGRESS_KEY; +import static io.apicurio.registry.operator.resource.ResourceKey.UI_SERVICE_KEY; +import static io.apicurio.registry.operator.util.IngressUtil.getHost; +import static io.apicurio.registry.operator.util.IngressUtil.withIngressRule; + +// spotless:off +@KubernetesDependent( + labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" + COMPONENT_UI, + resourceDiscriminator = UIIngressDiscriminator.class +) +// spotless:on +public class UIIngressResource extends CRUDKubernetesDependentResource { + + private static final Logger log = LoggerFactory.getLogger(UIIngressResource.class); + + public UIIngressResource() { + super(Ingress.class); + } + + @Override + protected Ingress desired(ApicurioRegistry3 primary, Context context) { + + var i = UI_INGRESS_KEY.getFactory().apply(primary); + + var sOpt = context.getSecondaryResource(UI_SERVICE_KEY.getKlass(), UI_SERVICE_KEY.getDiscriminator()); + sOpt.ifPresent(s -> withIngressRule(s, i, rule -> rule.setHost(getHost(COMPONENT_UI, primary)))); + + log.debug("Desired {} is {}", UI_INGRESS_KEY.getId(), toYAML(i)); + return i; + } +} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceDiscriminator.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceDiscriminator.java deleted file mode 100644 index ab2977cb1a..0000000000 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceDiscriminator.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.apicurio.registry.operator.resource.ui; - -import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.apicurio.registry.operator.resource.LabelDiscriminator; -import io.fabric8.kubernetes.api.model.Service; -import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator; - -import java.util.Map; - -import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; - -public class UIServiceDiscriminator extends LabelDiscriminator { - - public static ResourceDiscriminator INSTANCE = new UIServiceDiscriminator(); - - public UIServiceDiscriminator() { - // spotless:off - super(Map.of( - "app.kubernetes.io/name", "apicurio-registry", - "app.kubernetes.io/component", COMPONENT_UI - )); - // spotless:on - } -} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceResource.java b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceResource.java index d1cfc48cc2..e706e4121e 100644 --- a/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceResource.java +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/resource/ui/UIServiceResource.java @@ -9,11 +9,16 @@ import org.slf4j.LoggerFactory; import static io.apicurio.registry.operator.Mapper.toYAML; +import static io.apicurio.registry.operator.resource.LabelDiscriminators.*; import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; import static io.apicurio.registry.operator.resource.ResourceKey.UI_SERVICE_KEY; -@KubernetesDependent(labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" - + COMPONENT_UI, resourceDiscriminator = UIServiceDiscriminator.class) +// spotless:off +@KubernetesDependent( + labelSelector = "app.kubernetes.io/name=apicurio-registry,app.kubernetes.io/component=" + COMPONENT_UI, + resourceDiscriminator = UIServiceDiscriminator.class +) +// spotless:on public class UIServiceResource extends CRUDKubernetesDependentResource { private static final Logger log = LoggerFactory.getLogger(UIServiceResource.class); diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/util/IngressUtil.java b/operator/controller/src/main/java/io/apicurio/registry/operator/util/IngressUtil.java new file mode 100644 index 0000000000..24878b4a45 --- /dev/null +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/util/IngressUtil.java @@ -0,0 +1,60 @@ +package io.apicurio.registry.operator.util; + +import io.apicurio.registry.operator.OperatorException; +import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; +import io.fabric8.kubernetes.api.model.Service; +import io.fabric8.kubernetes.api.model.networking.v1.HTTPIngressPath; +import io.fabric8.kubernetes.api.model.networking.v1.Ingress; +import io.fabric8.kubernetes.api.model.networking.v1.IngressRule; +import org.eclipse.microprofile.config.ConfigProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.function.Consumer; + +import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_APP; +import static io.apicurio.registry.operator.resource.ResourceFactory.COMPONENT_UI; +import static io.apicurio.registry.operator.util.Util.isBlank; + +public class IngressUtil { + + private static final Logger log = LoggerFactory.getLogger(IngressUtil.class); + + private IngressUtil() { + } + + public static String getHost(String component, ApicurioRegistry3 p) { + String host = null; + if (COMPONENT_APP.equals(component)) { + if (!isBlank(p.getSpec().getApp().getHost())) { + host = p.getSpec().getApp().getHost(); + } + } else if (COMPONENT_UI.equals(component)) { + if (!isBlank(p.getSpec().getUi().getHost())) { + host = p.getSpec().getUi().getHost(); + } + } else { + throw new OperatorException("Unexpected value: " + component); + } + if (host == null) { + var defaultBaseHost = ConfigProvider.getConfig() + .getOptionalValue("apicurio.operator.default-base-host", String.class).map(v -> "." + v) + .orElse(""); + host = "%s-%s.%s%s".formatted(p.getMetadata().getName(), component, + p.getMetadata().getNamespace(), defaultBaseHost); + } + log.debug("Host for component {} is {}", component, host); + return host; + } + + public static void withIngressRule(Service s, Ingress i, Consumer action) { + for (IngressRule rule : i.getSpec().getRules()) { + for (HTTPIngressPath path : rule.getHttp().getPaths()) { + if (s.getMetadata().getName().equals(path.getBackend().getService().getName())) { + action.accept(rule); + return; + } + } + } + } +} diff --git a/operator/controller/src/main/java/io/apicurio/registry/operator/util/Util.java b/operator/controller/src/main/java/io/apicurio/registry/operator/util/Util.java new file mode 100644 index 0000000000..140edec539 --- /dev/null +++ b/operator/controller/src/main/java/io/apicurio/registry/operator/util/Util.java @@ -0,0 +1,11 @@ +package io.apicurio.registry.operator.util; + +public class Util { + + private Util() { + } + + public static boolean isBlank(String value) { + return value == null || value.isBlank(); + } +} diff --git a/operator/controller/src/main/resources/k8s/default/app.ingress.yaml b/operator/controller/src/main/resources/k8s/default/app.ingress.yaml new file mode 100644 index 0000000000..aa9235a6d6 --- /dev/null +++ b/operator/controller/src/main/resources/k8s/default/app.ingress.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: { } +spec: + rules: + - host: placeholder-app.cluster.example + http: + paths: + - backend: + service: + name: PLACEHOLDER_SERVICE_NAME + port: + name: http + path: / + pathType: Prefix diff --git a/operator/controller/src/main/resources/k8s/default/ui.ingress.yaml b/operator/controller/src/main/resources/k8s/default/ui.ingress.yaml new file mode 100644 index 0000000000..1ad9e64473 --- /dev/null +++ b/operator/controller/src/main/resources/k8s/default/ui.ingress.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: { } +spec: + rules: + - host: placeholder-ui.cluster.example + http: + paths: + - backend: + service: + name: PLACEHOLDER_SERVICE_NAME + port: + name: http + path: / + pathType: Prefix diff --git a/operator/controller/src/main/resources/k8s/examples/example-cr.yml b/operator/controller/src/main/resources/k8s/examples/simple.apicurioregistry3.yaml similarity index 69% rename from operator/controller/src/main/resources/k8s/examples/example-cr.yml rename to operator/controller/src/main/resources/k8s/examples/simple.apicurioregistry3.yaml index 8a6b545f4d..53e6d43ef7 100644 --- a/operator/controller/src/main/resources/k8s/examples/example-cr.yml +++ b/operator/controller/src/main/resources/k8s/examples/simple.apicurioregistry3.yaml @@ -1,5 +1,5 @@ apiVersion: registry.apicur.io/v1 kind: ApicurioRegistry3 metadata: - name: example-apicurioregistry3 + name: simple spec: {} diff --git a/operator/controller/src/test/java/io/apicurio/registry/operator/it/ITBase.java b/operator/controller/src/test/java/io/apicurio/registry/operator/it/ITBase.java index 5ab5e54a0a..ca026f587d 100644 --- a/operator/controller/src/test/java/io/apicurio/registry/operator/it/ITBase.java +++ b/operator/controller/src/test/java/io/apicurio/registry/operator/it/ITBase.java @@ -20,11 +20,7 @@ import jakarta.enterprise.util.TypeLiteral; import org.awaitility.Awaitility; import org.eclipse.microprofile.config.ConfigProvider; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.TestInfo; +import org.junit.jupiter.api.*; import java.io.FileInputStream; import java.time.Duration; @@ -36,6 +32,8 @@ public class ITBase { public static final String DEPLOYMENT_TARGET = "test.operator.deployment-target"; public static final String OPERATOR_DEPLOYMENT_PROP = "test.operator.deployment"; + public static final String INGRESS_HOST_PROP = "test.operator.ingress-host"; + public static final String INGRESS_SKIP_PROP = "test.operator.ingress-skip"; public static final String CLEANUP = "test.operator.cleanup"; public static final String GENERATED_RESOURCES_FOLDER = "target/kubernetes/"; public static final String CRD_FILE = "../model/target/classes/META-INF/fabric8/apicurioregistries3.registry.apicur.io-v1.yml"; @@ -48,6 +46,8 @@ public enum OperatorDeployment { protected static Instance> reconcilers; protected static QuarkusConfigurationService configuration; protected static KubernetesClient client; + protected static PortForwardManager portForwardManager; + protected static IngressManager ingressManager; protected static String deploymentTarget; protected static String namespace; protected static boolean cleanup; @@ -71,6 +71,9 @@ public static void before() throws Exception { createCRDs(); createNamespace(); + portForwardManager = new PortForwardManager(client, namespace); + ingressManager = new IngressManager(client, namespace); + if (operatorDeployment == OperatorDeployment.remote) { createGeneratedResources(); } else { @@ -103,9 +106,16 @@ private static void createGeneratedResources() throws Exception { resources.getItems().stream().forEach(r -> { if (r.getKind().equals("ClusterRoleBinding") && r instanceof ClusterRoleBinding) { var crb = (ClusterRoleBinding) r; - crb.getSubjects().stream().forEach(s -> s.setNamespace(getNamespace())); + crb.getSubjects().stream().forEach(s -> s.setNamespace(namespace)); + // TODO: We need to patch the generated resources, because the referenced ClusterRole name + // is + // wrong. + if ("apicurioregistry3reconciler-cluster-role-binding" + .equals(crb.getMetadata().getName())) { + crb.getRoleRef().setName("apicurioregistry3reconciler-cluster-role"); + } } - client.resource(r).inNamespace(getNamespace()).createOrReplace(); + client.resource(r).inNamespace(namespace).createOrReplace(); }); } } @@ -119,9 +129,9 @@ private static void cleanGeneratedResources() throws Exception { resources.getItems().stream().forEach(r -> { if (r.getKind().equals("ClusterRoleBinding") && r instanceof ClusterRoleBinding) { var crb = (ClusterRoleBinding) r; - crb.getSubjects().stream().forEach(s -> s.setNamespace(getNamespace())); + crb.getSubjects().stream().forEach(s -> s.setNamespace(namespace)); } - client.resource(r).inNamespace(getNamespace()).delete(); + client.resource(r).inNamespace(namespace).delete(); }); } } @@ -166,8 +176,8 @@ private static void calculateNamespace() { } private static void setDefaultAwaitilityTimings() { - Awaitility.setDefaultPollInterval(Duration.ofSeconds(1)); - Awaitility.setDefaultTimeout(Duration.ofSeconds(360)); + Awaitility.setDefaultPollInterval(Duration.ofSeconds(5)); + Awaitility.setDefaultTimeout(Duration.ofSeconds(5 * 60)); } @AfterEach @@ -185,7 +195,7 @@ public void cleanup() { @AfterAll public static void after() throws Exception { - + portForwardManager.stop(); if (operatorDeployment == OperatorDeployment.local) { Log.info("Stopping Operator"); operator.stop(); @@ -203,8 +213,4 @@ public static void after() throws Exception { } client.close(); } - - public static String getNamespace() { - return namespace; - } } diff --git a/operator/controller/src/test/java/io/apicurio/registry/operator/it/IngressManager.java b/operator/controller/src/test/java/io/apicurio/registry/operator/it/IngressManager.java new file mode 100644 index 0000000000..cfcecef57d --- /dev/null +++ b/operator/controller/src/test/java/io/apicurio/registry/operator/it/IngressManager.java @@ -0,0 +1,87 @@ +package io.apicurio.registry.operator.it; + +import io.apicurio.registry.operator.OperatorException; +import io.fabric8.kubernetes.client.KubernetesClient; +import io.restassured.specification.RequestSpecification; +import org.eclipse.microprofile.config.ConfigProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Optional; +import java.util.UUID; + +import static io.apicurio.registry.operator.it.ITBase.INGRESS_HOST_PROP; +import static io.apicurio.registry.operator.it.ITBase.INGRESS_SKIP_PROP; +import static io.restassured.RestAssured.given; +import static org.assertj.core.api.Assertions.assertThat; + +public class IngressManager { + + private static final Logger log = LoggerFactory.getLogger(IngressManager.class); + + private final KubernetesClient k8sClient; + + private final String namespace; + + public IngressManager(KubernetesClient k8sClient, String namespace) { + this.k8sClient = k8sClient; + this.namespace = namespace; + if (isSkipIngress()) { + log.warn("Ingress testing is skipped. This is not recommended."); + } + } + + public String getIngressHost(String prefix) { + var rand = UUID.randomUUID().toString().substring(0, 6); + return prefix + "." + rand + "." + namespace + getBaseIngressHost().map(v -> "." + v).orElse(""); + } + + private static boolean isSkipIngress() { + return ConfigProvider.getConfig().getOptionalValue(INGRESS_SKIP_PROP, Boolean.class).orElse(false); + } + + private static Optional getBaseIngressHost() { + return ConfigProvider.getConfig().getOptionalValue(INGRESS_HOST_PROP, String.class); + } + + public RequestSpecification startHttpRequest(String ingressName) { + if (isSkipIngress()) { + throw new OperatorException("Ingress tests are not supported."); + } + + var ingress = k8sClient.network().v1().ingresses().inNamespace(namespace).withName(ingressName).get(); + assertThat(ingress).isNotNull(); + + String host = null; + if (ingress.getSpec().getRules().size() == 1) { + host = ingress.getSpec().getRules().get(0).getHost(); + } + + String loadBalancerIP = null; + if (!ingress.getStatus().getLoadBalancer().getIngress().isEmpty()) { + loadBalancerIP = ingress.getStatus().getLoadBalancer().getIngress().get(0).getIp(); + } + + log.debug("Ingress {} host: {}", ingressName, host); + log.debug("Ingress {} loadBalancerIP: {}", ingressName, loadBalancerIP); + + if (host != null) { + if (loadBalancerIP != null) { + // spotless:off + return given() + .baseUri("http://" + loadBalancerIP) + .port(80) + .header("Host", host); + // spotless:on + } else { + // spotless:off + return given() + .baseUri("http://" + host) + .port(80); + // spotless:on + } + } else { + throw new OperatorException("Ingress " + ingressName + " does not have a single host."); + } + } +} diff --git a/operator/controller/src/test/java/io/apicurio/registry/operator/it/PortForwardManager.java b/operator/controller/src/test/java/io/apicurio/registry/operator/it/PortForwardManager.java new file mode 100644 index 0000000000..653bb443f9 --- /dev/null +++ b/operator/controller/src/test/java/io/apicurio/registry/operator/it/PortForwardManager.java @@ -0,0 +1,46 @@ +package io.apicurio.registry.operator.it; + +import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.LocalPortForward; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class PortForwardManager { + + private static final Logger log = LoggerFactory.getLogger(PortForwardManager.class); + + private final KubernetesClient k8sClient; + + private final String namespace; + + private int nextLocalPort = 55001; + + private final Map portForwardMap = new HashMap<>(); + + public PortForwardManager(KubernetesClient k8sClient, String namespace) { + this.k8sClient = k8sClient; + this.namespace = namespace; + } + + public int startPortForward(String targetService, int targetPort) { + int localPort = nextLocalPort++; + var pf = k8sClient.services().inNamespace(namespace).withName(targetService).portForward(targetPort, + localPort); + portForwardMap.put(localPort, pf); + return localPort; + } + + public void stop() { + portForwardMap.values().forEach(pf -> { + try { + pf.close(); + } catch (IOException ex) { + log.error("Could not close port forward " + pf, ex); + } + }); + } +} diff --git a/operator/controller/src/test/java/io/apicurio/registry/operator/it/SmokeITTest.java b/operator/controller/src/test/java/io/apicurio/registry/operator/it/SmokeITTest.java index 1a55a92d86..01cd2198fd 100644 --- a/operator/controller/src/test/java/io/apicurio/registry/operator/it/SmokeITTest.java +++ b/operator/controller/src/test/java/io/apicurio/registry/operator/it/SmokeITTest.java @@ -1,44 +1,235 @@ package io.apicurio.registry.operator.it; import io.apicurio.registry.operator.api.v1.ApicurioRegistry3; -import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.apicurio.registry.operator.resource.ResourceFactory; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.EnvVar; +import io.fabric8.kubernetes.api.model.apps.Deployment; import io.quarkus.test.junit.QuarkusTest; +import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.net.URI; + +import static io.apicurio.registry.operator.resource.ResourceFactory.UI_CONTAINER_NAME; +import static io.restassured.RestAssured.given; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; @QuarkusTest public class SmokeITTest extends ITBase { + private static final Logger log = LoggerFactory.getLogger(SmokeITTest.class); + @Test void demoDeployment() { - // Arrange - var registry = new ApicurioRegistry3(); - var meta = new ObjectMeta(); - meta.setName("demo"); - meta.setNamespace(getNamespace()); - registry.setMetadata(meta); - // Act - client.resources(ApicurioRegistry3.class).inNamespace(getNamespace()).create(registry); + var registry = ResourceFactory.deserialize("/k8s/examples/simple.apicurioregistry3.yaml", + ApicurioRegistry3.class); + registry.getMetadata().setNamespace(namespace); + registry.getSpec().getApp().setHost(ingressManager.getIngressHost("app")); + registry.getSpec().getUi().setHost(ingressManager.getIngressHost("ui")); + + client.resource(registry).create(); // Deployments await().ignoreExceptions().until(() -> { - assertThat(client.apps().deployments().inNamespace(getNamespace()).withName("demo-app-deployment") - .get().getStatus().getReadyReplicas()).isEqualTo(1); - assertThat(client.apps().deployments().inNamespace(getNamespace()).withName("demo-ui-deployment") - .get().getStatus().getReadyReplicas()).isEqualTo(1); + assertThat(client.apps().deployments().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-deployment").get().getStatus() + .getReadyReplicas()).isEqualTo(1); + assertThat(client.apps().deployments().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-deployment").get().getStatus() + .getReadyReplicas()).isEqualTo(1); return true; }); // Services await().ignoreExceptions().until(() -> { - assertThat(client.services().inNamespace(getNamespace()).withName("demo-app-service").get() - .getSpec().getClusterIP()).isNotBlank(); - assertThat(client.services().inNamespace(getNamespace()).withName("demo-ui-service").get() - .getSpec().getClusterIP()).isNotBlank(); + assertThat(client.services().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-service").get().getSpec() + .getClusterIP()).isNotBlank(); + assertThat(client.services().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-service").get().getSpec() + .getClusterIP()).isNotBlank(); + return true; + }); + + // Ingresses + await().ignoreExceptions().until(() -> { + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-ingress").get().getSpec().getRules() + .get(0).getHost()).isEqualTo(registry.getSpec().getApp().getHost()); + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-ingress").get().getSpec().getRules() + .get(0).getHost()).isEqualTo(registry.getSpec().getUi().getHost()); + return true; + }); + } + + @Test + void testService() { + + var registry = ResourceFactory.deserialize("/k8s/examples/simple.apicurioregistry3.yaml", + ApicurioRegistry3.class); + registry.getMetadata().setNamespace(namespace); + registry.getSpec().getApp().setHost(ingressManager.getIngressHost("app")); + registry.getSpec().getUi().setHost(ingressManager.getIngressHost("ui")); + + client.resource(registry).create(); + + // Wait for Services + await().ignoreExceptions().until(() -> { + assertThat(client.services().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-service").get().getSpec() + .getClusterIP()).isNotBlank(); + assertThat(client.services().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-service").get().getSpec() + .getClusterIP()).isNotBlank(); + return true; + }); + + int appServicePort = portForwardManager + .startPortForward(registry.getMetadata().getName() + "-app-service", 8080); + + await().ignoreExceptions().until(() -> { + given().get(new URI("http://localhost:" + appServicePort + "/apis/registry/v3/system/info")) + .then().statusCode(200); + return true; + }); + + int uiServicePort = portForwardManager + .startPortForward(registry.getMetadata().getName() + "-ui-service", 8080); + + await().ignoreExceptions().until(() -> { + given().get(new URI("http://localhost:" + uiServicePort + "/config.js")).then().statusCode(200); + return true; + }); + } + + @Test + @DisabledIfSystemProperty(named = INGRESS_SKIP_PROP, matches = "true") + void testIngress() { + + var registry = ResourceFactory.deserialize("/k8s/examples/simple.apicurioregistry3.yaml", + ApicurioRegistry3.class); + registry.getMetadata().setNamespace(namespace); + registry.getSpec().getApp().setHost(ingressManager.getIngressHost("app")); + registry.getSpec().getUi().setHost(ingressManager.getIngressHost("ui")); + + client.resource(registry).create(); + + // Wait for Ingresses + await().untilAsserted(() -> { + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-ingress").get()).isNotNull(); + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-ingress").get()).isNotNull(); + }); + + await().ignoreExceptions().until(() -> { + ingressManager.startHttpRequest(registry.getMetadata().getName() + "-app-ingress") + .basePath("/apis/registry/v3/system/info").get().then().statusCode(200); + return true; + }); + + await().ignoreExceptions().until(() -> { + ingressManager.startHttpRequest(registry.getMetadata().getName() + "-ui-ingress") + .basePath("/config.js").get().then().statusCode(200); return true; }); } + + @Test + void testEmptyHostDisablesIngress() { + + var registry = ResourceFactory.deserialize("/k8s/examples/simple.apicurioregistry3.yaml", + ApicurioRegistry3.class); + registry.getMetadata().setNamespace(namespace); + registry.getSpec().getApp().setHost(ingressManager.getIngressHost("app")); + registry.getSpec().getUi().setHost(ingressManager.getIngressHost("ui")); + + client.resource(registry).create(); + + // Wait for Ingresses + await().untilAsserted(() -> { + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-ingress").get()).isNotNull(); + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-ingress").get()).isNotNull(); + }); + + // Check that REGISTRY_API_URL is set + var uiDeployment = client.apps().deployments().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-deployment").get(); + verify_REGISTRY_API_URL_isSet(registry, uiDeployment); + + // Disable host and therefore Ingress + registry.getSpec().getApp().setHost(""); + registry.getSpec().getUi().setHost(""); + + // TODO: The remote test does not work properly. As a workaround the CR will be deleted and recreated + // instead of updated: + // client.resource(registry).update(); + client.resource(registry).delete(); + await().untilAsserted(() -> { + assertThat(client.resource(registry).get()).isNull(); + }); + client.resource(registry).create(); + + await().untilAsserted(() -> { + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-ingress").get()).isNull(); + }); + await().untilAsserted(() -> { + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-ingress").get()).isNull(); + }); + + uiDeployment = client.apps().deployments().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-deployment").get(); + assertThat(uiDeployment).isNotNull(); + // spotless:off + assertThat(uiDeployment.getSpec().getTemplate().getSpec().getContainers()) + .filteredOn(c -> UI_CONTAINER_NAME.equals(c.getName())) + .flatMap(Container::getEnv) + .filteredOn(e -> "REGISTRY_API_URL".equals(e.getName())) + .isEmpty(); + // spotless:on + + // Enable again + registry.getSpec().getApp().setHost(ingressManager.getIngressHost("app")); + registry.getSpec().getUi().setHost(ingressManager.getIngressHost("ui")); + client.resource(registry).update(); + + // Verify Ingresses are back + await().untilAsserted(() -> { + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-app-ingress").get()).isNotNull(); + assertThat(client.network().v1().ingresses().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-ingress").get()).isNotNull(); + }); + + // Check that REGISTRY_API_URL is set again + uiDeployment = client.apps().deployments().inNamespace(namespace) + .withName(registry.getMetadata().getName() + "-ui-deployment").get(); + verify_REGISTRY_API_URL_isSet(registry, uiDeployment); + } + + private void verify_REGISTRY_API_URL_isSet(ApicurioRegistry3 registry, Deployment deployment) { + // spotless:off + assertThat(deployment).isNotNull(); + assertThat(deployment.getSpec().getTemplate().getSpec().getContainers()) + .filteredOn(c -> UI_CONTAINER_NAME.equals(c.getName())) + .flatMap(Container::getEnv) + .filteredOn(e -> "REGISTRY_API_URL".equals(e.getName())) + .hasSize(1) + .map(EnvVar::getValue) + .first() + .asInstanceOf(InstanceOfAssertFactories.STRING) + .startsWith("http://" + registry.getSpec().getApp().getHost()); + // spotless:on + } } diff --git a/operator/model/pom.xml b/operator/model/pom.xml index e3b9afc020..6a5b88a01a 100644 --- a/operator/model/pom.xml +++ b/operator/model/pom.xml @@ -52,4 +52,27 @@ + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + + + io.fabric8 + crd-generator-apt + + + + + + + + diff --git a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Spec.java b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Spec.java index e394de6f25..fc37ce65c3 100644 --- a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Spec.java +++ b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Spec.java @@ -1,17 +1,36 @@ package io.apicurio.registry.operator.api.v1; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.JsonDeserializer.None; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.model.KubernetesResource; -import lombok.Getter; -import lombok.Setter; +import lombok.*; -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ "configuration", "deployment" }) -@JsonDeserialize(using = JsonDeserializer.None.class) +@JsonInclude(Include.NON_NULL) +@JsonPropertyOrder({ "app", "ui" }) +@JsonDeserialize(using = None.class) +@NoArgsConstructor +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@Builder @Getter @Setter +@ToString public class ApicurioRegistry3Spec implements KubernetesResource { + + /** + * Configuration specific to Apicurio Registry backend component. + */ + @JsonProperty("app") + @JsonPropertyDescription("Configuration specific to Apicurio Registry backend component.") + @JsonSetter(nulls = Nulls.SKIP) + private ApicurioRegistry3SpecApp app = new ApicurioRegistry3SpecApp(); + + /** + * Configuration specific to Apicurio Registry UI component. + */ + @JsonProperty("ui") + @JsonPropertyDescription("Configuration specific to Apicurio Registry UI component.") + @JsonSetter(nulls = Nulls.SKIP) + private ApicurioRegistry3SpecUI ui = new ApicurioRegistry3SpecUI(); } diff --git a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3SpecApp.java b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3SpecApp.java new file mode 100644 index 0000000000..bcc082ea52 --- /dev/null +++ b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3SpecApp.java @@ -0,0 +1,40 @@ +package io.apicurio.registry.operator.api.v1; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.JsonDeserializer.None; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import lombok.*; + +@JsonInclude(Include.NON_NULL) +@JsonPropertyOrder({ "host" }) +@JsonDeserialize(using = None.class) +@NoArgsConstructor +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@Builder +@Getter +@Setter +@ToString +public class ApicurioRegistry3SpecApp implements KubernetesResource { + + /** + * Apicurio Registry backend component hostname. If the value is empty, the Operator will not create an + * Ingress resource for the component. IMPORTANT: If the Ingress already exists and the value becomes + * empty, the Ingress will be deleted. + *

+ * Note that the UI component requires a browser-accessible URL to the Apicurio Registry backend to work + * properly. If you create the Ingress manually, you have to manually set the REGISTRY_API_URL environment + * variable for the backend component. + */ + @JsonProperty("host") + @JsonPropertyDescription(""" + Apicurio Registry backend component hostname. + If the value is empty, the Operator will not create an Ingress resource for the component. + IMPORTANT: If the Ingress already exists and the value becomes empty, the Ingress will be deleted. + + Note that the UI component requires a browser-accessible URL to the Apicurio Registry backend to work properly. + If you create the Ingress manually, you have to manually set the REGISTRY_API_URL environment variable for the backend component.""") + @JsonSetter(nulls = Nulls.SKIP) + private String host; +} diff --git a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3SpecUI.java b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3SpecUI.java new file mode 100644 index 0000000000..bb37237f2e --- /dev/null +++ b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3SpecUI.java @@ -0,0 +1,33 @@ +package io.apicurio.registry.operator.api.v1; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.JsonDeserializer.None; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import lombok.*; + +@JsonInclude(Include.NON_NULL) +@JsonPropertyOrder({ "host" }) +@JsonDeserialize(using = None.class) +@NoArgsConstructor +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@Builder +@Getter +@Setter +@ToString +public class ApicurioRegistry3SpecUI implements KubernetesResource { + + /** + * Apicurio Registry UI component hostname. If the value is empty, the Operator will not create an Ingress + * resource for the component. IMPORTANT: If the Ingress already exists and the value becomes empty, the + * Ingress will be deleted. + */ + @JsonProperty("host") + @JsonPropertyDescription(""" + Apicurio Registry UI component hostname. + If the value is empty, the Operator will not create an Ingress resource for the component. + IMPORTANT: If the Ingress already exists and the value becomes empty, the Ingress will be deleted.""") + @JsonSetter(nulls = Nulls.SKIP) + private String host; +} diff --git a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Status.java b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Status.java index e6b5a14c4f..68a683564f 100644 --- a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Status.java +++ b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/ApicurioRegistry3Status.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonDeserializer.None; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.apicurio.registry.operator.api.v1.status.Conditions; import io.apicurio.registry.operator.api.v1.status.Info; @@ -20,7 +20,7 @@ @JsonInclude(Include.NON_NULL) @JsonPropertyOrder({ "conditions", "info" }) -@JsonDeserialize(using = JsonDeserializer.None.class) +@JsonDeserialize(using = None.class) @Getter @Setter @ToString diff --git a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/spec/Configuration.java b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/spec/Configuration.java deleted file mode 100644 index d2ab580ddd..0000000000 --- a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/spec/Configuration.java +++ /dev/null @@ -1,33 +0,0 @@ -package io.apicurio.registry.operator.api.v1.spec; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import io.fabric8.kubernetes.api.model.EnvVar; -import io.fabric8.kubernetes.api.model.KubernetesResource; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -@JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ "env" }) -@JsonDeserialize(using = JsonDeserializer.None.class) -@Getter -@Setter -public class Configuration implements KubernetesResource { - - /** - * Environment variables: List of additional environment variables that will be provided to the Apicurio - * Registry application. - */ - @JsonProperty("env") - @JsonPropertyDescription("Environment variables: \n List of additional environment variables that will be provided to the Apicurio Registry application.") - @JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) - private List env; - -} diff --git a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/status/Info.java b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/status/Info.java index 6189d4df5c..c8a896d855 100644 --- a/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/status/Info.java +++ b/operator/model/src/main/java/io/apicurio/registry/operator/api/v1/status/Info.java @@ -29,7 +29,7 @@ public class Info implements KubernetesResource { * Apicurio Registry UI URL */ @JsonProperty("uiHost") - @JsonPropertyDescription("Apicurio Registry UI URL") + @JsonPropertyDescription("Apicurio Registry UI base URL") @JsonSetter(nulls = Nulls.SKIP) private String uiHost; } diff --git a/pom.xml b/pom.xml index 9be5f5120b..c3ab9d49bf 100644 --- a/pom.xml +++ b/pom.xml @@ -148,7 +148,7 @@ 6.7.1 - 4.9.0 + 4.9.5 @@ -166,7 +166,7 @@ 75.1 3.25.5 4.0.2 - 2.45.1 + 2.46.0 1.6.3 1.4.4 @@ -198,7 +198,7 @@ 1.14.4 20240303 - 2.17.2 + 2.18.0 2.15.2 @@ -208,12 +208,11 @@ 1.18.34 - 1.4.199 1.17.1 1.2.1.Final 4.5.14 0.1.18.Final - 1.2.3 + 1.2.5 3.6.0 2.6.2.Final 3.3.1 @@ -240,10 +239,10 @@ 3.6.0 3.13.0 3.1.3 - 3.5.0 - 3.10.0 + 3.5.1 + 3.10.1 3.3.1 - 3.5.0 + 3.5.1 3.4.2 3.5.0 1.2.1 @@ -262,7 +261,7 @@ 1.7.1 - 1.20.1 + 1.20.2 1.9.0 21.1.2 2.0.7 @@ -1002,6 +1001,13 @@ ${maven.compiler.target} false false + + + org.projectlombok + lombok + ${lombok.version} + + @@ -1233,7 +1239,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.6 + 3.2.7 sign-artifacts @@ -1282,8 +1288,8 @@ - diff --git a/python-sdk/Makefile b/python-sdk/Makefile index 0ffce59259..ea330f0624 100644 --- a/python-sdk/Makefile +++ b/python-sdk/Makefile @@ -33,3 +33,5 @@ update: poetry add microsoft-kiota-http@latest poetry add microsoft-kiota-serialization-json@latest poetry add microsoft-kiota-serialization-text@latest + poetry add microsoft-kiota-serialization-form@latest + poetry add microsoft-kiota-serialization-multipart@latest diff --git a/python-sdk/kiota-gen.py b/python-sdk/kiota-gen.py index 3740898a75..ce6acf0830 100644 --- a/python-sdk/kiota-gen.py +++ b/python-sdk/kiota-gen.py @@ -37,7 +37,7 @@ def generate_kiota_client_files(setup_kwargs): kiota_release_name = f"{kiota_os_name}-{kiota_arch_name}.zip" # Detecting the Kiota version from a .csproj file so that it can be updated by automatic tool (e.g. Dependabot) kiota_version = ( - ET.parse(os.path.join(sys.path[0], "kiota-version.csproj")) + ET.parse(os.path.join(sys.path[0], "python-sdk.csproj")) .getroot() .find(".//*[@Include='Microsoft.OpenApi.Kiota.Builder']") .get("Version") diff --git a/python-sdk/kiota-version.csproj b/python-sdk/kiota-version.csproj deleted file mode 100644 index 24cd4cb6df..0000000000 --- a/python-sdk/kiota-version.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/python-sdk/poetry.lock b/python-sdk/poetry.lock index dac2dbfc77..4124f99e30 100644 --- a/python-sdk/poetry.lock +++ b/python-sdk/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "anyio" @@ -369,13 +369,13 @@ files = [ [[package]] name = "microsoft-kiota-abstractions" -version = "1.0.0" +version = "1.3.3" description = "Core abstractions for kiota generated libraries in Python" optional = false python-versions = "*" files = [ - {file = "microsoft_kiota_abstractions-1.0.0-py2.py3-none-any.whl", hash = "sha256:261126e795930698c710435928bfbacb90793dfc5235fbd2f4866ca03860035f"}, - {file = "microsoft_kiota_abstractions-1.0.0.tar.gz", hash = "sha256:fa20c9f7c499fbab95422c1e5b1cc01680686ba67b9d6887bc5178e701e0de0d"}, + {file = "microsoft_kiota_abstractions-1.3.3-py2.py3-none-any.whl", hash = "sha256:deced0b01249459426d4ed45c8ab34e19250e514d4d05ce84c08893058ae06a1"}, + {file = "microsoft_kiota_abstractions-1.3.3.tar.gz", hash = "sha256:3cc01832a2e6dc6094c4e1abf7cbef3849a87d818a3b9193ad6c83a9f88e14ff"}, ] [package.dependencies] @@ -385,13 +385,13 @@ std-uritemplate = ">=0.0.38" [[package]] name = "microsoft-kiota-http" -version = "1.2.1" +version = "1.3.3" description = "Kiota http request adapter implementation for httpx library" optional = false python-versions = "*" files = [ - {file = "microsoft_kiota_http-1.2.1-py2.py3-none-any.whl", hash = "sha256:9cadd2a36d0f933d59059814b4b8ba7fabaa28f7c2829e12951ce9e38d45f0cd"}, - {file = "microsoft_kiota_http-1.2.1.tar.gz", hash = "sha256:d0dcff25cf456b8a3b23e4fd1866ffd669aaa0b9b26ef562ea58f698e4b7ad50"}, + {file = "microsoft_kiota_http-1.3.3-py2.py3-none-any.whl", hash = "sha256:21109a34140bf42e18855b7cf983939b891ae30739f21a9ce045c3a715f325fd"}, + {file = "microsoft_kiota_http-1.3.3.tar.gz", hash = "sha256:0b40f37c6c158c2e5b2dffa963a7fc342d368c1a64b8cca08631ba19d0ff94a9"}, ] [package.dependencies] @@ -400,21 +400,50 @@ microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" opentelemetry-api = ">=1.20.0" opentelemetry-sdk = ">=1.20.0" +[[package]] +name = "microsoft-kiota-serialization-form" +version = "0.1.1" +description = "Implementation of Kiota Serialization Interfaces for URI-Form encoded serialization" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_serialization_form-0.1.1-py2.py3-none-any.whl", hash = "sha256:7a2da956edd3329ff74ec1a34eded910fd9cda57ce8c71f3797e359adc9993f7"}, + {file = "microsoft_kiota_serialization_form-0.1.1.tar.gz", hash = "sha256:f72dd50081250d1e49111682eccf620d3c2e335195d50c096b35ec5a5ef59a54"}, +] + +[package.dependencies] +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" +pendulum = ">=3.0.0" + [[package]] name = "microsoft-kiota-serialization-json" -version = "1.0.1" +version = "1.3.2" description = "Implementation of Kiota Serialization interfaces for JSON" optional = false python-versions = "*" files = [ - {file = "microsoft_kiota_serialization_json-1.0.1-py2.py3-none-any.whl", hash = "sha256:1b54602c6ec8185499213f6da24dcc90add2ffa5e328a61bdb50ddf8e1ba483b"}, - {file = "microsoft_kiota_serialization_json-1.0.1.tar.gz", hash = "sha256:1d93ecee5d31941e3bdfa3c0b319cfe629d4f59a95fb0fbe0b054f7dbdc0ff60"}, + {file = "microsoft_kiota_serialization_json-1.3.2-py2.py3-none-any.whl", hash = "sha256:def0021ee30f0acb25e65994720414567da8303d2e769d8cc4351a5c7eedd4a0"}, + {file = "microsoft_kiota_serialization_json-1.3.2.tar.gz", hash = "sha256:627b93f48f6887c3ffba23c7c85445dd6e82ba693b0b7f1540e9de29f3801014"}, ] [package.dependencies] microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" pendulum = ">=3.0.0b1" +[[package]] +name = "microsoft-kiota-serialization-multipart" +version = "0.1.0" +description = "Implementation of Kiota Serialization Interfaces for Multipart serialization" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_serialization_multipart-0.1.0-py2.py3-none-any.whl", hash = "sha256:ef183902e77807806b8a181cdde53ba5bc04c6c9bdb2f7d80f8bad5d720e0015"}, + {file = "microsoft_kiota_serialization_multipart-0.1.0.tar.gz", hash = "sha256:14e89e92582e6630ddbc70ac67b70bf189dacbfc41a96d3e1d10339e86c8dde5"}, +] + +[package.dependencies] +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" + [[package]] name = "microsoft-kiota-serialization-text" version = "1.0.0" @@ -894,4 +923,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "51770839a19013ed62bc37348e76a08fe77a61f57429dcbc0e436a560227ec08" +content-hash = "aa5d7bad91001e6a90ec0f61a07b7f084fba52609b45aca8d0f72adfece7769a" diff --git a/python-sdk/pyproject.toml b/python-sdk/pyproject.toml index 11b62239eb..3050ecb6b1 100644 --- a/python-sdk/pyproject.toml +++ b/python-sdk/pyproject.toml @@ -19,10 +19,12 @@ keywords = ["apicurio", "registry"] [tool.poetry.dependencies] python = "^3.9" -microsoft-kiota-abstractions = "^1.0.0" -microsoft-kiota-http = "^1.2.1" -microsoft-kiota-serialization-json = "^1.0.1" +microsoft-kiota-abstractions = "^1.3.3" +microsoft-kiota-http = "^1.3.3" +microsoft-kiota-serialization-json = "^1.3.2" microsoft-kiota-serialization-text = "^1.0.0" +microsoft-kiota-serialization-form = "^0.1.1" +microsoft-kiota-serialization-multipart = "^0.1.0" [tool.poetry.group.test.dependencies] pytest = "^7.3.1" diff --git a/python-sdk/python-sdk.csproj b/python-sdk/python-sdk.csproj new file mode 100644 index 0000000000..b5920735f1 --- /dev/null +++ b/python-sdk/python-sdk.csproj @@ -0,0 +1,12 @@ + + + + net8.0 + python_sdk + + + + + + + diff --git a/schema-util/common/src/main/java/io/apicurio/registry/content/refs/JsonPointerExternalReference.java b/schema-util/common/src/main/java/io/apicurio/registry/content/refs/JsonPointerExternalReference.java index baf883ac04..800f7f2037 100644 --- a/schema-util/common/src/main/java/io/apicurio/registry/content/refs/JsonPointerExternalReference.java +++ b/schema-util/common/src/main/java/io/apicurio/registry/content/refs/JsonPointerExternalReference.java @@ -2,6 +2,16 @@ public class JsonPointerExternalReference extends ExternalReference { + private static String toFullReference(String resource, String component) { + if (resource == null) { + return component; + } + if (component == null) { + return resource; + } + return resource + component; + } + /** * Constructor. * @@ -11,6 +21,10 @@ public JsonPointerExternalReference(String jsonPointer) { super(jsonPointer, resourceFrom(jsonPointer), componentFrom(jsonPointer)); } + public JsonPointerExternalReference(String resource, String component) { + super(toFullReference(resource, component), resource, component); + } + private static String componentFrom(String jsonPointer) { int idx = jsonPointer.indexOf('#'); if (idx == 0) { diff --git a/schema-util/json/pom.xml b/schema-util/json/pom.xml index 36e4e3de54..aee42c5b04 100644 --- a/schema-util/json/pom.xml +++ b/schema-util/json/pom.xml @@ -48,6 +48,10 @@ com.fasterxml.jackson.datatype jackson-datatype-json-org + + io.vertx + vertx-json-schema + org.projectlombok diff --git a/schema-util/json/src/main/java/io/apicurio/registry/content/dereference/JsonSchemaDereferencer.java b/schema-util/json/src/main/java/io/apicurio/registry/content/dereference/JsonSchemaDereferencer.java index 4eba43cf58..162689b5a1 100644 --- a/schema-util/json/src/main/java/io/apicurio/registry/content/dereference/JsonSchemaDereferencer.java +++ b/schema-util/json/src/main/java/io/apicurio/registry/content/dereference/JsonSchemaDereferencer.java @@ -1,5 +1,6 @@ package io.apicurio.registry.content.dereference; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -11,8 +12,16 @@ import com.fasterxml.jackson.module.paramnames.ParameterNamesModule; import io.apicurio.registry.content.ContentHandle; import io.apicurio.registry.content.TypedContent; -import io.apicurio.registry.types.ContentTypes; +import io.apicurio.registry.content.refs.JsonPointerExternalReference; +import io.vertx.core.json.JsonObject; +import io.vertx.json.schema.Draft; +import io.vertx.json.schema.JsonSchema; +import io.vertx.json.schema.JsonSchemaOptions; +import io.vertx.json.schema.impl.JsonRef; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -21,6 +30,9 @@ public class JsonSchemaDereferencer implements ContentDereferencer { private static final ObjectMapper objectMapper; + private static final Logger log = LoggerFactory.getLogger(JsonSchemaDereferencer.class); + private static final String idKey = "$id"; + private static final String schemaKey = "$schema"; static { objectMapper = new ObjectMapper(); @@ -35,8 +47,53 @@ public class JsonSchemaDereferencer implements ContentDereferencer { @Override public TypedContent dereference(TypedContent content, Map resolvedReferences) { - throw new DereferencingNotSupportedException( - "Content dereferencing is not supported for JSON Schema"); + // Here, when using rewrite, I need the new reference coordinates, using the full artifact coordinates + // and not just the reference name and the old name, to be able to do the re-write. + String id = null; + String schema = null; + + try { + JsonNode contentNode = objectMapper.readTree(content.getContent().content()); + id = contentNode.get(idKey).asText(); + schema = contentNode.get(schemaKey).asText(); + } catch (JsonProcessingException e) { + log.warn("No schema or id provided for schema"); + } + + JsonSchemaOptions jsonSchemaOptions = new JsonSchemaOptions().setBaseUri("http://localhost"); + + if (null != schema) { + jsonSchemaOptions.setDraft(Draft.fromIdentifier(schema)); + } + + Map lookups = new HashMap<>(); + resolveReferences(resolvedReferences, lookups); + JsonObject resolvedSchema = JsonRef.resolve(new JsonObject(content.getContent().content()), lookups); + + if (null != id) { + resolvedSchema.put(idKey, id); + } + + if (schema != null) { + resolvedSchema.put(schemaKey, schema); + } + + return TypedContent.create(ContentHandle.create(resolvedSchema.encodePrettily()), + content.getContentType()); + } + + private void resolveReferences(Map resolvedReferences, + Map lookups) { + resolvedReferences.forEach((referenceName, schema) -> { + JsonPointerExternalReference externalRef = new JsonPointerExternalReference(referenceName); + // Note: when adding to 'lookups', strip away the "component" part of the reference, because the + // vertx library is going to do the lookup ONLY by the resource name, excluding the component + lookups.computeIfAbsent(externalRef.getResource(), (key) -> { + JsonObject resolvedSchema = JsonRef.resolve(new JsonObject(schema.getContent().content()), + lookups); + return JsonSchema.of(resolvedSchema); + }); + }); } /** @@ -49,7 +106,7 @@ public TypedContent rewriteReferences(TypedContent content, Map JsonNode tree = objectMapper.readTree(content.getContent().content()); rewriteIn(tree, resolvedReferenceUrls); String converted = objectMapper.writeValueAsString(objectMapper.treeToValue(tree, Object.class)); - return TypedContent.create(ContentHandle.create(converted), ContentTypes.APPLICATION_JSON); + return TypedContent.create(ContentHandle.create(converted), content.getContentType()); } catch (Exception e) { return content; } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProvider.java index 3071f274d8..1fbd972be3 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProvider.java @@ -34,4 +34,6 @@ public interface ArtifactTypeUtilProvider { ContentDereferencer getContentDereferencer(); ReferenceFinder getReferenceFinder(); + + boolean supportsReferencesWithContext(); } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProviderFactory.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProviderFactory.java index 542f0517bb..aa0558595d 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProviderFactory.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ArtifactTypeUtilProviderFactory.java @@ -10,4 +10,6 @@ public interface ArtifactTypeUtilProviderFactory { List getAllArtifactTypeProviders(); + String getArtifactContentType(String type); + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AsyncApiArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AsyncApiArtifactTypeUtilProvider.java index cd15f1451e..c220e658bf 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AsyncApiArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AsyncApiArtifactTypeUtilProvider.java @@ -76,4 +76,9 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return new AsyncApiReferenceFinder(); } + + @Override + public boolean supportsReferencesWithContext() { + return true; + } } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AvroArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AvroArtifactTypeUtilProvider.java index a0d1465bbc..d2c43cbb43 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AvroArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/AvroArtifactTypeUtilProvider.java @@ -7,7 +7,7 @@ import io.apicurio.registry.content.dereference.ContentDereferencer; import io.apicurio.registry.content.extract.AvroContentExtractor; import io.apicurio.registry.content.extract.ContentExtractor; -import io.apicurio.registry.content.refs.JsonSchemaReferenceFinder; +import io.apicurio.registry.content.refs.AvroReferenceFinder; import io.apicurio.registry.content.refs.ReferenceFinder; import io.apicurio.registry.content.util.ContentTypeUtil; import io.apicurio.registry.rules.compatibility.AvroCompatibilityChecker; @@ -91,6 +91,12 @@ public ContentDereferencer getContentDereferencer() { @Override public ReferenceFinder getReferenceFinder() { - return new JsonSchemaReferenceFinder(); + return new AvroReferenceFinder(); } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/DefaultArtifactTypeUtilProviderImpl.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/DefaultArtifactTypeUtilProviderImpl.java index bc82e7f6ae..6c4759db43 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/DefaultArtifactTypeUtilProviderImpl.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/DefaultArtifactTypeUtilProviderImpl.java @@ -1,5 +1,8 @@ package io.apicurio.registry.types.provider; +import io.apicurio.registry.types.ArtifactType; +import io.apicurio.registry.types.ContentTypes; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -33,4 +36,22 @@ public List getAllArtifactTypes() { public List getAllArtifactTypeProviders() { return providers; } + + @Override + public String getArtifactContentType(String type) { + // The content-type will be different for protobuf artifacts, graphql artifacts, and XML artifacts + String contentType = ContentTypes.APPLICATION_JSON; + if (type.equals(ArtifactType.PROTOBUF)) { + contentType = ContentTypes.APPLICATION_PROTOBUF; + } + if (type.equals(ArtifactType.GRAPHQL)) { + contentType = ContentTypes.APPLICATION_GRAPHQL; + } + if (type.equals(ArtifactType.WSDL) || type.equals(ArtifactType.XSD) + || type.equals(ArtifactType.XML)) { + contentType = ContentTypes.APPLICATION_XML; + } + + return contentType; + } } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/GraphQLArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/GraphQLArtifactTypeUtilProvider.java index 342c912540..5f1c723c13 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/GraphQLArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/GraphQLArtifactTypeUtilProvider.java @@ -74,4 +74,10 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return NoOpReferenceFinder.INSTANCE; } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/JsonArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/JsonArtifactTypeUtilProvider.java index 4ff0af0df5..5ca65b62d3 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/JsonArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/JsonArtifactTypeUtilProvider.java @@ -4,8 +4,8 @@ import io.apicurio.registry.content.TypedContent; import io.apicurio.registry.content.canon.ContentCanonicalizer; import io.apicurio.registry.content.canon.JsonContentCanonicalizer; -import io.apicurio.registry.content.dereference.AsyncApiDereferencer; import io.apicurio.registry.content.dereference.ContentDereferencer; +import io.apicurio.registry.content.dereference.JsonSchemaDereferencer; import io.apicurio.registry.content.extract.ContentExtractor; import io.apicurio.registry.content.extract.JsonContentExtractor; import io.apicurio.registry.content.refs.JsonSchemaReferenceFinder; @@ -66,11 +66,17 @@ protected ContentExtractor createContentExtractor() { @Override public ContentDereferencer getContentDereferencer() { - return new AsyncApiDereferencer(); + return new JsonSchemaDereferencer(); } @Override public ReferenceFinder getReferenceFinder() { return new JsonSchemaReferenceFinder(); } + + @Override + public boolean supportsReferencesWithContext() { + return true; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/KConnectArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/KConnectArtifactTypeUtilProvider.java index a6348054a9..d546c7eeee 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/KConnectArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/KConnectArtifactTypeUtilProvider.java @@ -59,4 +59,10 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return NoOpReferenceFinder.INSTANCE; } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/OpenApiArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/OpenApiArtifactTypeUtilProvider.java index 245121485c..019f03a7eb 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/OpenApiArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/OpenApiArtifactTypeUtilProvider.java @@ -4,8 +4,8 @@ import io.apicurio.registry.content.TypedContent; import io.apicurio.registry.content.canon.ContentCanonicalizer; import io.apicurio.registry.content.canon.OpenApiContentCanonicalizer; -import io.apicurio.registry.content.dereference.AsyncApiDereferencer; import io.apicurio.registry.content.dereference.ContentDereferencer; +import io.apicurio.registry.content.dereference.OpenApiDereferencer; import io.apicurio.registry.content.extract.ContentExtractor; import io.apicurio.registry.content.extract.OpenApiContentExtractor; import io.apicurio.registry.content.refs.OpenApiReferenceFinder; @@ -69,11 +69,17 @@ protected ContentExtractor createContentExtractor() { @Override public ContentDereferencer getContentDereferencer() { - return new AsyncApiDereferencer(); + return new OpenApiDereferencer(); } @Override public ReferenceFinder getReferenceFinder() { return new OpenApiReferenceFinder(); } + + @Override + public boolean supportsReferencesWithContext() { + return true; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ProtobufArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ProtobufArtifactTypeUtilProvider.java index 1553a41c5a..04d1d9cf9c 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ProtobufArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/ProtobufArtifactTypeUtilProvider.java @@ -79,4 +79,10 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return new ProtobufReferenceFinder(); } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/WsdlArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/WsdlArtifactTypeUtilProvider.java index 55c5e3ff61..10ae62b25e 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/WsdlArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/WsdlArtifactTypeUtilProvider.java @@ -94,4 +94,10 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return NoOpReferenceFinder.INSTANCE; } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XmlArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XmlArtifactTypeUtilProvider.java index 0a57a9e6c7..b1bcac6504 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XmlArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XmlArtifactTypeUtilProvider.java @@ -98,4 +98,10 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return NoOpReferenceFinder.INSTANCE; } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XsdArtifactTypeUtilProvider.java b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XsdArtifactTypeUtilProvider.java index 53f823f69b..63528a15b1 100644 --- a/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XsdArtifactTypeUtilProvider.java +++ b/schema-util/util-provider/src/main/java/io/apicurio/registry/types/provider/XsdArtifactTypeUtilProvider.java @@ -93,4 +93,10 @@ public ContentDereferencer getContentDereferencer() { public ReferenceFinder getReferenceFinder() { return NoOpReferenceFinder.INSTANCE; } + + @Override + public boolean supportsReferencesWithContext() { + return false; + } + } diff --git a/serdes/kafka/jsonschema-serde/src/main/java/io/apicurio/registry/serde/jsonschema/JsonSchemaKafkaDeserializer.java b/serdes/kafka/jsonschema-serde/src/main/java/io/apicurio/registry/serde/jsonschema/JsonSchemaKafkaDeserializer.java index 98b6017a2f..103dcb853c 100644 --- a/serdes/kafka/jsonschema-serde/src/main/java/io/apicurio/registry/serde/jsonschema/JsonSchemaKafkaDeserializer.java +++ b/serdes/kafka/jsonschema-serde/src/main/java/io/apicurio/registry/serde/jsonschema/JsonSchemaKafkaDeserializer.java @@ -47,7 +47,7 @@ public void configure(Map configs, boolean isKey) { @Override public T deserialize(String topic, Headers headers, byte[] data) { - if (headers != null + if (serdeHeaders != null && headers != null && ((JsonSchemaDeserializer) delegatedDeserializer).getSpecificReturnClass() == null) { String javaType = serdeHeaders.getMessageType(headers); ((JsonSchemaDeserializer) delegatedDeserializer) diff --git a/ui/tests/package-lock.json b/ui/tests/package-lock.json index f4c1357292..c4c365b87c 100644 --- a/ui/tests/package-lock.json +++ b/ui/tests/package-lock.json @@ -11,9 +11,9 @@ "devDependencies": { "@apicurio/eslint-config": "0.3.0", "@playwright/test": "1.47.2", - "@types/node": "22.7.3", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", + "@types/node": "22.7.4", + "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/parser": "8.8.0", "eslint": "8.57.1", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-react-refresh": "0.4.12" @@ -310,25 +310,25 @@ } }, "node_modules/@types/node": { - "version": "22.7.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", - "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "version": "22.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", + "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", "dev": true, "dependencies": { "undici-types": "~6.19.2" } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", - "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", + "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/type-utils": "8.7.0", - "@typescript-eslint/utils": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/type-utils": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -352,15 +352,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", - "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", + "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "debug": "^4.3.4" }, "engines": { @@ -380,13 +380,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", - "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", + "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0" + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -397,13 +397,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", - "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", + "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/utils": "8.8.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -421,9 +421,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", - "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", + "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -434,13 +434,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", - "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", + "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -486,15 +486,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", - "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", + "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0" + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -508,12 +508,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", - "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", + "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/types": "8.8.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1995,25 +1995,25 @@ } }, "@types/node": { - "version": "22.7.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", - "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "version": "22.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", + "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", "dev": true, "requires": { "undici-types": "~6.19.2" } }, "@typescript-eslint/eslint-plugin": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", - "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", + "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/type-utils": "8.7.0", - "@typescript-eslint/utils": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/type-utils": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2021,54 +2021,54 @@ } }, "@typescript-eslint/parser": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", - "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", + "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", - "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", + "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", "dev": true, "requires": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0" + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0" } }, "@typescript-eslint/type-utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", - "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", + "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/utils": "8.8.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/types": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", - "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", + "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", - "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", + "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", "dev": true, "requires": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2098,24 +2098,24 @@ } }, "@typescript-eslint/utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", - "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", + "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0" + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0" } }, "@typescript-eslint/visitor-keys": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", - "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", + "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", "dev": true, "requires": { - "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/types": "8.8.0", "eslint-visitor-keys": "^3.4.3" } }, diff --git a/ui/tests/package.json b/ui/tests/package.json index d11a2cce9f..20439c58f7 100644 --- a/ui/tests/package.json +++ b/ui/tests/package.json @@ -13,9 +13,9 @@ "devDependencies": { "@apicurio/eslint-config": "0.3.0", "@playwright/test": "1.47.2", - "@types/node": "22.7.3", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", + "@types/node": "22.7.4", + "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/parser": "8.8.0", "eslint": "8.57.1", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-react-refresh": "0.4.12" diff --git a/ui/ui-app/.gitignore b/ui/ui-app/.gitignore index e67e11dbb4..cd2ead399b 100644 --- a/ui/ui-app/.gitignore +++ b/ui/ui-app/.gitignore @@ -1,2 +1,3 @@ /version.js /config.js +/public/kiota-wasm diff --git a/ui/ui-app/package-lock.json b/ui/ui-app/package-lock.json index d139a6226f..3cc17ceae6 100644 --- a/ui/ui-app/package-lock.json +++ b/ui/ui-app/package-lock.json @@ -19,11 +19,11 @@ "@microsoft/kiota-serialization-json": "1.0.0-preview.66", "@microsoft/kiota-serialization-multipart": "1.0.0-preview.44", "@microsoft/kiota-serialization-text": "1.0.0-preview.63", - "@patternfly/patternfly": "5.4.0", - "@patternfly/react-code-editor": "5.4.1", - "@patternfly/react-core": "5.4.0", + "@patternfly/patternfly": "5.4.1", + "@patternfly/react-code-editor": "5.4.3", + "@patternfly/react-core": "5.4.1", "@patternfly/react-icons": "5.4.0", - "@patternfly/react-table": "5.4.0", + "@patternfly/react-table": "5.4.1", "axios": "1.7.7", "buffer": "^6.0.3", "luxon": "3.5.0", @@ -37,6 +37,7 @@ }, "devDependencies": { "@apicurio/eslint-config": "0.3.0", + "@kiota-community/kiota-wasm": "^0.0.3", "@monaco-editor/react": "4.6.0", "@types/luxon": "3.4.2", "@types/pluralize": "0.0.33", @@ -44,7 +45,8 @@ "@types/react-dom": "18.3.0", "@typescript-eslint/eslint-plugin": "7.13.1", "@typescript-eslint/parser": "7.13.1", - "@vitejs/plugin-react-swc": "3.7.0", + "@vitejs/plugin-react-swc": "3.7.1", + "copyfiles": "^2.4.1", "eslint": "8.57.0", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-react-refresh": "0.4.7", @@ -844,6 +846,12 @@ "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==" }, + "node_modules/@kiota-community/kiota-wasm": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@kiota-community/kiota-wasm/-/kiota-wasm-0.0.3.tgz", + "integrity": "sha512-8p9VqWE1PPy7QEznJi7o9Q3LrK0G82u/JJqHp5MxcbdFqGEKYabuZLr95vnho/yIpvFA/LEYlZ/rCpMaLn9HOQ==", + "dev": true + }, "node_modules/@microsoft/kiota-abstractions": { "version": "1.0.0-preview.66", "resolved": "https://registry.npmjs.org/@microsoft/kiota-abstractions/-/kiota-abstractions-1.0.0-preview.66.tgz", @@ -976,17 +984,17 @@ } }, "node_modules/@patternfly/patternfly": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-5.4.0.tgz", - "integrity": "sha512-9B33M4N0/KDyss6NpCwAhz18za7R+sXYiFrUObhGoJ1Cmg06SeScVrEAjT4yJwAClWUlKh604Af9wE4D7IF8Lg==" + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-5.4.1.tgz", + "integrity": "sha512-0+KxsQJrFzOMANALW82BHAO7bSm9tEbG1RrOlGT23ME1CaBoetGSMRLymutvojn/b/EKfJIr5rLzQa+14Lvg2g==" }, "node_modules/@patternfly/react-code-editor": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@patternfly/react-code-editor/-/react-code-editor-5.4.1.tgz", - "integrity": "sha512-i1OqW+NPFPxn/BZYp1T9GUGM1du4REqFq6nURLvD2s0/rjb4Guu9pILWHMxOZASdBrlRXBRFcJUUhXdYrpf7pg==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@patternfly/react-code-editor/-/react-code-editor-5.4.3.tgz", + "integrity": "sha512-zcnbJpMzHgKG/Zi9lYc3iYS+R4J+/mlrjdHeV2FXy1qssMrl7ZCDuCck0eefPOcZWImQ8cTtNx/9cXhvG0iqLA==", "dependencies": { "@monaco-editor/react": "^4.6.0", - "@patternfly/react-core": "^5.4.0", + "@patternfly/react-core": "5.4.1", "@patternfly/react-icons": "^5.4.0", "@patternfly/react-styles": "^5.4.0", "react-dropzone": "14.2.3", @@ -998,9 +1006,9 @@ } }, "node_modules/@patternfly/react-core": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-5.4.0.tgz", - "integrity": "sha512-Tz2Y9V4G2pnwrylc/4/FyxIRFvxiA8BEBIG6UBwXxrstnJmJaHgAIy6QJdJmERzVx3GVDz6/rM0PnMqa5R6auQ==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-5.4.1.tgz", + "integrity": "sha512-PJjwN4OCR7jTdWKi0RzuFdtlSQ8gBR+0REczuDHHPW8ky0bs1cIcqGsn5p/b6OgPlztl3UaXqRYLsroiEMasOw==", "dependencies": { "@patternfly/react-icons": "^5.4.0", "@patternfly/react-styles": "^5.4.0", @@ -1029,11 +1037,11 @@ "integrity": "sha512-4ZE0s6LkX/0KsN0FOeogrDoj18m+BPA73YKnabZGB4SDRzrBNeBh2a6bSt546ZseEjkoJ+S81kOG0G8YckPQYg==" }, "node_modules/@patternfly/react-table": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-5.4.0.tgz", - "integrity": "sha512-HkXxVEPeI6nRVSUSHb5BungF41IfjB8W2VqaA3SX+6fGxQAW0e/Hb58ctUdPR2VJ/S2YZFcIcqCCWQtQEf+xKA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-5.4.1.tgz", + "integrity": "sha512-T05djy6YPqjbGWjpnwUs9oqup8oqqIOBnDOcThnHukgzlwnZvLNywgdoMR5XAKxTcIx/iBE1cu8ieETlITOGLw==", "dependencies": { - "@patternfly/react-core": "^5.4.0", + "@patternfly/react-core": "^5.4.1", "@patternfly/react-icons": "^5.4.0", "@patternfly/react-styles": "^5.4.0", "@patternfly/react-tokens": "^5.4.0", @@ -1282,14 +1290,14 @@ "integrity": "sha512-osJfqMCD3RU4PHTUmg8LQ1JIDmAEcAZi4qmPaJ8V7DG7U70vJoTKvKIDzvUk+JK34OqkanrFkWW871/IsmSU7g==" }, "node_modules/@swc/core": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.5.7.tgz", - "integrity": "sha512-U4qJRBefIJNJDRCCiVtkfa/hpiZ7w0R6kASea+/KLp+vkus3zcLSB8Ub8SvKgTIxjWpwsKcZlPf5nrv4ls46SQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.26.tgz", + "integrity": "sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.2", - "@swc/types": "0.1.7" + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.12" }, "engines": { "node": ">=10" @@ -1299,19 +1307,19 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.5.7", - "@swc/core-darwin-x64": "1.5.7", - "@swc/core-linux-arm-gnueabihf": "1.5.7", - "@swc/core-linux-arm64-gnu": "1.5.7", - "@swc/core-linux-arm64-musl": "1.5.7", - "@swc/core-linux-x64-gnu": "1.5.7", - "@swc/core-linux-x64-musl": "1.5.7", - "@swc/core-win32-arm64-msvc": "1.5.7", - "@swc/core-win32-ia32-msvc": "1.5.7", - "@swc/core-win32-x64-msvc": "1.5.7" + "@swc/core-darwin-arm64": "1.7.26", + "@swc/core-darwin-x64": "1.7.26", + "@swc/core-linux-arm-gnueabihf": "1.7.26", + "@swc/core-linux-arm64-gnu": "1.7.26", + "@swc/core-linux-arm64-musl": "1.7.26", + "@swc/core-linux-x64-gnu": "1.7.26", + "@swc/core-linux-x64-musl": "1.7.26", + "@swc/core-win32-arm64-msvc": "1.7.26", + "@swc/core-win32-ia32-msvc": "1.7.26", + "@swc/core-win32-x64-msvc": "1.7.26" }, "peerDependencies": { - "@swc/helpers": "^0.5.0" + "@swc/helpers": "*" }, "peerDependenciesMeta": { "@swc/helpers": { @@ -1320,9 +1328,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.7.tgz", - "integrity": "sha512-bZLVHPTpH3h6yhwVl395k0Mtx8v6CGhq5r4KQdAoPbADU974Mauz1b6ViHAJ74O0IVE5vyy7tD3OpkQxL/vMDQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz", + "integrity": "sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==", "cpu": [ "arm64" ], @@ -1336,9 +1344,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.5.7.tgz", - "integrity": "sha512-RpUyu2GsviwTc2qVajPL0l8nf2vKj5wzO3WkLSHAHEJbiUZk83NJrZd1RVbEknIMO7+Uyjh54hEh8R26jSByaw==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz", + "integrity": "sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==", "cpu": [ "x64" ], @@ -1352,9 +1360,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.7.tgz", - "integrity": "sha512-cTZWTnCXLABOuvWiv6nQQM0hP6ZWEkzdgDvztgHI/+u/MvtzJBN5lBQ2lue/9sSFYLMqzqff5EHKlFtrJCA9dQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz", + "integrity": "sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==", "cpu": [ "arm" ], @@ -1368,9 +1376,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.7.tgz", - "integrity": "sha512-hoeTJFBiE/IJP30Be7djWF8Q5KVgkbDtjySmvYLg9P94bHg9TJPSQoC72tXx/oXOgXvElDe/GMybru0UxhKx4g==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz", + "integrity": "sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==", "cpu": [ "arm64" ], @@ -1384,9 +1392,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.7.tgz", - "integrity": "sha512-+NDhK+IFTiVK1/o7EXdCeF2hEzCiaRSrb9zD7X2Z7inwWlxAntcSuzZW7Y6BRqGQH89KA91qYgwbnjgTQ22PiQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz", + "integrity": "sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==", "cpu": [ "arm64" ], @@ -1400,9 +1408,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.7.tgz", - "integrity": "sha512-25GXpJmeFxKB+7pbY7YQLhWWjkYlR+kHz5I3j9WRl3Lp4v4UD67OGXwPe+DIcHqcouA1fhLhsgHJWtsaNOMBNg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz", + "integrity": "sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==", "cpu": [ "x64" ], @@ -1416,9 +1424,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.7.tgz", - "integrity": "sha512-0VN9Y5EAPBESmSPPsCJzplZHV26akC0sIgd3Hc/7S/1GkSMoeuVL+V9vt+F/cCuzr4VidzSkqftdP3qEIsXSpg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz", + "integrity": "sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==", "cpu": [ "x64" ], @@ -1432,9 +1440,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.7.tgz", - "integrity": "sha512-RtoNnstBwy5VloNCvmvYNApkTmuCe4sNcoYWpmY7C1+bPR+6SOo8im1G6/FpNem8AR5fcZCmXHWQ+EUmRWJyuA==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz", + "integrity": "sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==", "cpu": [ "arm64" ], @@ -1448,9 +1456,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.7.tgz", - "integrity": "sha512-Xm0TfvcmmspvQg1s4+USL3x8D+YPAfX2JHygvxAnCJ0EHun8cm2zvfNBcsTlnwYb0ybFWXXY129aq1wgFC9TpQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz", + "integrity": "sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==", "cpu": [ "ia32" ], @@ -1464,9 +1472,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.7.tgz", - "integrity": "sha512-tp43WfJLCsKLQKBmjmY/0vv1slVywR5Q4qKjF5OIY8QijaEW7/8VwPyUyVoJZEnDgv9jKtUTG5PzqtIYPZGnyg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz", + "integrity": "sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==", "cpu": [ "x64" ], @@ -1486,9 +1494,9 @@ "dev": true }, "node_modules/@swc/types": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.7.tgz", - "integrity": "sha512-scHWahbHF0eyj3JsxG9CFJgFdFNaVQCNAimBlT6PzS3n/HptxqREjsm4OH6AN3lYcffZYSPxXW8ua2BEHp0lJQ==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.12.tgz", + "integrity": "sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==", "dev": true, "dependencies": { "@swc/counter": "^0.1.3" @@ -1764,12 +1772,12 @@ "dev": true }, "node_modules/@vitejs/plugin-react-swc": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.7.0.tgz", - "integrity": "sha512-yrknSb3Dci6svCd/qhHqhFPDSw0QtjumcqdKMoNNzmOl5lMXTTiqzjWtG4Qask2HdvvzaNgSunbQGet8/GrKdA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.7.1.tgz", + "integrity": "sha512-vgWOY0i1EROUK0Ctg1hwhtC3SdcDjZcdit4Ups4aPkDcB1jYhmo+RMYWY87cmXMhvtD5uf8lV89j2w16vkdSVg==", "dev": true, "dependencies": { - "@swc/core": "^1.5.7" + "@swc/core": "^1.7.26" }, "peerDependencies": { "vite": "^4 || ^5" @@ -2046,6 +2054,54 @@ "node": ">= 6" } }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2081,6 +2137,46 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/copyfiles/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/core-js": { "version": "3.26.1", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.1.tgz", @@ -2091,6 +2187,12 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2216,6 +2318,15 @@ "@esbuild/win32-x64": "0.21.5" } }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -2628,6 +2739,15 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -2886,6 +3006,12 @@ "node": ">=8" } }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3094,6 +3220,18 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/monaco-editor": { "version": "0.34.1", "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.34.1.tgz", @@ -3130,6 +3268,16 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3352,6 +3500,12 @@ "node": ">= 0.8.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -3470,6 +3624,18 @@ "react-dom": ">=16.8" } }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -3484,6 +3650,15 @@ "node": ">=8.10.0" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3579,6 +3754,12 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/sass": { "version": "1.69.3", "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.3.tgz", @@ -3700,6 +3881,12 @@ "resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz", "integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==" }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -3853,6 +4040,46 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/tinyduration": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/tinyduration/-/tinyduration-3.3.1.tgz", @@ -3952,6 +4179,15 @@ "optional": true, "peer": true }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -3973,6 +4209,12 @@ "react-dom": "16.8.0 - 18" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/uuid": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", @@ -4178,6 +4420,24 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -4195,6 +4455,53 @@ "node": ">= 14" } }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/ui/ui-app/package.json b/ui/ui-app/package.json index aebf1426b0..53d24da14c 100644 --- a/ui/ui-app/package.json +++ b/ui/ui-app/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "private": true, "scripts": { - "postinstall": "node .fix_yaml.cjs", + "postinstall": "node .fix_yaml.cjs && rimraf ./public/kiota-wasm && copyfiles -u 4 'node_modules/@kiota-community/kiota-wasm/dist/**/*.*' 'public/kiota-wasm'", "clean": "rimraf dist", "dev": "vite", "build": "tsc && vite build", @@ -14,6 +14,7 @@ }, "devDependencies": { "@apicurio/eslint-config": "0.3.0", + "@kiota-community/kiota-wasm": "^0.0.3", "@monaco-editor/react": "4.6.0", "@types/luxon": "3.4.2", "@types/pluralize": "0.0.33", @@ -21,7 +22,8 @@ "@types/react-dom": "18.3.0", "@typescript-eslint/eslint-plugin": "7.13.1", "@typescript-eslint/parser": "7.13.1", - "@vitejs/plugin-react-swc": "3.7.0", + "@vitejs/plugin-react-swc": "3.7.1", + "copyfiles": "^2.4.1", "eslint": "8.57.0", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-react-refresh": "0.4.7", @@ -31,8 +33,8 @@ "vite-tsconfig-paths": "5.0.1" }, "dependencies": { - "@apicurio/common-ui-components": "2.0.4", "@apicurio/apicurio-registry-sdk": "file:../../typescript-sdk", + "@apicurio/common-ui-components": "2.0.4", "@apicurio/data-models": "1.1.27", "@microsoft/kiota-abstractions": "1.0.0-preview.66", "@microsoft/kiota-http-fetchlibrary": "1.0.0-preview.65", @@ -40,11 +42,11 @@ "@microsoft/kiota-serialization-json": "1.0.0-preview.66", "@microsoft/kiota-serialization-multipart": "1.0.0-preview.44", "@microsoft/kiota-serialization-text": "1.0.0-preview.63", - "@patternfly/patternfly": "5.4.0", - "@patternfly/react-code-editor": "5.4.1", - "@patternfly/react-core": "5.4.0", + "@patternfly/patternfly": "5.4.1", + "@patternfly/react-code-editor": "5.4.3", + "@patternfly/react-core": "5.4.1", "@patternfly/react-icons": "5.4.0", - "@patternfly/react-table": "5.4.0", + "@patternfly/react-table": "5.4.1", "axios": "1.7.7", "buffer": "^6.0.3", "luxon": "3.5.0", diff --git a/ui/ui-app/public/client-gen/.gitignore b/ui/ui-app/public/client-gen/.gitignore new file mode 100644 index 0000000000..0916ae8b4e --- /dev/null +++ b/ui/ui-app/public/client-gen/.gitignore @@ -0,0 +1,2 @@ +dist +kiota diff --git a/ui/ui-app/public/client-gen/client-gen.js b/ui/ui-app/public/client-gen/client-gen.js new file mode 100644 index 0000000000..b29ea5c962 --- /dev/null +++ b/ui/ui-app/public/client-gen/client-gen.js @@ -0,0 +1,11 @@ +import { generate } from "./dist/main.js"; + +try { + if (window.kiota === undefined) { + window.kiota = {}; + window.kiota.generate = generate; + console.log("Kiota is now available in the window"); + } +} catch (e) { + console.warn("Kiota not available"); +} diff --git a/ui/ui-app/src/app/components/modals/GenerateClientModal.tsx b/ui/ui-app/src/app/components/modals/GenerateClientModal.tsx new file mode 100644 index 0000000000..b4bf6db778 --- /dev/null +++ b/ui/ui-app/src/app/components/modals/GenerateClientModal.tsx @@ -0,0 +1,357 @@ +import React, { FunctionComponent, useEffect, useState } from "react"; +import { + Button, + ExpandableSection, + Form, + FormGroup, FormHelperText, + Grid, + GridItem, HelperText, HelperTextItem, + Modal, + TextInput +} from "@patternfly/react-core"; +import { If, ObjectSelect } from "@apicurio/common-ui-components"; +import { ClientGeneration } from "@services/useGroupsService.ts"; +import { DownloadService, useDownloadService } from "@services/useDownloadService.ts"; +import { CheckCircleIcon } from "@patternfly/react-icons"; +import { CodeEditor } from "@patternfly/react-code-editor"; + + +/** + * Properties + */ +export type GenerateClientModalProps = { + artifactContent: string; + isOpen: boolean; + onClose: () => void; +}; + +/** + * A modal to prompt the user to generate a client SDK. + */ +export const GenerateClientModal: FunctionComponent = (props: GenerateClientModalProps) => { + const [data, setData] = useState({ + content: props.artifactContent, + clientClassName: "MySdkClient", + namespaceName: "io.example.sdk", + language: "Java", + includePatterns: "", + excludePatterns: "", + }); + const [isValid, setIsValid] = useState(true); + const [isErrorVisible, setIsErrorVisible] = useState(false); + const [errorMessage, setErrorMessage] = useState(""); + const [isGenerating, setIsGenerating] = useState(false); + const [isGenerated, setIsGenerated] = useState(false); + const [isExpanded, setIsExpanded] = useState(false); + + const download: DownloadService = useDownloadService(); + + useEffect(() => { + validate(); + }, [data]); + + useEffect(() => { + setData({ + ...data, + content: props.artifactContent + }); + }, [props.artifactContent]); + + const onToggle = (_evt: any, isExpanded: boolean): void => { + setIsExpanded(isExpanded); + }; + + const triggerDownload = (content: string): void => { + const fname: string = `client-${data.language.toLowerCase()}.zip`; + download.downloadBase64DataToFS(content, fname); + }; + + const doGenerate = async (): Promise => { + setIsErrorVisible(false); + setErrorMessage(""); + setIsGenerating(true); + setIsGenerated(false); + + // @ts-expect-error unsafe inclusion of the wasm assets + const { generate } = await import("/kiota-wasm/main.js?url"); + + try { + console.debug("GENERATING USING KIOTA:"); + console.debug(data); + + const zipData = await generate( + data.content, + data.language, + data.clientClassName, + data.namespaceName, + data.includePatterns, + data.excludePatterns, + ); + + setIsErrorVisible(false); + setIsGenerated(true); + + setTimeout(() => { + triggerDownload(zipData); + setIsGenerating(false); + }, 250); + } catch (e) { + setIsErrorVisible(true); + setErrorMessage("" + e); + setIsGenerating(false); + setIsGenerated(false); + console.error(e); + } + }; + + const onLanguageSelect = (selectedLanguage: any): void => { + const newLang: string = selectedLanguage.id; + setData({ + ...data, + language: newLang, + }); + }; + + const onClientNameChange = (_evt: any, value: string): void => { + setData({ + ...data, + clientClassName: value, + }); + }; + + const onNamespaceChange = (_evt: any, value: string): void => { + setData({ + ...data, + namespaceName: value, + }); + }; + + const onIncludePatternsChange = (_evt: any, value: string): void => { + setData({ + ...data, + includePatterns: value, + }); + }; + + const onExcludePatternsChange = (_evt: any, value: string): void => { + setData({ + ...data, + excludePatterns: value, + }); + }; + + const isGenerateEnabled = (): boolean => { + return isValid; + }; + + const validate = (): void => { + const isValid: boolean = ( + data.clientClassName !== undefined && + data.clientClassName.trim().length > 0 && + data.namespaceName !== undefined && + data.namespaceName.trim().length > 0 + ); + setIsValid(isValid); + }; + + const generatingProps = { + spinnerAriaValueText: "Generating", + spinnerAriaLabelledBy: "generate-client-button", + isLoading: isGenerating + } as any; + + let actions = [ + , + + ]; + if (isErrorVisible) { + actions = [ + + ]; + } + + const onEditorDidMount = (editor: any, monaco: any) => { + editor.layout(); + editor.focus(); + monaco.editor.getModels()[0].updateOptions({ tabSize: 4 }); + }; + + const languages = [ + { id: "CSharp", testId: "language-type-csharp" }, + { id: "Go", testId: "language-type-go" }, + { id: "Java", testId: "language-type-java" }, + { id: "PHP", testId: "language-type-php" }, + { id: "Python", testId: "language-type-python" }, + { id: "Ruby", testId: "language-type-ruby" }, + { id: "Swift", testId: "language-type-swift" }, + { id: "TypeScript", testId: "language-type-typescript" }, + ]; + const selectedLanguage: any = languages.filter(item => item.id === data.language)[0]; + + return ( + +

+ +

+ Invalid artifact content. See the log below for details. When the issue is resolved, + upload a new version of the artifact and then try again. +

+ +
+ + + + + Configure your client SDK before you generate and download it. You must manually regenerate the client + SDK each time a new version of the artifact is registered. + + + + + Language} + fieldId="form-language" + isRequired={true} + > +
+ item.id} + itemToTestId={item => item.testId} + appendTo="document" + testId="select-language" + toggleId="select-language-toggle" + /> +
+
+
+ + + + + + + + + + + + + + + + +

Include paths

+

+ Enter a comma-separated list of patterns to specify the paths used to generate the + client SDK (for example, /., **/my-path/*). +

+ + + + + + If this field is empty, all paths are included + + + + + + + + + If this field is empty, no paths are excluded + + + + +
+
+
+
+
+ + ); + +}; diff --git a/ui/ui-app/src/app/components/modals/index.ts b/ui/ui-app/src/app/components/modals/index.ts index dda63bc0cf..d56565d02b 100644 --- a/ui/ui-app/src/app/components/modals/index.ts +++ b/ui/ui-app/src/app/components/modals/index.ts @@ -9,3 +9,4 @@ export * from "./EditCommentModal"; export * from "./EditMetaDataModal"; export * from "./InvalidContentModal"; export * from "./LabelsFormGroup"; +export * from "./GenerateClientModal"; \ No newline at end of file diff --git a/ui/ui-app/src/app/pages/version/VersionPage.tsx b/ui/ui-app/src/app/pages/version/VersionPage.tsx index f7981b527c..fdcad0f2c2 100644 --- a/ui/ui-app/src/app/pages/version/VersionPage.tsx +++ b/ui/ui-app/src/app/pages/version/VersionPage.tsx @@ -13,7 +13,7 @@ import { VersionPageHeader } from "@app/pages"; import { ReferencesTabContent } from "@app/pages/version/components/tabs/ReferencesTabContent.tsx"; -import { ConfirmDeleteModal, EditMetaDataModal, IfFeature, MetaData } from "@app/components"; +import { ConfirmDeleteModal, EditMetaDataModal, GenerateClientModal, IfFeature, MetaData } from "@app/components"; import { ContentTypes } from "@models/contentTypes.model.ts"; import { PleaseWaitModal } from "@apicurio/common-ui-components"; import { AppNavigation, useAppNavigation } from "@services/useAppNavigation.ts"; @@ -41,6 +41,7 @@ export const VersionPage: FunctionComponent = () => { const [isEditModalOpen, setIsEditModalOpen] = useState(false); const [isPleaseWaitModalOpen, setIsPleaseWaitModalOpen] = useState(false); const [pleaseWaitMessage, setPleaseWaitMessage] = useState(""); + const [isGenerateClientModalOpen, setIsGenerateClientModalOpen] = useState(false); const appNavigation: AppNavigation = useAppNavigation(); const logger: LoggerService = useLoggerService(); @@ -223,7 +224,9 @@ export const VersionPage: FunctionComponent = () => { setIsGenerateClientModalOpen(true)} /> , @@ -303,6 +306,11 @@ export const VersionPage: FunctionComponent = () => { onClose={onEditModalClose} onEditMetaData={doEditMetaData} /> + setIsGenerateClientModalOpen(false)} + isOpen={isGenerateClientModalOpen} + /> diff --git a/ui/ui-app/src/app/pages/version/components/tabs/VersionInfoTabContent.tsx b/ui/ui-app/src/app/pages/version/components/tabs/VersionInfoTabContent.tsx index 8b3e16f136..26f26ab715 100644 --- a/ui/ui-app/src/app/pages/version/components/tabs/VersionInfoTabContent.tsx +++ b/ui/ui-app/src/app/pages/version/components/tabs/VersionInfoTabContent.tsx @@ -29,7 +29,9 @@ import { VersionComments } from "@app/pages"; export type VersionInfoTabContentProps = { artifact: ArtifactMetaData; version: VersionMetaData; + codegenEnabled: boolean; onEditMetaData: () => void; + onGenerateClient: () => void; }; /** @@ -58,6 +60,13 @@ export const VersionInfoTabContent: FunctionComponent Version metadata + + +