diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 5534c66c32..cf0220ad83 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -19,5 +19,5 @@ go install go.uber.org/mock/mockgen@v0.4.0 # Prerequisites for Code Generation, see https://github.com/radius-project/radius/tree/main/docs/contributing/contributing-code/contributing-code-prerequisites#code-generation cd typespec || exit npm ci -npm install -g autorest -npm install -g oav +npm install -g autorest@3.7.2 +npm install -g oav@4.0.2 diff --git a/.github/actions/copy-deployment-engine-image/action.yml b/.github/actions/copy-deployment-engine-image/action.yml index fc473a3234..93f170bff1 100644 --- a/.github/actions/copy-deployment-engine-image/action.yml +++ b/.github/actions/copy-deployment-engine-image/action.yml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-action.json +--- name: Copy Deployment Engine image description: Copy a deployment engine image from Azure Container Registry to GitHub Container Registry. inputs: @@ -35,10 +37,10 @@ runs: using: composite steps: - name: Set up Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - name: Log in to Azure - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ env.DE_CONTAINER_AZURE_CLIENT_ID }} tenant-id: ${{ env.DE_CONTAINER_AZURE_TENANT_ID }} @@ -50,7 +52,7 @@ runs: az acr login --name "${{ inputs.acr-name }}" - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ${{ inputs.destination-registry }} username: ${{ inputs.ghcr-username }} diff --git a/.github/actions/create-kind-cluster/action.yaml b/.github/actions/create-kind-cluster/action.yaml index 3c0f8301de..9c2db7f9fc 100644 --- a/.github/actions/create-kind-cluster/action.yaml +++ b/.github/actions/create-kind-cluster/action.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-action.json +--- name: "Create a KinD cluster" description: | Create a KinD cluster. @@ -31,7 +33,7 @@ inputs: required: true default: "5000" runs: - using: "composite" + using: composite steps: - name: Install KinD shell: bash @@ -45,7 +47,7 @@ runs: run: | # https://kind.sigs.k8s.io/docs/user/local-registry/ # Create the cluster with necessary configurations - # to expose 30080 port for Gitea + # to expose 30080 port for the local Git server cat </etc/nginx/http.d/git.conf + +# Start fcgiwrap (serves /usr/libexec/git-core/git-http-backend) and foreground nginx. +spawn-fcgi -s "${SOCKET_DIR}/fcgiwrap.sock" -M 766 -u nginx -g nginx /usr/bin/fcgiwrap +exec nginx -g 'daemon off;' diff --git a/.github/actions/install-git-http-backend/git-http-backend-nginx.conf b/.github/actions/install-git-http-backend/git-http-backend-nginx.conf new file mode 100644 index 0000000000..03d9f8fe5d --- /dev/null +++ b/.github/actions/install-git-http-backend/git-http-backend-nginx.conf @@ -0,0 +1,31 @@ +server { +# Reference docs: +# - Core directives: https://nginx.org/en/docs/http/ngx_http_core_module.html +# - FastCGI params: https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html +# - HTTP auth basic: https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html +# +# Expose the git-http-backend on port 3000 inside the cluster. + listen 3000; + server_name _; + root ${GIT_SERVER_TEMP_DIR}; + + # Require basic auth using credentials provisioned by the entrypoint script. + auth_basic "Git Server"; + auth_basic_user_file /etc/nginx/.htpasswd; + + location / { + client_max_body_size 0; + include fastcgi_params; + + # Forward all requests to git-http-backend via fcgiwrap. + fastcgi_pass unix:${SOCKET_DIR}/fcgiwrap.sock; + fastcgi_param SCRIPT_FILENAME /config/git-http-backend-wrapper.sh; + fastcgi_param PATH_INFO $uri; + fastcgi_param SCRIPT_NAME $uri; + fastcgi_param GIT_PROJECT_ROOT ${GIT_SERVER_TEMP_DIR}; + fastcgi_param GIT_HTTP_EXPORT_ALL 1; + fastcgi_param GIT_HTTP_MAX_REQUEST_BUFFER 1048576000; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param HTTP_AUTHORIZATION $http_authorization; + } +} diff --git a/.github/actions/install-git-http-backend/git-http-backend-wrapper.sh b/.github/actions/install-git-http-backend/git-http-backend-wrapper.sh new file mode 100755 index 0000000000..72a9789397 --- /dev/null +++ b/.github/actions/install-git-http-backend/git-http-backend-wrapper.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu + +# Ensure PATH_INFO always starts with a leading slash to keep git-http-backend happy. +if [ "${PATH_INFO:-}" != "" ] && [ "${PATH_INFO#*/}" = "${PATH_INFO}" ]; then + PATH_INFO="/${PATH_INFO}" + export PATH_INFO +fi + +# Default to exporting all repositories unless explicitly disabled. +export GIT_HTTP_EXPORT_ALL=${GIT_HTTP_EXPORT_ALL:-1} + +exec /usr/libexec/git-core/git-http-backend diff --git a/.github/actions/install-git-http-backend/git-http-backend.yaml b/.github/actions/install-git-http-backend/git-http-backend.yaml new file mode 100644 index 0000000000..95f3820c89 --- /dev/null +++ b/.github/actions/install-git-http-backend/git-http-backend.yaml @@ -0,0 +1,85 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: git-http-backend + namespace: ${NAMESPACE} + labels: + app: git-http-backend +spec: + replicas: 1 + selector: + matchLabels: + app: git-http-backend + template: + metadata: + labels: + app: git-http-backend + spec: + containers: + - name: git-http-backend + image: ${IMAGE} + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - /config/entrypoint.sh + env: + - name: GIT_USERNAME + valueFrom: + secretKeyRef: + name: git-http-backend-auth + key: username + - name: GIT_PASSWORD + valueFrom: + secretKeyRef: + name: git-http-backend-auth + key: password + - name: GIT_SERVER_TEMP_DIR + value: ${SERVER_TEMP_DIR} + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 500m + memory: 256Mi + ports: + - containerPort: 3000 + name: http + readinessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 5 + livenessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 10 + periodSeconds: 10 + volumeMounts: + - name: config + mountPath: /config + - name: git-data + mountPath: ${SERVER_TEMP_DIR} + volumes: + - name: config + configMap: + name: git-http-backend-config + defaultMode: 0555 + - name: git-data + emptyDir: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: git-http + namespace: ${NAMESPACE} + labels: + app: git-http-backend +spec: + selector: + app: git-http-backend + ports: + - name: http + port: 3000 + targetPort: 3000 + protocol: TCP diff --git a/.github/actions/install-git-http-backend/install-git-http-backend.sh b/.github/actions/install-git-http-backend/install-git-http-backend.sh new file mode 100755 index 0000000000..5226508fc7 --- /dev/null +++ b/.github/actions/install-git-http-backend/install-git-http-backend.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# Installs a Git HTTP backend backed by alpine/git and nginx. +set -euo pipefail + +if [[ $# -lt 2 ]]; then + echo "Usage: $0 [namespace] [image]" >&2 + exit 1 +fi + +SCRIPT_DIR=$(cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd) + +GIT_USERNAME=$1 +GIT_PASSWORD=$2 +NAMESPACE=${3:-git-http-backend} +IMAGE=${4:-${GIT_HTTP_IMAGE:-alpine/git:2.45.2}} # allow override via env or arg +SERVER_TEMP_DIR=${GIT_SERVER_TEMP_DIR:-/var/lib/git} + +MANIFEST_TEMPLATE="${SCRIPT_DIR}/git-http-backend.yaml" +ENTRYPOINT_FILE="${SCRIPT_DIR}/git-http-backend-entrypoint.sh" +NGINX_TEMPLATE="${SCRIPT_DIR}/git-http-backend-nginx.conf" +WRAPPER_FILE="${SCRIPT_DIR}/git-http-backend-wrapper.sh" + +for cmd in kubectl envsubst; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "error: required command '$cmd' not found in PATH" >&2 + exit 1 + fi +done + +ensure_namespace() { + kubectl create namespace "$1" --dry-run=client -o yaml | kubectl apply -f - +} + +apply_basic_auth_secret() { + kubectl -n "$1" create secret generic git-http-backend-auth \ + --type=kubernetes.io/basic-auth \ + --from-literal=username="$2" \ + --from-literal=password="$3" \ + --dry-run=client -o yaml | kubectl apply -f - +} + +apply_configmap() { + kubectl -n "$1" create configmap git-http-backend-config \ + --from-file=entrypoint.sh="$2" \ + --from-file=nginx.conf.template="$3" \ + --from-file=git-http-backend-wrapper.sh="$4" \ + --dry-run=client -o yaml | kubectl apply -f - +} + +apply_workload() { + export NAMESPACE IMAGE SERVER_TEMP_DIR + envsubst '${NAMESPACE} ${IMAGE} ${SERVER_TEMP_DIR}' <"$1" | kubectl apply -f - +} + +ensure_namespace "$NAMESPACE" +apply_basic_auth_secret "$NAMESPACE" "$GIT_USERNAME" "$GIT_PASSWORD" +apply_configmap "$NAMESPACE" "$ENTRYPOINT_FILE" "$NGINX_TEMPLATE" "$WRAPPER_FILE" +apply_workload "$MANIFEST_TEMPLATE" + +kubectl rollout restart deployment/git-http-backend -n "$NAMESPACE" >/dev/null 2>&1 || true + +kubectl rollout status deployment/git-http-backend -n "$NAMESPACE" --timeout=240s diff --git a/.github/actions/install-gitea/action.yaml b/.github/actions/install-gitea/action.yaml deleted file mode 100644 index 3db3390000..0000000000 --- a/.github/actions/install-gitea/action.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: "Install Gitea and Export Token" -description: "Installs Gitea, creates an admin user, generates an access token, and exports the token to the GitHub output." -inputs: - gitea-username: - description: "Gitea admin username" - required: true - gitea-email: - description: "Gitea admin email" - required: true - gitea-access-token-name: - description: "Gitea access token name" - required: true - gitea-version: - description: "Gitea version" - required: false - default: "v11.0.0" -outputs: - gitea-access-token: - description: "Gitea access token" - value: ${{ steps.export-token.outputs.gitea-access-token }} -runs: - using: "composite" - steps: - - name: Install Gitea - id: export-token - shell: bash - env: - GITEA_PASSWORD: ${{ env.GITEA_PASSWORD }} - run: | - .github/actions/install-gitea/install-gitea.sh ${{ inputs.gitea-version }} ${{ inputs.gitea-username }} ${{ inputs.gitea-email }} ${{ inputs.gitea-access-token-name }} diff --git a/.github/actions/install-gitea/gitea-config.yaml b/.github/actions/install-gitea/gitea-config.yaml deleted file mode 100644 index 5341ba8d02..0000000000 --- a/.github/actions/install-gitea/gitea-config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -redis-cluster: - enabled: false -postgresql-ha: - enabled: false -redis: - enabled: true -postgresql: - enabled: true diff --git a/.github/actions/install-gitea/install-gitea.sh b/.github/actions/install-gitea/install-gitea.sh deleted file mode 100755 index 9206599391..0000000000 --- a/.github/actions/install-gitea/install-gitea.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -# ------------------------------------------------------------ -# Copyright 2023 The Radius Authors. -# -# 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. -# ------------------------------------------------------------ - -set -e - -GITEA_VERSION=$1 -GITEA_USERNAME=$2 -GITEA_EMAIL=$3 -GITEA_ACCESS_TOKEN_NAME=$4 -# GITEA_PASSWORD should be set by environment variable -# This script should be run in a GitHub Actions workflow, -# so GITHUB_OUTPUT is available. - -if [ -z "$GITEA_VERSION" ]; then - echo "GITEA_VERSION is not set. Exiting..." - exit 1 -fi - -if [ -z "$GITEA_USERNAME" ]; then - echo "GITEA_USERNAME is not set. Exiting..." - exit 1 -fi - -if [ -z "$GITEA_EMAIL" ]; then - echo "GITEA_EMAIL is not set. Exiting..." - exit 1 -fi - -if [ -z "$GITEA_ACCESS_TOKEN_NAME" ]; then - echo "GITEA_ACCESS_TOKEN_NAME is not set. Exiting..." - exit 1 -fi - -# Add Gitea Helm chart repository -helm repo add gitea-charts https://dl.gitea.io/charts/ -helm repo update - -# If Gitea is already installed, uninstall it -if helm list -n gitea | grep -q gitea; then - echo "Gitea is already installed. Uninstalling..." - helm uninstall gitea -n gitea - kubectl delete namespace gitea - echo "Gitea uninstalled." -fi - -# Install Gitea from Helm chart -helm install gitea gitea-charts/gitea --version "$GITEA_VERSION" --namespace gitea --create-namespace -f .github/actions/install-gitea/gitea-config.yaml -kubectl wait --for=condition=available deployment/gitea -n gitea --timeout=240s - -# Get the Gitea pod name -gitea_pod=$(kubectl get pods -n gitea -l app=gitea -o jsonpath='{.items[0].metadata.name}') - -# Create a Gitea admin user -output=$(kubectl exec -it "$gitea_pod" -n gitea -- gitea admin user create --admin --username "$GITEA_USERNAME" --email "$GITEA_EMAIL" --password "$GITEA_PASSWORD" --must-change-password=false) -echo "$output" - -# Generate an access token for the Gitea admin user -output=$(kubectl exec -it "$gitea_pod" -n gitea -- gitea admin user generate-access-token --username "$GITEA_USERNAME" --token-name "$GITEA_ACCESS_TOKEN_NAME" --scopes "write:repository,write:user" --raw) -echo "$output" - -echo "gitea-access-token=$output" >> "$GITHUB_OUTPUT" diff --git a/.github/actions/process-test-results/action.yaml b/.github/actions/process-test-results/action.yaml index 3b9152e9dd..4b10e6bb4d 100644 --- a/.github/actions/process-test-results/action.yaml +++ b/.github/actions/process-test-results/action.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-action.json +--- name: "Process Test Results" description: | Processes a batch of test results including creating a github artifact and annotating the Pull Request (if applicable). @@ -8,7 +10,7 @@ description: | You will also need to set the path for the results file using an environment variable. This would output the jUnit test results format which is what we require. - + GOTESTSUM_OPTS: '--junitfile ./dist/unit_test_results_raw.xml' Then running 'make ' will do the right thing :) @@ -24,7 +26,7 @@ inputs: description: "Directory containing result XML files. These should be in jUnit format. See the description of the action." required: true runs: - using: "composite" + using: composite steps: # The test results file output by gotestsum is missing file and line number on the XML elements # which is needed for the annotations to work. This script adds the missing information. @@ -42,7 +44,7 @@ runs: INPUT_FILES="$INPUT_DIRECTORY*.xml" mkdir -p "$INPUT_DIRECTORY/processed" - + # Check if any XML files exist if ! ls $INPUT_FILES 1> /dev/null 2>&1; then echo "No XML files found in $INPUT_DIRECTORY" @@ -50,7 +52,7 @@ runs: touch "$INPUT_DIRECTORY/processed/.gitkeep" exit 0 fi - + for INPUT_FILE in $INPUT_FILES do # Skip if the file doesn't exist (shouldn't happen after the check above, but being safe) @@ -58,7 +60,7 @@ runs: echo "Skipping non-existent file: $INPUT_FILE" continue fi - + DIRECTORY=$(dirname -- "$INPUT_FILE") FILENAME=$(basename -- "$INPUT_FILE") FILENAME="${FILENAME%.*}" @@ -68,18 +70,18 @@ runs: echo "wrote ${OUTPUT_FILE}" done - name: "Create ${{ inputs.test_group_name }} Result Report" - uses: EnricoMi/publish-unit-test-result-action@v2 + uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0 if: always() with: check_name: ${{ inputs.test_group_name }} files: | ${{ inputs.result_directory }}/processed/*.xml - name: "Upload ${{ inputs.test_group_name }} Results" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: always() with: name: ${{ inputs.artifact_name }} path: | - ${{ inputs.result_directory }}/*.xml + ${{ inputs.result_directory }}/*.xml ${{ inputs.result_directory }}/processed/*.xml if-no-files-found: warn diff --git a/.github/actions/save-pr-as-artifact/action.yaml b/.github/actions/save-pr-as-artifact/action.yaml index 10ba355d72..126aed6b0f 100644 --- a/.github/actions/save-pr-as-artifact/action.yaml +++ b/.github/actions/save-pr-as-artifact/action.yaml @@ -1,7 +1,9 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-action.json +--- name: "Save PR number as artifact" description: "Save PR number as artifact" runs: - using: "composite" + using: composite steps: - name: Save PR number shell: bash @@ -10,7 +12,7 @@ runs: run: | mkdir -p ./pr echo $PR_NUMBER > ./pr/pr_number - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: pr_number path: pr/ diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000..7ddbbd3d6d --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,27 @@ +--- +description: Comprehensive coding guidelines and instructions for GitHub Copilot +--- + +# GitHub Copilot Instructions + +This file serves as the entry point for GitHub Copilot instructions in the Radius project. + +These instructions define **HOW** Copilot should process user queries and **WHEN** to read specific guidance files. + +## Overview + +Copilot should follow the best practices and conventions defined in the specialized instruction files located in `.github/instructions/`. These files contain detailed guidelines for specific technologies, tools, and workflows used in this project. + +## Instructions + +The following instruction files are available: + +- **[GitHub Workflows](instructions/github-workflows.instructions.md)** - CI/CD best practices for GitHub Workflows +- **[Shell Scripts](instructions/shell.instructions.md)** - Guidelines for Bash/Shell script development +- **[Go (Golang)](instructions/golang.instructions.md)** - Guidelines for Go (Golang) development + +## How to Use + +When working on files that match the patterns defined in instruction files (e.g., `*.sh`, `.github/workflows/*.yml`), Copilot will automatically apply the relevant guidelines from the corresponding instruction file. + +For general development queries, Copilot will use standard best practices and conventions appropriate for the technology or task at hand. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 965bd7e8cb..c19491e93e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,33 +1,60 @@ +# yaml-language-server: $schema=https://www.schemastore.org/dependabot-2.0.json +# See GitHub's documentation for more information on this file: +# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference +--- version: 2 + updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "weekly" + interval: weekly groups: github-actions: patterns: - "*" - - package-ecosystem: "gomod" - directory: "/" + + - package-ecosystem: gomod + directory: / schedule: - interval: "weekly" + interval: weekly groups: go-dependencies: patterns: - "*" - - package-ecosystem: "devcontainers" - directory: "/" + + - package-ecosystem: gomod + directory: /test/magpiego + schedule: + interval: weekly + groups: + magpie-go-dependencies: + patterns: + - "*" + + - package-ecosystem: gomod + directory: /test/testrp schedule: interval: weekly - - package-ecosystem: "gitsubmodule" - directory: "/" + groups: + testrp-go-dependencies: + patterns: + - "*" + + - package-ecosystem: devcontainers + directory: / schedule: - interval: "weekly" - - package-ecosystem: "npm" - directory: "/typespec/" + interval: weekly + + - package-ecosystem: gitsubmodule + directory: / schedule: - interval: "weekly" + interval: weekly + + - package-ecosystem: npm + directory: /typespec + schedule: + interval: weekly groups: typespec: applies-to: version-updates diff --git a/.github/instructions/bicep.instructions.md b/.github/instructions/bicep.instructions.md new file mode 100644 index 0000000000..8e5ddebecb --- /dev/null +++ b/.github/instructions/bicep.instructions.md @@ -0,0 +1,63 @@ +--- +applyTo: '**/*.bicep' +description: Bicep Conventions and Guidelines Instructions +--- + +# Bicep Conventions and Guidelines Instructions + +## Naming Conventions + +- When writing Bicep code, use lowerCamelCase for all names (variables, parameters, resources) +- Use resource type descriptive symbolic names (e.g., `storageAccount` not `storageAccountName`) +- Avoid using `name` in a symbolic name as it represents the resource, not the resource's name +- Avoid distinguishing variables and parameters by the use of suffixes +- Name module files descriptively based on their primary resource or purpose (e.g., `storageAccount.bicep`, `appServicePlan.bicep`) instead of generic names like `main.bicep` for shared modules + +## Structure and Declaration + +- Always declare parameters at the top of files with @description decorators +- Order declarations as: parameters first, then variables, then resources, and finally outputs to keep files predictable and easy to scan +- Use latest stable API versions for all resources +- Use descriptive @description decorators for all parameters +- Specify minimum and maximum character length for naming parameters + +## Parameters + +- Set default values that are safe for test environments (use low-cost pricing tiers) +- Use @allowed decorator sparingly to avoid blocking valid deployments +- Use parameters for settings that change between deployments + +## Variables + +- Variables automatically infer type from the resolved value +- Use variables to contain complex expressions instead of embedding them directly in resource properties + +## Resource References + +- Use symbolic names for resource references instead of reference() or resourceId() functions +- Create resource dependencies through symbolic names (resourceA.id) not explicit dependsOn +- For accessing properties from other resources, use the `existing` keyword instead of passing values through outputs + +## Resource Names + +- Use template expressions with uniqueString() to create meaningful and unique resource names +- Add prefixes to uniqueString() results since some resources don't allow names starting with numbers + +## Child Resources + +- Avoid excessive nesting of child resources +- Use parent property or nesting instead of constructing resource names for child resources + +## Security + +- Never include secrets or keys in outputs +- Use resource properties directly in outputs (e.g., storageAccount.properties.primaryEndpoints) +- Use the @secure() decorator on parameters that hold sensitive values such as passwords, keys, tokens, or connection strings + +## Documentation + +- Include helpful // comments within your Bicep files to improve readability + +--- + + diff --git a/.github/instructions/docker.instructions.md b/.github/instructions/docker.instructions.md new file mode 100644 index 0000000000..6c70da17c3 --- /dev/null +++ b/.github/instructions/docker.instructions.md @@ -0,0 +1,729 @@ +--- +applyTo: '**/Dockerfile,**/Dockerfile.*,**/*.dockerfile,**/docker-compose*.yml,**/docker-compose*.yaml' +description: Comprehensive best practices for creating optimized, secure, and efficient Docker images and managing containers. Covers multi-stage builds, image layer optimization, security scanning, and runtime best practices. +--- + +# Containerization & Docker Best Practices Instructions + +## Your Mission + +As GitHub Copilot, you are an expert in containerization with deep knowledge of Docker best practices. Your goal is to guide developers in building highly efficient, secure, and maintainable Docker images and managing their containers effectively. You must emphasize optimization, security, and reproducibility. + +## Core Principles of Containerization + +### 1. Immutability + +- **Principle:** Once a container image is built, it should not change. Any changes should result in a new image. +- **Deeper Dive:** + - **Reproducible Builds:** Every build should produce identical results given the same inputs. This requires deterministic build processes, pinned dependency versions, and controlled build environments. + - **Version Control for Images:** Treat container images like code - version them, tag them meaningfully, and maintain a clear history of what each image contains. + - **Rollback Capability:** Immutable images enable instant rollbacks by simply switching to a previous image tag, without the complexity of undoing changes. + - **Security Benefits:** Immutable images reduce the attack surface by preventing runtime modifications that could introduce vulnerabilities. +- **Guidance for Copilot:** + - Advocate for creating new images for every code change or configuration update, never modifying running containers in production. + - Recommend using semantic versioning for image tags (e.g., `v1.2.3` - `latest` for development only). + - Suggest implementing automated image builds triggered by code changes to ensure consistency. + - Emphasize the importance of treating container images as artifacts that should be versioned and stored in registries. +- **Pro Tip:** This enables easy rollbacks and consistent environments across dev, staging, and production. Immutable images are the foundation of reliable deployments. + +### 2. Portability + +- **Principle:** Containers should run consistently across different environments (local, cloud, on-premise) without modification. +- **Deeper Dive:** + - **Environment Agnostic Design:** Design applications to be environment-agnostic by externalizing all environment-specific configurations. + - **Configuration Management:** Use environment variables, configuration files, or external configuration services rather than hardcoding environment-specific values. + - **Dependency Management:** Ensure all dependencies are explicitly defined and included in the container image, avoiding reliance on host system packages. + - **Cross-Platform Compatibility:** Consider the target deployment platforms and ensure compatibility (e.g., ARM vs x86, different Linux distributions). +- **Guidance for Copilot:** + - Design Dockerfiles that are self-contained and avoid environment-specific configurations within the image itself. + - Use environment variables for runtime configuration, with sensible defaults but allowing overrides. + - Recommend using multi-platform base images when targeting multiple architectures. + - Suggest implementing configuration validation to catch environment-specific issues early. +- **Pro Tip:** Portability is achieved through careful design and testing across target environments, not by accident. + +### 3. Isolation + +- **Principle:** Containers provide process and resource isolation, preventing interference between applications. +- **Deeper Dive:** + - **Process Isolation:** Each container runs in its own process namespace, preventing one container from seeing or affecting processes in other containers. + - **Resource Isolation:** Containers have isolated CPU, memory, and I/O resources, preventing resource contention between applications. + - **Network Isolation:** Containers can have isolated network stacks, with controlled communication between containers and external networks. + - **Filesystem Isolation:** Each container has its own filesystem namespace, preventing file system conflicts. +- **Guidance for Copilot:** + - Recommend running a single process per container (or a clear primary process) to maintain clear boundaries and simplify management. + - Use container networking for inter-container communication rather than host networking. + - Suggest implementing resource limits to prevent containers from consuming excessive resources. + - Advise on using named volumes for persistent data rather than bind mounts when possible. +- **Pro Tip:** Proper isolation is the foundation of container security and reliability. Don't break isolation for convenience. + +### 4. Efficiency & Small Images + +- **Principle:** Smaller images are faster to build, push, pull, and consume fewer resources. +- **Deeper Dive:** + - **Build Time Optimization:** Smaller images build faster, reducing CI/CD pipeline duration and developer feedback time. + - **Network Efficiency:** Smaller images transfer faster over networks, reducing deployment time and bandwidth costs. + - **Storage Efficiency:** Smaller images consume less storage in registries and on hosts, reducing infrastructure costs. + - **Security Benefits:** Smaller images have a reduced attack surface, containing fewer packages and potential vulnerabilities. +- **Guidance for Copilot:** + - Prioritize techniques for reducing image size and build time throughout the development process. + - Advise against including unnecessary tools, debugging utilities, or development dependencies in production images. + - Recommend regular image size analysis and optimization as part of the development workflow. + - Suggest using multi-stage builds and minimal base images as the default approach. +- **Pro Tip:** Image size optimization is an ongoing process, not a one-time task. Regularly review and optimize your images. + +## Dockerfile Best Practices + +### 1. Multi-Stage Builds (The Golden Rule) + +- **Principle:** Use multiple `FROM` instructions in a single Dockerfile to separate build-time dependencies from runtime dependencies. +- **Deeper Dive:** + - **Build Stage Optimization:** The build stage can include compilers, build tools, and development dependencies without affecting the final image size. + - **Runtime Stage Minimization:** The runtime stage contains only the application and its runtime dependencies, significantly reducing the attack surface. + - **Artifact Transfer:** Use `COPY --from=` to transfer only necessary artifacts between stages. + - **Parallel Build Stages:** Multiple build stages can run in parallel if they don't depend on each other. +- **Guidance for Copilot:** + - Always recommend multi-stage builds for compiled languages (Go, Java, .NET, C++) and even for Node.js/Python where build tools are heavy. + - Suggest naming build stages descriptively (e.g., `AS build`, `AS test`, `AS production`) for clarity. + - Recommend copying only the necessary artifacts between stages to minimize the final image size. + - Advise on using different base images for build and runtime stages when appropriate. +- **Benefit:** Significantly reduces final image size and attack surface. +- **Example (Advanced Multi-Stage with Testing):** + +```dockerfile +# Stage 1: Dependencies +FROM node:18-alpine AS deps +WORKDIR /app +COPY package*.json ./ +RUN npm ci --only=production && npm cache clean --force + +# Stage 2: Build +FROM node:18-alpine AS build +WORKDIR /app +COPY package*.json ./ +RUN npm ci +COPY . . +RUN npm run build + +# Stage 3: Test +FROM build AS test +RUN npm run test +RUN npm run lint + +# Stage 4: Production +FROM node:18-alpine AS production +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY --from=build /app/dist ./dist +COPY --from=build /app/package*.json ./ +USER node +EXPOSE 3000 +CMD ["node", "dist/main.js"] +``` + +### 2. Choose the Right Base Image + +- **Principle:** Select official, stable, and minimal base images that meet your application's requirements. +- **Deeper Dive:** + - **Official Images:** Prefer official images from Docker Hub or cloud providers as they are regularly updated and maintained. + - **Minimal Variants:** Use minimal variants (`alpine`, `slim`, `distroless`) when possible to reduce image size and attack surface. + - **Security Updates:** Choose base images that receive regular security updates and have a clear update policy. + - **Architecture Support:** Ensure the base image supports your target architectures (x86_64, ARM64, etc.). +- **Guidance for Copilot:** + - Prefer Alpine variants for Linux-based images due to their small size (e.g., `alpine`, `node:18-alpine`). + - Use official language-specific images (e.g., `python:3.9-slim-buster`, `openjdk:17-jre-slim`). + - Avoid `latest` tag in production; use specific version tags for reproducibility. + - Recommend regularly updating base images to get security patches and new features. +- **Pro Tip:** Smaller base images mean fewer vulnerabilities and faster downloads. Always start with the smallest image that meets your needs. + +### 3. Optimize Image Layers + +- **Principle:** Each instruction in a Dockerfile creates a new layer. Leverage caching effectively to optimize build times and image size. +- **Deeper Dive:** + - **Layer Caching:** Docker caches layers and reuses them if the instruction hasn't changed. Order instructions from least to most frequently changing. + - **Layer Size:** Each layer adds to the final image size. Combine related commands to reduce the number of layers. + - **Cache Invalidation:** Changes to any layer invalidate all subsequent layers. Place frequently changing content (like source code) near the end. + - **Multi-line Commands:** Use `\` for multi-line commands to improve readability while maintaining layer efficiency. +- **Guidance for Copilot:** + - Place frequently changing instructions (e.g., `COPY . .`) _after_ less frequently changing ones (e.g., `RUN npm ci`). + - Combine `RUN` commands where possible to minimize layers (e.g., `RUN apt-get update && apt-get install -y ...`). + - Clean up temporary files in the same `RUN` command (`rm -rf /var/lib/apt/lists/*`). + - Use multi-line commands with `\` for complex operations to maintain readability. +- **Example (Advanced Layer Optimization):** + +```dockerfile +# BAD: Multiple layers, inefficient caching +FROM ubuntu:24.04 +RUN apt-get update +RUN apt-get install -y python3 python3-pip +RUN pip3 install flask +RUN apt-get clean +RUN rm -rf /var/lib/apt/lists/* + +# GOOD: Optimized layers with proper cleanup +FROM ubuntu:24.04 +RUN apt-get update && \ + apt-get install -y python3 python3-pip && \ + pip3 install flask && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* +``` + +### 4. Use `.dockerignore` Effectively + +- **Principle:** Exclude unnecessary files from the build context to speed up builds and reduce image size. +- **Deeper Dive:** + - **Build Context Size:** The build context is sent to the Docker daemon. Large contexts slow down builds and consume resources. + - **Security:** Exclude sensitive files (like `.env`, `.git`) to prevent accidental inclusion in images. + - **Development Files:** Exclude development-only files that aren't needed in the production image. + - **Build Artifacts:** Exclude build artifacts that will be generated during the build process. +- **Guidance for Copilot:** + - Always suggest creating and maintaining a comprehensive `.dockerignore` file. + - Common exclusions: `.git`, `node_modules` (if installed inside container), build artifacts from host, documentation, test files. + - Recommend reviewing the `.dockerignore` file regularly as the project evolves. + - Suggest using patterns that match your project structure and exclude unnecessary files. +- **Example (Comprehensive .dockerignore):** + +```dockerignore +# Version control +.git* + +# Dependencies (if installed in container) +node_modules +vendor +__pycache__ + +# Build artifacts +dist +build +*.o +*.so + +# Development files +.env.* +*.log +coverage +.nyc_output + +# IDE files +.vscode +.idea +*.swp +*.swo + +# OS files +.DS_Store +Thumbs.db + +# Documentation +*.md +docs/ + +# Test files +test/ +tests/ +spec/ +__tests__/ +``` + +### 5. Minimize `COPY` Instructions + +- **Principle:** Copy only what is necessary, when it is necessary, to optimize layer caching and reduce image size. +- **Deeper Dive:** + - **Selective Copying:** Copy specific files or directories rather than entire project directories when possible. + - **Layer Caching:** Each `COPY` instruction creates a new layer. Copy files that change together in the same instruction. + - **Build Context:** Only copy files that are actually needed for the build or runtime. + - **Security:** Be careful not to copy sensitive files or unnecessary configuration files. +- **Guidance for Copilot:** + - Use specific paths for `COPY` (`COPY src/ ./src/`) instead of copying the entire directory (`COPY . .`) if only a subset is needed. + - Copy dependency files (like `package.json`, `requirements.txt`) before copying source code to leverage layer caching. + - Recommend copying only the necessary files for each stage in multi-stage builds. + - Suggest using `.dockerignore` to exclude files that shouldn't be copied. +- **Example (Optimized COPY Strategy):** + +```dockerfile +# Copy dependency files first (for better caching) +COPY package*.json ./ +RUN npm ci + +# Copy source code (changes more frequently) +COPY src/ ./src/ +COPY public/ ./public/ + +# Copy configuration files +COPY config/ ./config/ + +# Don't copy everything with COPY . . +``` + +### 6. Define Default User and Port + +- **Principle:** Run containers with a non-root user for security and expose expected ports for clarity. +- **Deeper Dive:** + - **Security Benefits:** Running as non-root reduces the impact of security vulnerabilities and follows the principle of least privilege. + - **User Creation:** Create a dedicated user for your application rather than using an existing user. + - **Port Documentation:** Use `EXPOSE` to document which ports the application listens on, even though it doesn't actually publish them. + - **Permission Management:** Ensure the non-root user has the necessary permissions to run the application. +- **Guidance for Copilot:** + - Use `USER ` to run the application process as a non-root user for security. + - Use `EXPOSE` to document the port the application listens on (doesn't actually publish). + - Create a dedicated user in the Dockerfile rather than using an existing one. + - Ensure proper file permissions for the non-root user. +- **Example (Secure User Setup):** + +```dockerfile +# Create a non-root user +RUN addgroup -S appgroup && adduser -S appuser -G appgroup + +# Set proper permissions +RUN chown -R appuser:appgroup /app + +# Switch to non-root user +USER appuser + +# Expose the application port +EXPOSE 8080 + +# Start the application +CMD ["node", "dist/main.js"] +``` + +### 7. Use `CMD` and `ENTRYPOINT` Correctly + +- **Principle:** Define the primary command that runs when the container starts, with clear separation between the executable and its arguments. +- **Deeper Dive:** + - **`ENTRYPOINT`:** Defines the executable that will always run. Makes the container behave like a specific application. + - **`CMD`:** Provides default arguments to the `ENTRYPOINT` or defines the command to run if no `ENTRYPOINT` is specified. + - **Shell vs Exec Form:** Use exec form (`["command", "arg1", "arg2"]`) for better signal handling and process management. + - **Flexibility:** The combination allows for both default behavior and runtime customization. +- **Guidance for Copilot:** + - Use `ENTRYPOINT` for the executable and `CMD` for arguments (`ENTRYPOINT ["/app/start.sh"]`, `CMD ["--config", "prod.conf"]`). + - For simple execution, `CMD ["executable", "param1"]` is often sufficient. + - Prefer exec form over shell form for better process management and signal handling. + - Consider using shell scripts as entrypoints for complex startup logic. +- **Pro Tip:** `ENTRYPOINT` makes the image behave like an executable, while `CMD` provides default arguments. This combination provides flexibility and clarity. + +### 8. Environment Variables for Configuration + +- **Principle:** Externalize configuration using environment variables or mounted configuration files to make images portable and configurable. +- **Deeper Dive:** + - **Runtime Configuration:** Use environment variables for configuration that varies between environments (databases, API endpoints, feature flags). + - **Default Values:** Provide sensible defaults with `ENV` but allow overriding at runtime. + - **Configuration Validation:** Validate required environment variables at startup to fail fast if configuration is missing. + - **Security:** Never hardcode secrets in environment variables in the Dockerfile. +- **Guidance for Copilot:** + - Avoid hardcoding configuration inside the image. Use `ENV` for default values, but allow overriding at runtime. + - Recommend using environment variable validation in application startup code. + - Suggest using configuration management tools or external configuration services for complex applications. + - Advise on using secrets management solutions for sensitive configuration. +- **Example (Environment Variable Best Practices):** + +```dockerfile +# Set default values +ENV NODE_ENV=production +ENV PORT=3000 +ENV LOG_LEVEL=info + +# Use ARG for build-time variables +ARG BUILD_VERSION +ENV APP_VERSION=$BUILD_VERSION + +# The application should validate required env vars at startup +CMD ["node", "dist/main.js"] +``` + +## Container Security Best Practices + +### 1. Non-Root User + +- **Principle:** Running containers as `root` is a significant security risk and should be avoided in production. +- **Deeper Dive:** + - **Privilege Escalation:** Root containers can potentially escape to the host system if there are vulnerabilities in the container runtime. + - **File System Access:** Root containers have access to all files and directories, potentially exposing sensitive host data. + - **Network Access:** Root containers can bind to privileged ports and potentially interfere with host networking. + - **Resource Abuse:** Root containers can consume excessive system resources without proper limits. +- **Guidance for Copilot:** + - Always recommend defining a non-root `USER` in the Dockerfile. Create a dedicated user for your application. + - Ensure the non-root user has the minimum necessary permissions to run the application. + - Use `USER` directive early in the Dockerfile to ensure subsequent operations run as the non-root user. + - Consider using user namespaces or other security features when available. +- **Example (Secure User Creation):** + +```dockerfile +# Create a dedicated user and group +RUN addgroup -S appgroup && adduser -S appuser -G appgroup + +# Set proper ownership of application files +RUN chown -R appuser:appgroup /app + +# Switch to non-root user +USER appuser + +# Ensure the user can write to necessary directories +VOLUME ["/app/data"] +``` + +### 2. Minimal Base Images + +- **Principle:** Smaller images mean fewer packages, thus fewer vulnerabilities and a reduced attack surface. +- **Deeper Dive:** + - **Attack Surface Reduction:** Each package in the base image represents a potential vulnerability. Fewer packages mean fewer potential attack vectors. + - **Update Frequency:** Minimal images are updated more frequently and have shorter vulnerability exposure windows. + - **Resource Efficiency:** Smaller images consume less storage and network bandwidth. + - **Build Speed:** Smaller base images build faster and are easier to scan for vulnerabilities. +- **Guidance for Copilot:** + - Prioritize `alpine`, `slim`, or `distroless` images over full distributions when possible. + - Review base image vulnerabilities regularly using security scanning tools. + - Consider using language-specific minimal images (e.g., `openjdk:17-jre-slim` instead of `openjdk:17`). + - Stay updated with the latest minimal base image versions for security patches. +- **Example (Minimal Base Image Selection):** + +```dockerfile +# BAD: Full distribution with many unnecessary packages +FROM ubuntu:24.04 + +# GOOD: Minimal Alpine-based image +FROM node:18-alpine + +# BETTER: Distroless image for maximum security +FROM gcr.io/distroless/nodejs18-debian11 +``` + +### 3. Static Analysis Security Testing (SAST) for Dockerfiles + +- **Principle:** Scan Dockerfiles for security misconfigurations and known vulnerabilities before building images. +- **Deeper Dive:** + - **Dockerfile Linting:** Use tools like `hadolint` to check for Dockerfile best practices and security issues. + - **Base Image Scanning:** Scan base images for known vulnerabilities before using them. + - **CI/CD Integration:** Integrate security scanning into the CI/CD pipeline to catch issues early. + - **Policy Enforcement:** Define security policies and enforce them through automated scanning. +- **Guidance for Copilot:** + - Recommend integrating tools like `hadolint` (for Dockerfile linting) and `Trivy`, `Clair`, or `Snyk Container` (for image vulnerability scanning) into your CI pipeline. + - Suggest setting up automated scanning for both Dockerfiles and built images. + - Recommend failing builds if critical vulnerabilities are found in base images. + - Advise on regular scanning of images in registries for newly discovered vulnerabilities. +- **Example (Security Scanning in CI):** + +```yaml +# GitHub Actions example +- name: Run Hadolint + run: | + docker run --rm -i hadolint/hadolint < Dockerfile + +- name: Scan image for vulnerabilities + run: | + docker build -t myapp . + trivy image myapp +``` + +### 4. Image Signing & Verification + +- **Principle:** Ensure images haven't been tampered with and come from trusted sources. +- **Deeper Dive:** + - **Cryptographic Signing:** Use digital signatures to verify the authenticity and integrity of container images. + - **Trust Policies:** Define trust policies that specify which images are allowed to run in your environment. + - **Supply Chain Security:** Image signing is a key component of securing the software supply chain. + - **Compliance:** Many compliance frameworks require image signing for production deployments. +- **Guidance for Copilot:** + - Suggest using Notary or Docker Content Trust for signing and verifying images in production. + - Recommend implementing image signing in the CI/CD pipeline for all production images. + - Advise on setting up trust policies that prevent running unsigned images. + - Consider using newer tools like Cosign for more advanced signing features. +- **Example (Image Signing with Cosign):** + +```bash +# Sign an image +cosign sign -key cosign.key myregistry.com/myapp:v1.0.0 + +# Verify an image +cosign verify -key cosign.pub myregistry.com/myapp:v1.0.0 +``` + +### 5. Limit Capabilities & Read-Only Filesystems + +- **Principle:** Restrict container capabilities and ensure read-only access where possible to minimize the attack surface. +- **Deeper Dive:** + - **Linux Capabilities:** Drop unnecessary Linux capabilities that containers don't need to function. + - **Read-Only Root:** Mount the root filesystem as read-only when possible to prevent runtime modifications. + - **Seccomp Profiles:** Use seccomp profiles to restrict system calls that containers can make. + - **AppArmor/SELinux:** Use security modules to enforce additional access controls. +- **Guidance for Copilot:** + - Consider using `CAP_DROP` to remove unnecessary capabilities (e.g., `NET_RAW`, `SYS_ADMIN`). + - Recommend mounting read-only volumes for sensitive data and configuration files. + - Suggest using security profiles and policies when available in your container runtime. + - Advise on implementing defense in depth with multiple security controls. +- **Example (Capability Restrictions):** + +```dockerfile +# Drop unnecessary capabilities +RUN setcap -r /usr/bin/node + +# Or use security options in docker run +# docker run --cap-drop=ALL --security-opt=no-new-privileges myapp +``` + +### 6. No Sensitive Data in Image Layers + +- **Principle:** Never include secrets, private keys, or credentials in image layers as they become part of the image history. +- **Deeper Dive:** + - **Layer History:** All files added to an image are stored in the image history and can be extracted even if deleted in later layers. + - **Build Arguments:** While `--build-arg` can pass data during build, avoid passing sensitive information this way. + - **Runtime Secrets:** Use secrets management solutions to inject sensitive data at runtime. + - **Image Scanning:** Regular image scanning can detect accidentally included secrets. +- **Guidance for Copilot:** + - Use build arguments (`--build-arg`) for temporary secrets during build (but avoid passing sensitive info directly). + - Use secrets management solutions for runtime (Kubernetes Secrets, Docker Secrets, HashiCorp Vault). + - Recommend scanning images for accidentally included secrets. + - Suggest using multi-stage builds to avoid including build-time secrets in the final image. +- **Anti-pattern:** `ADD secrets.txt /app/secrets.txt` +- **Example (Secure Secret Management):** + +```dockerfile +# BAD: Never do this +# COPY secrets.txt /app/secrets.txt + +# GOOD: Use runtime secrets +# The application should read secrets from environment variables or mounted files +CMD ["node", "dist/main.js"] +``` + +### 7. Health Checks (Liveness & Readiness Probes) + +- **Principle:** Ensure containers are running and ready to serve traffic by implementing proper health checks. +- **Deeper Dive:** + - **Liveness Probes:** Check if the application is alive and responding to requests. Restart the container if it fails. + - **Readiness Probes:** Check if the application is ready to receive traffic. Remove from load balancer if it fails. + - **Health Check Design:** Design health checks that are lightweight, fast, and accurately reflect application health. + - **Orchestration Integration:** Health checks are critical for orchestration systems like Kubernetes to manage container lifecycle. +- **Guidance for Copilot:** + - Define `HEALTHCHECK` in Dockerfiles when the target runtime actually uses it (for example, standalone Docker or platforms that honor image health checks). + - In Kubernetes and other orchestrated environments, prefer liveness and readiness probes in the Pod spec, reusing the same lightweight health endpoint where possible. + - Design health checks that are specific to your application and check actual functionality. + - Use appropriate intervals and timeouts for health checks to balance responsiveness with overhead. + - Consider implementing both liveness and readiness checks for complex applications. +- **Example (Comprehensive Health Check):** + +```dockerfile +# Health check that verifies the application is responding +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD wget -q --spider http://localhost:8080/health || exit 1 + +# Alternative: Use application-specific health check +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD node healthcheck.js || exit 1 +``` + +## Container Runtime & Orchestration Best Practices + +### 1. Resource Limits + +- **Principle:** Limit CPU and memory to prevent resource exhaustion and noisy neighbors. +- **Deeper Dive:** + - **CPU Limits:** Set CPU limits to prevent containers from consuming excessive CPU time and affecting other containers. + - **Memory Limits:** Set memory limits to prevent containers from consuming all available memory and causing system instability. + - **Resource Requests:** Set resource requests to ensure containers have guaranteed access to minimum resources. + - **Monitoring:** Monitor resource usage to ensure limits are appropriate and not too restrictive. +- **Guidance for Copilot:** + - Always recommend setting `cpu_limits`, `memory_limits` in Docker Compose or Kubernetes resource requests/limits. + - Suggest monitoring resource usage to tune limits appropriately. + - Recommend setting both requests and limits for predictable resource allocation. + - Advise on using resource quotas in Kubernetes to manage cluster-wide resource usage. +- **Example (Docker Compose Resource Limits):** + +```yaml +services: + app: + image: myapp:latest + deploy: + resources: + limits: + cpus: 0.5 + memory: 512M + reservations: + cpus: 0.25 + memory: 256M +``` + +### 2. Logging & Monitoring + +- **Principle:** Collect and centralize container logs and metrics for observability and troubleshooting. +- **Deeper Dive:** + - **Structured Logging:** Use structured logging (JSON) for better parsing and analysis. + - **Log Aggregation:** Centralize logs from all containers for search, analysis, and alerting. + - **Metrics Collection:** Collect application and system metrics for performance monitoring. + - **Distributed Tracing:** Implement distributed tracing for understanding request flows across services. +- **Guidance for Copilot:** + - Use standard logging output (`STDOUT`/`STDERR`) for container logs. + - Integrate with log aggregators (Fluentd, Logstash, Loki) and monitoring tools (Prometheus, Grafana). + - Recommend implementing structured logging in applications for better observability. + - Suggest setting up log rotation and retention policies to manage storage costs. +- **Example (Structured Logging):** + +```javascript +// Application logging +const winston = require('winston'); +const logger = winston.createLogger({ + format: winston.format.json(), + transports: [new winston.transports.Console()] +}); +``` + +### 3. Persistent Storage + +- **Principle:** For stateful applications, use persistent volumes to maintain data across container restarts. +- **Deeper Dive:** + - **Volume Types:** Use named volumes, bind mounts, or cloud storage depending on your requirements. + - **Data Persistence:** Ensure data persists across container restarts, updates, and migrations. + - **Backup Strategy:** Implement backup strategies for persistent data to prevent data loss. + - **Performance:** Choose storage solutions that meet your performance requirements. +- **Guidance for Copilot:** + - Use Docker Volumes or Kubernetes Persistent Volumes for data that needs to persist beyond container lifecycle. + - Never store persistent data inside the container's writable layer. + - Recommend implementing backup and disaster recovery procedures for persistent data. + - Suggest using cloud-native storage solutions for better scalability and reliability. +- **Example (Docker Volume Usage):** + +```yaml +services: + database: + image: postgres:13 + volumes: + - postgres_data:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD_FILE: /run/secrets/db_password + +volumes: + postgres_data: +``` + +### 4. Networking + +- **Principle:** Use defined container networks for secure and isolated communication between containers. +- **Deeper Dive:** + - **Network Isolation:** Create separate networks for different application tiers or environments. + - **Service Discovery:** Use container orchestration features for automatic service discovery. + - **Network Policies:** Implement network policies to control traffic between containers. + - **Load Balancing:** Use load balancers for distributing traffic across multiple container instances. +- **Guidance for Copilot:** + - Create custom Docker networks for service isolation and security. + - Define network policies in Kubernetes to control pod-to-pod communication. + - Use service discovery mechanisms provided by your orchestration platform. + - Implement proper network segmentation for multi-tier applications. +- **Example (Docker Network Configuration):** + +```yaml +services: + web: + image: nginx + networks: + - frontend + - backend + + api: + image: myapi + networks: + - backend + +networks: + frontend: + backend: + internal: true +``` + +### 5. Orchestration (Kubernetes, Docker Swarm) + +- **Principle:** Use an orchestrator for managing containerized applications at scale. +- **Deeper Dive:** + - **Scaling:** Automatically scale applications based on demand and resource usage. + - **Self-Healing:** Automatically restart failed containers and replace unhealthy instances. + - **Service Discovery:** Provide built-in service discovery and load balancing. + - **Rolling Updates:** Perform zero-downtime updates with automatic rollback capabilities. +- **Guidance for Copilot:** + - Recommend Kubernetes for complex, large-scale deployments with advanced requirements. + - Leverage orchestrator features for scaling, self-healing, and service discovery. + - Use rolling update strategies for zero-downtime deployments. + - Implement proper resource management and monitoring in orchestrated environments. +- **Example (Kubernetes Deployment):** + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: myapp +spec: + replicas: 3 + selector: + matchLabels: + app: myapp + template: + metadata: + labels: + app: myapp + spec: + containers: + - name: myapp + image: myapp:latest + resources: + requests: + memory: "64Mi" + cpu: "250m" + limits: + memory: "128Mi" + cpu: "500m" +``` + +## Dockerfile Review Checklist + +- [ ] Is a multi-stage build used if applicable (compiled languages, heavy build tools)? +- [ ] Is a minimal, specific base image used (e.g., `alpine`, `slim`, versioned)? +- [ ] Are layers optimized (combining `RUN` commands, cleanup in same layer)? +- [ ] Is a `.dockerignore` file present and comprehensive? +- [ ] Are `COPY` instructions specific and minimal? +- [ ] Is a non-root `USER` defined for the running application? +- [ ] Is the `EXPOSE` instruction used for documentation? +- [ ] Is `CMD` and/or `ENTRYPOINT` used correctly? +- [ ] Are sensitive configurations handled via environment variables (not hardcoded)? +- [ ] Is a `HEALTHCHECK` instruction defined? +- [ ] Are there any secrets or sensitive data accidentally included in image layers? +- [ ] Are there static analysis tools (Hadolint, Trivy) integrated into CI? + +## Troubleshooting Docker Builds & Runtime + +### 1. Large Image Size + +- Review layers for unnecessary files. Use `docker history `. +- Implement multi-stage builds. +- Use a smaller base image. +- Optimize `RUN` commands and clean up temporary files. + +### 2. Slow Builds + +- Leverage build cache by ordering instructions from least to most frequent change. +- Use `.dockerignore` to exclude irrelevant files. +- Use `docker build --no-cache` for troubleshooting cache issues. + +### 3. Container Not Starting/Crashing + +- Check `CMD` and `ENTRYPOINT` instructions. +- Review container logs (`docker logs `). +- Ensure all dependencies are present in the final image. +- Check resource limits. + +### 4. Permissions Issues Inside Container + +- Verify file/directory permissions in the image. +- Ensure the `USER` has necessary permissions for operations. +- Check mounted volumes permissions. + +### 5. Network Connectivity Issues + +- Verify exposed ports (`EXPOSE`) and published ports (`-p` in `docker run`). +- Check container network configuration. +- Review firewall rules. + +## Conclusion + +Effective containerization with Docker is fundamental to modern DevOps. By following these best practices for Dockerfile creation, image optimization, security, and runtime management, you can guide developers in building highly efficient, secure, and portable applications. Remember to continuously evaluate and refine your container strategies as your application evolves. + +--- + + diff --git a/.github/instructions/github-workflows.instructions.md b/.github/instructions/github-workflows.instructions.md new file mode 100644 index 0000000000..dc63124c29 --- /dev/null +++ b/.github/instructions/github-workflows.instructions.md @@ -0,0 +1,955 @@ +--- +applyTo: ".github/workflows/*.yml,.github/workflows/*.yaml" +description: Comprehensive guide for building testable, secure, and efficient CI/CD pipelines using GitHub Workflows with emphasis on fork-testability and local development workflow patterns. +--- + +# GitHub Workflows Best Practices for Radius + +## Your Mission + +As GitHub Copilot, you are an expert in designing and optimizing CI/CD pipelines using GitHub Workflows. Your mission is to assist developers in creating efficient, secure, reliable, and **testable** automated workflows for building, testing, and deploying applications. You must prioritize testability from forks, local development patterns, security best practices, and provide actionable, detailed guidance. + +## Radius Workflow Design Principles + +These principles are specific to the Radius project and must be applied when creating or modifying workflows: + +### 1. **Core Logic Must Be Testable on Developer Machines** + +- **Principle:** Complex workflow logic should be executable on a developer's local machine with minimal setup, not embedded directly in workflow YAML files. +- **Implementation Pattern:** + - Use GitHub workflows for CI/CD setup, runner configuration, identity/security, and control flow + - Extract core business logic into Make targets that invoke shell scripts + - Keep only simple, straightforward operations directly in workflow steps +- **When to Extract Logic to Make:** + - Multi-step operations that could benefit from local testing + - Complex build, test, or deployment procedures + - Logic that needs to be reused across multiple workflows + - Operations that require environment-specific configuration + +- **When Inline YAML is Acceptable:** + - Single-command operations (e.g., `npm install`, `go build`) + - GitHub-specific setup actions (checkout, cache, artifact upload/download) + - Simple conditional checks + - Environment variable assignments + +- **Example Transformation:** + + **Before (embedded logic, not testable locally):** + + ```yaml + - name: Publish UDT types + run: | + mkdir ./bin + cp ./dist/linux_amd64/release/rad ./bin/rad + chmod +x ./bin/rad + export PATH=$GITHUB_WORKSPACE/bin:$PATH + which rad || { echo "cannot find rad"; exit 1; } + rad bicep download + rad version + rad bicep publish-extension -f ./test/functional-portable/dynamicrp/noncloud/resources/testdata/testresourcetypes.yaml --target br:${{ env.TEST_BICEP_TYPES_REGISTRY}}/testresources:latest --force + ``` + + **After (testable via Make):** + + ```yaml + - name: Publish UDT types + run: make workflow-udt-tests-publish-types + env: + TEST_BICEP_TYPES_REGISTRY: ${{ env.TEST_BICEP_TYPES_REGISTRY }} + ``` + +- **Guidance for Copilot:** + - When writing complex workflow steps, first ask if this logic should be in a Make target + - Suggest creating Make targets for multi-step operations + - Ensure Make targets are documented and accept configuration via environment variables + - Make targets should invoke shell scripts (following shell.instructions.md) for complex logic, not contain complex logic themselves + +### 2. **Workflows Must Be Testable from Forks** + +- **Principle:** Contributors should be able to fork the repository and test workflow changes on their fork with minimal setup, without requiring access to the main repository's secrets or special permissions. + +- **Fork-Friendly Trigger Configuration:** + - **ALWAYS include `workflow_dispatch`** during development to enable manual testing + - **IMPORTANT:** Comment out `workflow_dispatch` before merging to production for workflows that shouldn't be manually triggered in production + - Support running on any branch, not just `main` or specific protected branches + - Use conditional logic to handle missing secrets gracefully when running on forks + +- **Development Phase Pattern:** + + ```yaml + # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + --- + name: build-and-test + + on: + push: + branches: + - main + - "release/**" + pull_request: + branches: + - main + # workflow_dispatch: # Enable during development, comment out for production + # inputs: + # debug_enabled: + # description: Enable debug mode + # required: false + # default: "false" + ``` + +- **Production-Ready Pattern:** + + ```yaml + # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + --- + name: build-and-test + + on: + push: + branches: + - main + - "release/**" + pull_request: + branches: + - main + # workflow_dispatch is commented out for production workflows + ``` + +- **Fork-Friendly Secret Handling:** + + ```yaml + - name: Deploy to staging + if: github.repository == 'radius-project/radius' && github.event_name != 'pull_request' + env: + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + run: make workflow-deploy-staging + ``` + +- **Guidance for Copilot:** + - Include commented-out `workflow_dispatch` for all workflows with a note about uncommenting during development + - Use repository checks (`github.repository == 'radius-project/radius'`) for steps requiring secrets + - Provide helpful skip messages when operations can't run on forks + - Ensure core functionality (build, test) works without secrets when possible + +### 3. **Scheduled Workflows Must Not Trigger on Forks** + +- **Principle:** Scheduled workflows waste fork runners' compute time and should only run on the main repository. + +- **Pattern:** + + ```yaml + # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + --- + name: Scheduled + + on: + schedule: + - cron: "0 0 * * 0" # Weekly on Sunday at midnight + # workflow_dispatch: # Enable during development only + + jobs: + scheduled-task: + # Only run on the main repository, not forks + if: github.repository == 'radius-project/radius' + runs-on: ubuntu-24.04 + steps: + - name: Run scheduled task + run: make workflow-scheduled-task + ``` + +- **Guidance for Copilot:** + - Always add `if: github.repository == 'radius-project/radius'` to jobs in scheduled workflows + - Explain why schedules shouldn't run on forks when suggesting this pattern + +### 4. **Workflow Names Must Match File Names** + +- **Principle:** Prevents confusion when matching workflows in the GitHub Actions UI with files in the repository. + +- **Pattern:** + - File: `.github/workflows/build-and-test.yml` + - Workflow name: `name: build-and-test` + - File: `.github/workflows/deploy-production.yml` + - Workflow name: `name: deploy-production` + +- **Reusable Workflows Convention:** + - Reusable workflows must start with double underscore `__` prefix + - File: `.github/workflows/__reusable-build.yml` + - Workflow name: `name: __reusable-build` + +- **Guidance for Copilot:** + - Strongly recommend matching file and workflow names + - For reusable workflows, enforce the `__` prefix convention + - Flag mismatches during PR reviews + +### 5. **Use GitHub CLI for GitHub Operations** + +- **Principle:** The GitHub CLI provides automatic authentication context that works both locally (when developer is logged in) and in workflows (via `GITHUB_TOKEN`). + +- **When to Prefer GitHub CLI:** + - Creating/updating issues or pull requests + - Managing releases + - Working with GitHub API + - Operations that need to work identically locally and in CI + +- **When to Use GitHub Actions:** + - Workflow-specific setup (checkout, cache, artifact management) + - Installing tools and dependencies on runners + - Matrix operations and parallel execution + - Retrieving stored secrets from GitHub + +- **Example:** + + ```yaml + - name: Create release + run: | + gh release create ${{ github.ref_name }} \ + --title "Release ${{ github.ref_name }}" \ + --notes "Release notes here" + env: + GH_TOKEN: ${{ github.token }} + ``` + +- **Guidance for Copilot:** + - Suggest GitHub CLI commands that can be wrapped in Make targets + - Use standard GitHub actions for runner setup and artifact management + - Explain the testability benefits when recommending CLI over actions + +### 6. **Configuration via Environment Variables** + +- **Principle:** All configuration should be provided through environment variables, enabling the same code to run in different contexts (local dev, CI, different environments). + +- **Pattern:** + - GitHub workflows set environment variables in setup steps + - Make targets and shell scripts read environment variables + - Local developers can set variables in `.env` files or shell config + - Document required environment variables in README or workflow comments + +- **Example:** + + ```yaml + jobs: + deploy: + runs-on: ubuntu-24.04 + steps: + - name: Set environment variables + run: | + echo "DEPLOY_ENV=staging" >> $GITHUB_ENV + echo "DEPLOY_REGION=eastus" >> $GITHUB_ENV + echo "APP_VERSION=${{ github.sha }}" >> $GITHUB_ENV + + - name: Deploy application + run: make workflow-deploy + env: + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + ``` + +- **Guidance for Copilot:** + - Avoid hardcoding values in scripts + - Document required environment variables + - Provide sensible defaults where appropriate + +### 7. **Avoid Logic Duplication** + +- **Principle:** Apply DRY (Don't Repeat Yourself). Use reusable workflows, composite actions, and Make targets. + +- **Hierarchy of Reusability:** + 1. **Make targets** - For logic that should work locally and in CI + 2. **Reusable workflows** (`__prefix.yml`) - For complete workflow patterns + 3. **Composite actions** - For GitHub-specific setup sequences + 4. **Shell scripts** - For complex business logic invoked by Make + +- **Reusable Workflow Pattern:** + + ```yaml + # .github/workflows/__reusable-test.yml + # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + --- + name: __reusable-test + + on: + workflow_call: + inputs: + test-suite: + required: true + type: string + secrets: + test-token: + required: false + + jobs: + test: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@ # vX.Y.Z + - name: Run tests + run: make test-${{ inputs.test-suite }} + env: + TEST_TOKEN: ${{ secrets.test-token }} + ``` + + ```yaml + # .github/workflows/ci.yml + name: ci + + jobs: + unit-tests: + uses: ./.github/workflows/__reusable-test.yml + with: + test-suite: unit + ``` + +- **Guidance for Copilot:** + - Identify repeated patterns across workflows + - Suggest extracting to reusable workflows with `__` prefix + - Ensure reusable workflows are well-documented + +## Core GitHub Workflows Concepts and Structure + +### 1. Workflow Structure + +- **Naming Conventions:** Use descriptive names matching file names (e.g., `build-and-test.yml` → `name: build-and-test`) +- **Triggers (`on`):** + - Use appropriate events: `push`, `pull_request`, `schedule`, `repository_dispatch`, `workflow_call` + - Comment out `workflow_dispatch` in production workflows (use during development only) + - For scheduled workflows, add fork protection: `if: github.repository == 'radius-project/radius'` +- **Concurrency:** Use to prevent simultaneous runs and avoid race conditions + ```yaml + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + ``` +- **Permissions:** Define explicitly following least privilege principle + ```yaml + permissions: + contents: read + pull-requests: write # Only if needed + ``` + +### 2. Jobs + +- **Principle:** Jobs represent distinct pipeline phases (build, test, lint, security-scan, deploy) + +- **Job Dependencies:** + + ```yaml + jobs: + build: + runs-on: ubuntu-24.04 + outputs: + artifact_path: ${{ steps.package.outputs.path }} + steps: + - name: Build and package + id: package + run: make workflow-build + + test: + needs: build + runs-on: ubuntu-24.04 + steps: + - name: Run tests + run: make workflow-test + + deploy: + needs: [build, test] + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 + steps: + - name: Deploy + run: make workflow-deploy + ``` + +- **Conditional Execution:** + ```yaml + deploy-staging: + if: | + github.repository == 'radius-project/radius' && + (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') + ``` + +### 3. Steps and Actions + +- **Action Versioning:** Always pin to full commit SHA for security and immutability + + ```yaml + - name: Checkout code + uses: actions/checkout@ # vX.Y.Z + with: + persist-credentials: false + fetch-depth: 1 + ``` + +- **Trust Model for External Actions:** + - **Highly trusted:** `actions/*`, `github/*` (GitHub official) + - **Trusted:** Microsoft, CNCF, verified organizations + - **Use with caution:** Community actions (consider forking and auditing) + - **Avoid:** Unverified or unknown authors + +- **Step Naming:** Use descriptive names for logs and debugging + ```yaml + - name: Install dependencies and build project + run: make workflow-build-all + ``` + +## Security Best Practices + +### 1. Secret Management + +- **Never hardcode secrets** - Use GitHub Secrets exclusively + + ```yaml + - name: Deploy to cloud + env: + CLOUD_API_KEY: ${{ secrets.CLOUD_API_KEY }} + run: make workflow-deploy + ``` + +- **Environment-Specific Secrets:** + + ```yaml + jobs: + deploy-prod: + environment: + name: production + url: https://prod.radius.dev + steps: + - name: Deploy + env: + PROD_SECRET: ${{ secrets.PROD_SECRET }} + run: make workflow-deploy-production + ``` + +- **Fork-Safe Secret Usage:** + ```yaml + - name: Upload to registry + if: github.repository == 'radius-project/radius' && github.event_name == 'push' + env: + REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + run: make workflow-publish + ``` + +### 2. OIDC for Cloud Authentication + +- **Principle:** Use OpenID Connect for cloud providers (AWS, Azure, GCP) instead of long-lived credentials + +- **Azure Example:** + ```yaml + - name: Azure Login + uses: azure/login@ # vX.Y.Z + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + ``` + +### 3. Least Privilege for GITHUB_TOKEN + +- **Always set minimum permissions:** + + ```yaml + permissions: + contents: read # Default - read-only access + pull-requests: write # Only when updating PRs + checks: write # Only when updating check runs + ``` + +- **Job-Level Overrides:** + + ```yaml + permissions: + contents: read # Workflow default + + jobs: + test: + permissions: + contents: read # This job only reads + steps: + - run: make test + + update-pr: + permissions: + contents: read + pull-requests: write # This job needs to update PRs + steps: + - run: make update-pr-status + ``` + +### 4. Dependency and Security Scanning + +- **Dependency Review:** + + ```yaml + - name: Dependency Review + uses: actions/dependency-review-action@ # vX.Y.Z + if: github.event_name == 'pull_request' + ``` + +- **Static Analysis (SAST):** + ```yaml + - name: Run CodeQL Analysis + uses: github/codeql-action/analyze@ # vX.Y.Z + ``` + +### 5. Secret Scanning Prevention + +- Enable GitHub's built-in secret scanning +- Use pre-commit hooks (e.g., `git-secrets`) +- Never log secrets, even when masked +- Review workflow logs for accidental exposure + +## Optimization and Performance + +### 1. Caching + +- **Effective Cache Keys:** + + ```yaml + - name: Cache dependencies + uses: actions/cache@ # vX.Y.Z + with: + path: | + ~/.npm + node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + ``` + +- **Cache for Multiple Package Managers:** + ```yaml + - name: Cache Go modules + uses: actions/cache@ # vX.Y.Z + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + ``` + +### 2. Matrix Strategies + +- **Parallel Testing Across Environments:** + ```yaml + jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, windows-latest, macos-latest] + go-version: ["1.21", "1.22"] + steps: + - uses: actions/checkout@ # vX.Y.Z + - uses: actions/setup-go@ # vX.Y.Z + with: + go-version: ${{ matrix.go-version }} + - run: make test + ``` + +### 3. Shallow Clones + +- **Default Pattern:** + + ```yaml + - uses: actions/checkout@ # vX.Y.Z + with: + fetch-depth: 1 # Shallow clone for speed + persist-credentials: false # Don't persist credentials + submodules: false # Don't fetch submodules unless needed + ``` + +- **When Full History Needed:** + ```yaml + - uses: actions/checkout@ # vX.Y.Z + with: + fetch-depth: 0 # Full history for release tagging, changelog generation + ``` + +### 4. Artifacts + +- **Build Artifact Sharing:** + + ```yaml + jobs: + build: + steps: + - name: Build application + run: make workflow-build + + - name: Upload build artifacts + uses: actions/upload-artifact@ # vX.Y.Z + with: + name: build-artifacts + path: ./dist + retention-days: 7 + + test: + needs: build + steps: + - name: Download build artifacts + uses: actions/download-artifact@ # vX.Y.Z + with: + name: build-artifacts + path: ./dist + + - name: Run tests + run: make workflow-test + ``` + +## Testing in CI/CD + +### 1. Unit Tests + +- **Fast Feedback Loop:** + + ```yaml + unit-tests: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@ + - name: Run unit tests with coverage + run: make test-unit + + - name: Upload coverage report + uses: actions/upload-artifact@ + with: + name: coverage-report + path: coverage/ + ``` + +### 2. Integration Tests + +- **With Service Dependencies:** + ```yaml + integration-tests: + runs-on: ubuntu-24.04 + services: + postgres: + image: postgres:15 + env: + POSTGRES_PASSWORD: testpass + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@ + - name: Run integration tests + run: make test-integration + env: + DATABASE_URL: postgresql://postgres:testpass@localhost:5432/testdb + ``` + +### 3. End-to-End Tests + +- **Against Staging Environment:** + ```yaml + e2e-tests: + runs-on: ubuntu-24.04 + needs: deploy-staging + steps: + - uses: actions/checkout@ + - name: Run E2E tests + run: make test-e2e + env: + TEST_ENV_URL: ${{ needs.deploy-staging.outputs.staging_url }} + ``` + +### 4. Test Reporting + +- **Publish Test Results:** + ```yaml + - name: Upload test results + if: always() + uses: actions/upload-artifact@ + with: + name: test-results + path: | + test-results/ + screenshots/ + videos/ + ``` + +## Workflow Review Checklist + +Use this checklist when reviewing workflow changes: + +### Radius-Specific Principles + +- [ ] Complex logic is extracted to Make targets (testable locally) +- [ ] Make targets invoke shell scripts for complex operations +- [ ] `workflow_dispatch` is commented out for production workflows +- [ ] Scheduled workflows have fork protection (`if: github.repository == 'radius-project/radius'`) +- [ ] Steps requiring secrets check repository context +- [ ] Workflow name matches file name (exactly) +- [ ] Reusable workflows use `__` prefix +- [ ] Configuration is via environment variables +- [ ] GitHub CLI is used for GitHub operations (when appropriate) +- [ ] No duplicated logic (DRY principle applied) + +### Security + +- [ ] Secrets accessed via `${{ secrets.NAME }}` only +- [ ] OIDC used for cloud authentication (where applicable) +- [ ] `GITHUB_TOKEN` permissions set to minimum required +- [ ] External actions pinned to full commit SHA +- [ ] External actions from trusted sources only +- [ ] Dependency scanning enabled +- [ ] Secret scanning enabled + +### Performance + +- [ ] Caching configured with effective keys +- [ ] Shallow clones used (`fetch-depth: 1`) unless full history needed +- [ ] Artifacts used for job-to-job data transfer +- [ ] Matrix strategy for parallel operations +- [ ] `retention-days` set appropriately for artifacts + +### Testing + +- [ ] Unit tests run early in pipeline +- [ ] Integration tests configured with service dependencies +- [ ] E2E tests run against appropriate environment +- [ ] Test reports uploaded as artifacts +- [ ] Tests can run on forks (without secrets where possible) + +### Deployment + +- [ ] Environment protection configured for sensitive deployments +- [ ] Manual approvals for production +- [ ] Rollback strategy documented and implemented +- [ ] Health checks validate deployments +- [ ] Fork protection on deployment jobs + +### Structure + +- [ ] Clear job names representing pipeline phases +- [ ] `needs` dependencies properly defined +- [ ] Conditional execution uses `if` appropriately +- [ ] Step names are descriptive +- [ ] Concurrency configured to prevent conflicts +- [ ] Timeout configured for long-running jobs + +## Troubleshooting + +### Workflow Not Triggering + +1. Check `on` triggers match the event +2. Verify `paths`, `branches` filters are correct +3. For `workflow_dispatch`, ensure file is in default branch +4. Review `if` conditions that might skip execution +5. Check concurrency settings for blocking runs + +### Permission Errors + +1. Review `permissions` at workflow and job level +2. Verify secret access and environment configuration +3. For OIDC, check trust policy in cloud provider +4. Confirm repository context for fork-safe operations + +### Cache Misses + +1. Validate cache key uses `hashFiles()` correctly +2. Ensure `path` matches actual dependency location +3. Use `restore-keys` for fallback patterns +4. Check cache size limits + +### Flaky Tests + +1. Add explicit waits (avoid `sleep`) +2. Ensure test isolation and cleanup +3. Use stable selectors for E2E tests +4. Implement retries for transient failures +5. Capture screenshots/videos on failure + +### Fork Testing Issues + +1. Verify `workflow_dispatch` is uncommented for testing +2. Check repository-specific `if` conditions +3. Ensure Make targets work without secrets +4. Test with minimal environment setup + +## GitHub Actions Workflow Review Checklist (Comprehensive) + +This checklist provides a granular set of criteria for reviewing GitHub Actions workflows to ensure they adhere to best practices for security, performance, and reliability. + +- [ ] **General Structure and Design:** + - Is the workflow `name` clear, descriptive, and unique? + - Are `on` triggers appropriate for the workflow's purpose (e.g., `push`, `pull_request`, `workflow_dispatch`, `schedule`)? Are path/branch filters used effectively? + - Is `concurrency` used for critical workflows or shared resources to prevent race conditions or resource exhaustion? + - Are global `permissions` set to the principle of least privilege (`contents: read` by default), with specific overrides for jobs? + - Are reusable workflows (`workflow_call`) leveraged for common patterns to reduce duplication and improve maintainability? + - Is the workflow organized logically with meaningful job and step names? + +- [ ] **Jobs and Steps Best Practices:** + - Are jobs clearly named and represent distinct phases (e.g., `build`, `lint`, `test`, `deploy`)? + - Are `needs` dependencies correctly defined between jobs to ensure proper execution order? + - Are `outputs` used efficiently for inter-job and inter-workflow communication? + - Are `if` conditions used effectively for conditional job/step execution (e.g., environment-specific deployments, branch-specific actions)? + - Are all `uses` actions securely versioned (pinned to a full commit SHA)? Avoid `main` or `latest` tags. + - Are `run` commands efficient and clean (combined with `&&`, temporary files removed, multi-line scripts clearly formatted)? + - Are environment variables (`env`) defined at the appropriate scope (workflow, job, step) and never hardcoded sensitive data? + - Is `timeout-minutes` set for long-running jobs to prevent hung workflows? + +- [ ] **Security Considerations:** + - Are all sensitive data accessed exclusively via GitHub `secrets` context (`${{ secrets.MY_SECRET }}`)? Never hardcoded, never exposed in logs (even if masked). + - Is OpenID Connect (OIDC) used for cloud authentication where possible, eliminating long-lived credentials? + - Is `GITHUB_TOKEN` permission scope explicitly defined and limited to the minimum necessary access (`contents: read` as a baseline)? + - Are Software Composition Analysis (SCA) tools (e.g., `dependency-review-action`, Snyk) integrated to scan for vulnerable dependencies? + - Are Static Application Security Testing (SAST) tools (e.g., CodeQL, SonarQube) integrated to scan source code for vulnerabilities, with critical findings blocking builds? + - Is secret scanning enabled for the repository and are pre-commit hooks suggested for local credential leak prevention? + - Is there a strategy for container image signing (e.g., Notary, Cosign) and verification in deployment workflows if container images are used? + - For self-hosted runners, are security hardening guidelines followed and network access restricted? + +- [ ] **Optimization and Performance:** + - Is caching (`actions/cache`) effectively used for package manager dependencies (`node_modules`, `pip` caches, Maven/Gradle caches) and build outputs? + - Are cache `key` and `restore-keys` designed for optimal cache hit rates (e.g., using `hashFiles`)? + - Is `strategy.matrix` used for parallelizing tests or builds across different environments, language versions, or OSs? + - Is `fetch-depth: 1` used for `actions/checkout` where full Git history is not required? + - Are artifacts (`actions/upload-artifact`, `actions/download-artifact`) used efficiently for transferring data between jobs/workflows rather than re-building or re-fetching? + - Are large files managed with Git LFS and optimized for checkout if necessary? + +- [ ] **Testing Strategy Integration:** + - Are comprehensive unit tests configured with a dedicated job early in the pipeline? + - Are integration tests defined, ideally leveraging `services` for dependencies, and run after unit tests? + - Are End-to-End (E2E) tests included, preferably against a staging environment, with robust flakiness mitigation? + - Are performance and load tests integrated for critical applications with defined thresholds? + - Are all test reports (JUnit XML, HTML, coverage) collected, published as artifacts, and integrated into GitHub Checks/Annotations for clear visibility? + - Is code coverage tracked and enforced with a minimum threshold? + +- [ ] **Deployment Strategy and Reliability:** + - Are staging and production deployments using GitHub `environment` rules with appropriate protections (manual approvals, required reviewers, branch restrictions)? + - Are manual approval steps configured for sensitive production deployments? + - Is a clear and well-tested rollback strategy in place and automated where possible (e.g., `kubectl rollout undo`, reverting to previous stable image)? + - Are chosen deployment types (e.g., rolling, blue/green, canary, dark launch) appropriate for the application's criticality and risk tolerance? + - Are post-deployment health checks and automated smoke tests implemented to validate successful deployment? + - Is the workflow resilient to temporary failures (e.g., retries for flaky network operations)? + +- [ ] **Observability and Monitoring:** + - Is logging adequate for debugging workflow failures (using STDOUT/STDERR for application logs)? + - Are relevant application and infrastructure metrics collected and exposed (e.g., Prometheus metrics)? + - Are alerts configured for critical workflow failures, deployment issues, or application anomalies detected in production? + - Is distributed tracing (e.g., OpenTelemetry, Jaeger) integrated for understanding request flows in microservices architectures? + - Are artifact `retention-days` configured appropriately to manage storage and compliance? + +## Troubleshooting Common GitHub Workflows Issues (Deep Dive) + +This section provides an expanded guide to diagnosing and resolving frequent problems encountered when working with GitHub Workflows. + +### 1. Workflow Not Triggering or Jobs/Steps Skipping Unexpectedly + +- **Root Causes:** Mismatched `on` triggers, incorrect `paths` or `branches` filters, erroneous `if` conditions, or `concurrency` limitations. +- **Actionable Steps:** + - **Verify Triggers:** + - Check the `on` block for exact match with the event that should trigger the workflow (e.g., `push`, `pull_request`, `workflow_dispatch`, `schedule`). + - Ensure `branches`, `tags`, or `paths` filters are correctly defined and match the event context. Remember that `paths-ignore` and `branches-ignore` take precedence. + - If using `workflow_dispatch`, verify the workflow file is in the default branch and any required `inputs` are provided correctly during manual trigger. + - **Inspect `if` Conditions:** + - Carefully review all `if` conditions at the workflow, job, and step levels. A single false condition can prevent execution. + - Use `always()` on a debug step to print context variables (`${{ toJson(github) }}`, `${{ toJson(job) }}`, `${{ toJson(steps) }}`) to understand the exact state during evaluation. + - Test complex `if` conditions in a simplified workflow. + - **Check `concurrency`:** + - If `concurrency` is defined, verify if a previous run is blocking a new one for the same group. Check the "Concurrency" tab in the workflow run. + - **Branch Protection Rules:** Ensure no branch protection rules are preventing workflows from running on certain branches or requiring specific checks that haven't passed. + +### 2. Permissions Errors (`Resource not accessible by integration`, `Permission denied`) + +- **Root Causes:** `GITHUB_TOKEN` lacking necessary permissions, incorrect environment secrets access, or insufficient permissions for external actions. +- **Actionable Steps:** + - **`GITHUB_TOKEN` Permissions:** + - Review the `permissions` block at both the workflow and job levels. Default to `contents: read` globally and grant specific write permissions only where absolutely necessary (e.g., `pull-requests: write` for updating PR status, `packages: write` for publishing packages). + - Understand the default permissions of `GITHUB_TOKEN` which are often too broad. + - **Secret Access:** + - Verify if secrets are correctly configured in the repository, organization, or environment settings. + - Ensure the workflow/job has access to the specific environment if environment secrets are used. Check if any manual approvals are pending for the environment. + - Confirm the secret name matches exactly (`secrets.MY_API_KEY`). + - **OIDC Configuration:** + - For OIDC-based cloud authentication, double-check the trust policy configuration in your cloud provider (AWS IAM roles, Azure AD app registrations, GCP service accounts) to ensure it correctly trusts GitHub's OIDC issuer. + - Verify the role/identity assigned has the necessary permissions for the cloud resources being accessed. + +### 3. Caching Issues (`Cache not found`, `Cache miss`, `Cache creation failed`) + +- **Root Causes:** Incorrect cache key logic, `path` mismatch, cache size limits, or frequent cache invalidation. +- **Actionable Steps:** + - **Validate Cache Keys:** + - Verify `key` and `restore-keys` are correct and dynamically change only when dependencies truly change (e.g., `key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}`). A cache key that is too dynamic will always result in a miss. + - Use `restore-keys` to provide fallbacks for slight variations, increasing cache hit chances. + - **Check `path`:** + - Ensure the `path` specified in `actions/cache` for saving and restoring corresponds exactly to the directory where dependencies are installed or artifacts are generated. + - Verify the existence of the `path` before caching. + - **Debug Cache Behavior:** + - Use the `actions/cache/restore` action with `lookup-only: true` to inspect what keys are being tried and why a cache miss occurred without affecting the build. + - Review workflow logs for `Cache hit` or `Cache miss` messages and associated keys. + - **Cache Size and Limits:** Be aware of GitHub Actions cache size limits per repository. If caches are very large, they might be evicted frequently. + +### 4. Long Running Workflows or Timeouts + +- **Root Causes:** Inefficient steps, lack of parallelism, large dependencies, unoptimized Docker image builds, or resource bottlenecks on runners. +- **Actionable Steps:** + - **Profile Execution Times:** + - Use the workflow run summary to identify the longest-running jobs and steps. This is your primary tool for optimization. + - **Optimize Steps:** + - Combine `run` commands with `&&` to reduce layer creation and overhead in Docker builds. + - Clean up temporary files immediately after use (`rm -rf` in the same `RUN` command). + - Install only necessary dependencies. + - **Leverage Caching:** + - Ensure `actions/cache` is optimally configured for all significant dependencies and build outputs. + - **Parallelize with Matrix Strategies:** + - Break down tests or builds into smaller, parallelizable units using `strategy.matrix` to run them concurrently. + - **Choose Appropriate Runners:** + - Review `runs-on`. For very resource-intensive tasks, consider using larger GitHub-hosted runners (if available) or self-hosted runners with more powerful specs. + - **Break Down Workflows:** + - For very complex or long workflows, consider breaking them into smaller, independent workflows that trigger each other or use reusable workflows. + +### 5. Flaky Tests in CI (`Random failures`, `Passes locally, fails in CI`) + +- **Root Causes:** Non-deterministic tests, race conditions, environmental inconsistencies between local and CI, reliance on external services, or poor test isolation. +- **Actionable Steps:** + - **Ensure Test Isolation:** + - Make sure each test is independent and doesn't rely on the state left by previous tests. Clean up resources (e.g., database entries) after each test or test suite. + - **Eliminate Race Conditions:** + - For integration/E2E tests, use explicit waits (e.g., wait for element to be visible, wait for API response) instead of arbitrary `sleep` commands. + - Implement retries for operations that interact with external services or have transient failures. + - **Standardize Environments:** + - Ensure the CI environment (Node.js version, Python packages, database versions) matches the local development environment as closely as possible. + - Use Docker `services` for consistent test dependencies. + - **Robust Selectors (E2E):** + - Use stable, unique selectors in E2E tests (e.g., `data-testid` attributes) instead of brittle CSS classes or XPath. + - **Debugging Tools:** + - Configure E2E test frameworks to capture screenshots and video recordings on test failure in CI to visually diagnose issues. + - **Run Flaky Tests in Isolation:** + - If a test is consistently flaky, isolate it and run it repeatedly to identify the underlying non-deterministic behavior. + +### 6. Deployment Failures (Application Not Working After Deploy) + +- **Root Causes:** Configuration drift, environmental differences, missing runtime dependencies, application errors, or network issues post-deployment. +- **Actionable Steps:** + - **Thorough Log Review:** + - Review deployment logs (`kubectl logs`, application logs, server logs) for any error messages, warnings, or unexpected output during the deployment process and immediately after. + - **Configuration Validation:** + - Verify environment variables, ConfigMaps, Secrets, and other configuration injected into the deployed application. Ensure they match the target environment's requirements and are not missing or malformed. + - Use pre-deployment checks to validate configuration. + - **Dependency Check:** + - Confirm all application runtime dependencies (libraries, frameworks, external services) are correctly bundled within the container image or installed in the target environment. + - **Post-Deployment Health Checks:** + - Implement robust automated smoke tests and health checks _after_ deployment to immediately validate core functionality and connectivity. Trigger rollbacks if these fail. + - **Network Connectivity:** + - Check network connectivity between deployed components (e.g., application to database, service to service) within the new environment. Review firewall rules, security groups, and Kubernetes network policies. + - **Rollback Immediately:** + - If a production deployment fails or causes degradation, trigger the rollback strategy immediately to restore service. Diagnose the issue in a non-production environment. + +## Conclusion + +These guidelines combine industry best practices for GitHub Workflows with Radius-specific patterns that prioritize testability, security, and developer experience. By following these principles, you'll create workflows that are: + +- **Testable:** Core logic runs locally via Make, workflows can be tested on forks +- **Secure:** Least privilege, secret management, OIDC, dependency scanning +- **Efficient:** Caching, parallelization, shallow clones, smart artifact usage +- **Maintainable:** DRY principle, reusable workflows, clear naming conventions +- **Reliable:** Comprehensive testing, environment protection, rollback strategies + +Remember: Workflows are code. Apply the same rigor to workflow development as you would to application code. + +--- + + diff --git a/.github/instructions/golang.instructions.md b/.github/instructions/golang.instructions.md new file mode 100644 index 0000000000..3f844ab826 --- /dev/null +++ b/.github/instructions/golang.instructions.md @@ -0,0 +1,382 @@ +--- +applyTo: "**/*.go,**/go.mod,**/go.sum,**/go.work" +description: Instructions for writing Go code following idiomatic Go practices and community standards +--- + +# GoLang Development Instructions + +Follow idiomatic Go practices and community standards when writing Go code. These instructions are based on [Effective Go](https://go.dev/doc/effective_go), [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments), and [Google's Go Style Guide](https://google.github.io/styleguide/go/). + +## General Instructions + +- Write simple, clear, and idiomatic Go code +- Favor clarity and simplicity over cleverness +- Follow the principle of least surprise +- Keep the happy path left-aligned (minimize indentation) +- Return early to reduce nesting +- Prefer early return over if-else chains; use `if condition { return }` pattern to avoid else blocks +- Make the zero value useful +- Write self-documenting code with clear, descriptive names +- Document exported types, functions, methods, and packages +- Use Go modules for dependency management +- Leverage the Go standard library instead of reinventing the wheel (e.g., use `strings.Builder` for string concatenation, `filepath.Join` for path construction) +- Prefer standard library solutions over custom implementations when functionality exists +- Write comments in English by default; translate only upon user request +- Avoid using emoji in code and comments + +## Naming Conventions + +### Packages + +- Use lowercase, single-word package names +- Avoid underscores, hyphens, or mixedCaps +- Choose names that describe what the package provides, not what it contains +- Avoid generic names like `util`, `common`, or `base` +- Package names should be singular, not plural + +#### Package Declaration Rules (CRITICAL) + +- **NEVER duplicate `package` declarations** - each Go file must have exactly ONE `package` line +- When editing an existing `.go` file: + - **PRESERVE** the existing `package` declaration - do not add another one + - If you need to replace the entire file content, start with the existing package name +- When creating a new `.go` file: + - **BEFORE writing any code**, check what package name other `.go` files in the same directory use + - Use the SAME package name as existing files in that directory + - If it's a new directory, use the directory name as the package name + - Write **exactly one** `package ` line at the very top of the file +- When using file creation or replacement tools: + - **ALWAYS verify** the target file doesn't already have a `package` declaration before adding one + - If replacing file content, include only ONE `package` declaration in the new content + - **NEVER** create files with multiple `package` lines or duplicate declarations + +### Variables and Functions + +- Use mixedCaps or MixedCaps (camelCase) rather than underscores +- Keep names short but descriptive +- Use single-letter variables only for very short scopes (like loop indices) +- Exported names start with a capital letter +- Unexported names start with a lowercase letter +- Avoid stuttering (e.g., avoid `http.HTTPServer`, prefer `http.Server`) + +### Interfaces + +- Name interfaces with -er suffix when possible (e.g., `Reader`, `Writer`, `Formatter`) +- Single-method interfaces should be named after the method (e.g., `Read` → `Reader`) +- Keep interfaces small and focused + +### Constants + +- Use MixedCaps for exported constants +- Use mixedCaps for unexported constants +- Group related constants using `const` blocks +- Consider using typed constants for better type safety + +## Code Style and Formatting + +### Formatting + +- Always use `gofmt` to format code +- Use `goimports` to manage imports automatically +- Keep line length reasonable (no hard limit, but consider readability) +- Add blank lines to separate logical groups of code + +### Comments + +- Strive for self-documenting code; prefer clear variable names, function names, and code structure over comments +- Write comments only when necessary to explain complex logic, business rules, or non-obvious behavior +- Write comments in complete sentences in English by default +- Translate comments to other languages only upon specific user request +- Start sentences with the name of the thing being described +- Package comments should start with "Package [name]" +- Use line comments (`//`) for most comments +- Use block comments (`/* */`) sparingly, mainly for package documentation +- Document why, not what, unless the what is complex +- Avoid emoji in comments and code + +### Error Handling + +- Check errors immediately after the function call +- Don't ignore errors using `_` unless you have a good reason (document why) +- Wrap errors with context using `fmt.Errorf` with `%w` verb +- Create custom error types when you need to check for specific errors +- Place error returns as the last return value +- Name error variables `err` +- Keep error messages lowercase and don't end with punctuation + +## Architecture and Project Structure + +### Package Organization + +- Follow standard Go project layout conventions +- Keep `main` packages in `cmd/` directory +- Put reusable packages in `pkg/` or `internal/` +- Use `internal/` for packages that shouldn't be imported by external projects +- Group related functionality into packages +- Avoid circular dependencies + +### Dependency Management + +- Use Go modules (`go.mod` and `go.sum`) +- Keep dependencies minimal +- Regularly update dependencies for security patches +- Use `go mod tidy` to clean up unused dependencies +- Vendor dependencies only when necessary + +## Type Safety and Language Features + +### Type Definitions + +- Define types to add meaning and type safety +- Use struct tags for JSON, XML, database mappings +- Prefer explicit type conversions +- Use type assertions carefully and check the second return value +- Prefer generics over unconstrained types; when an unconstrained type is truly needed, use the predeclared alias `any` instead of `interface{}` (Go 1.18+) + +### Pointers vs Values + +- Use pointer receivers for large structs or when you need to modify the receiver +- Use value receivers for small structs and when immutability is desired +- Use pointer parameters when you need to modify the argument or for large structs +- Use value parameters for small structs and when you want to prevent modification +- Be consistent within a type's method set +- Consider the zero value when choosing pointer vs value receivers + +### Interfaces and Composition + +- Accept interfaces, return concrete types +- Keep interfaces small (1-3 methods is ideal) +- Use embedding for composition +- Define interfaces close to where they're used, not where they're implemented +- Don't export interfaces unless necessary + +## Concurrency + +### Goroutines + +- Be cautious about creating goroutines in libraries; prefer letting the caller control concurrency +- If you must create goroutines in libraries, provide clear documentation and cleanup mechanisms +- Always know how a goroutine will exit +- Use `sync.WaitGroup` or channels to wait for goroutines +- Avoid goroutine leaks by ensuring cleanup + +### Channels + +- Use channels to communicate between goroutines +- Don't communicate by sharing memory; share memory by communicating +- Close channels from the sender side, not the receiver +- Use buffered channels when you know the capacity +- Use `select` for non-blocking operations + +### Synchronization + +- Use `sync.Mutex` for protecting shared state +- Keep critical sections small +- Use `sync.RWMutex` when you have many readers +- Choose between channels and mutexes based on the use case: use channels for communication, mutexes for protecting state +- Use `sync.Once` for one-time initialization +- WaitGroup usage by Go version: + + - If `go >= 1.25` in `go.mod`, use the new `WaitGroup.Go` method ([documentation](https://pkg.go.dev/sync#WaitGroup)): + + ```go + var wg sync.WaitGroup + wg.Go(task1) + wg.Go(task2) + wg.Wait() + ``` + + - If `go < 1.25`, use the classic `Add`/`Done` pattern + +## Error Handling Patterns + +### Creating Errors + +- Use `errors.New` for simple static errors +- Use `fmt.Errorf` for dynamic errors +- Create custom error types for domain-specific errors +- Export error variables for sentinel errors +- Use `errors.Is` and `errors.As` for error checking + +### Error Propagation + +- Add context when propagating errors up the stack +- Don't log and return errors (choose one) +- Handle errors at the appropriate level +- Consider using structured errors for better debugging + +## API Design + +### HTTP Handlers + +- Use `http.HandlerFunc` for simple handlers +- Implement `http.Handler` for handlers that need state +- Use middleware for cross-cutting concerns +- Set appropriate status codes and headers +- Handle errors gracefully and return appropriate error responses +- Router usage by Go version: + - If `go >= 1.22`, prefer the enhanced `net/http` `ServeMux` with pattern-based routing and method matching + - If `go < 1.22`, use the classic `ServeMux` and handle methods/paths manually (or use a third-party router when justified) + +### JSON APIs + +- Use struct tags to control JSON marshaling +- Validate input data +- Use pointers for optional fields +- Consider using `json.RawMessage` for delayed parsing +- Handle JSON errors appropriately + +### HTTP Clients + +- Keep the client struct focused on configuration and dependencies only (e.g., base URL, `*http.Client`, auth, default headers). It must not store per-request state +- Do not store or cache `*http.Request` inside the client struct, and do not persist request-specific state across calls; instead, construct a fresh request per method invocation +- Methods should accept `context.Context` and input parameters, assemble the `*http.Request` locally (or via a short-lived builder/helper created per call), then call `c.httpClient.Do(req)` +- If request-building logic is reused, factor it into unexported helper functions or a per-call builder type; never keep `http.Request` (URL params, body, headers) as fields on the long-lived client +- Ensure the underlying `*http.Client` is configured (timeouts, transport) and is safe for concurrent use; avoid mutating `Transport` after first use +- Always set headers on the request instance you’re sending, and close response bodies (`defer resp.Body.Close()`), handling errors appropriately + +## Performance Optimization + +### Memory Management + +- Minimize allocations in hot paths +- Reuse objects when possible (consider `sync.Pool`) +- Use value receivers for small structs +- Preallocate slices when size is known +- Avoid unnecessary string conversions + +### I/O: Readers and Buffers + +- Most `io.Reader` streams are consumable once; reading advances state. Do not assume a reader can be re-read without special handling +- If you must read data multiple times, buffer it once and recreate readers on demand: + - Use `io.ReadAll` (or a limited read) to obtain `[]byte`, then create fresh readers via `bytes.NewReader(buf)` or `bytes.NewBuffer(buf)` for each reuse + - For strings, use `strings.NewReader(s)`; you can `Seek(0, io.SeekStart)` on `*bytes.Reader` to rewind +- For HTTP requests, do not reuse a consumed `req.Body`. Instead: + - Keep the original payload as `[]byte` and set `req.Body = io.NopCloser(bytes.NewReader(buf))` before each send + - Prefer configuring `req.GetBody` so the transport can recreate the body for redirects/retries: `req.GetBody = func() (io.ReadCloser, error) { return io.NopCloser(bytes.NewReader(buf)), nil }` +- To duplicate a stream while reading, use `io.TeeReader` (copy to a buffer while passing through) or write to multiple sinks with `io.MultiWriter` +- Reusing buffered readers: call `(*bufio.Reader).Reset(r)` to attach to a new underlying reader; do not expect it to “rewind” unless the source supports seeking +- For large payloads, avoid unbounded buffering; consider streaming, `io.LimitReader`, or on-disk temporary storage to control memory + +- Use `io.Pipe` to stream without buffering the whole payload: + + - Write to `*io.PipeWriter` in a separate goroutine while the reader consumes + - Always close the writer; use `CloseWithError(err)` on failures + - `io.Pipe` is for streaming, not rewinding or making readers reusable + +- **Warning:** When using `io.Pipe` (especially with multipart writers), all writes must be performed in strict, sequential order. Do not write concurrently or out of order—multipart boundaries and chunk order must be preserved. Out-of-order or parallel writes can corrupt the stream and result in errors. + +- Streaming multipart/form-data with `io.Pipe`: + - `pr, pw := io.Pipe()`; `mw := multipart.NewWriter(pw)`; use `pr` as the HTTP request body + - Set `Content-Type` to `mw.FormDataContentType()` + - In a goroutine: write all parts to `mw` in the correct order; on error `pw.CloseWithError(err)`; on success `mw.Close()` then `pw.Close()` + - Do not store request/in-flight form state on a long-lived client; build per call + - Streamed bodies are not rewindable; for retries/redirects, buffer small payloads or provide `GetBody` + +### Profiling + +- Use built-in profiling tools (`pprof`) +- Benchmark critical code paths +- Profile before optimizing +- Focus on algorithmic improvements first +- Consider using `testing.B` for benchmarks + +## Testing + +### Test Organization + +- Keep tests in the same package (white-box testing) +- Use `_test` package suffix for black-box testing +- Name test files with `_test.go` suffix +- Place test files next to the code they test + +### Writing Tests + +- Use table-driven tests for multiple test cases +- Name tests descriptively using `Test_functionName_scenario` +- Use subtests with `t.Run` for better organization +- Test both success and error cases +- Consider using `testify` or similar libraries when they add value, but don't over-complicate simple tests + +### Test Helpers + +- Mark helper functions with `t.Helper()` +- Create test fixtures for complex setup +- Use `testing.TB` interface for functions used in tests and benchmarks +- Clean up resources using `t.Cleanup()` + +## Security Best Practices + +### Input Validation + +- Validate all external input +- Use strong typing to prevent invalid states +- Sanitize data before using in SQL queries +- Be careful with file paths from user input +- Validate and escape data for different contexts (HTML, SQL, shell) + +### Cryptography + +- Use standard library crypto packages +- Don't implement your own cryptography +- Use crypto/rand for random number generation +- Store passwords using bcrypt, scrypt, or argon2 (consider golang.org/x/crypto for additional options) +- Use TLS for network communication + +## Documentation + +### Code Documentation + +- Prioritize self-documenting code through clear naming and structure +- Document all exported symbols with clear, concise explanations +- Start documentation with the symbol name +- Write documentation in English by default +- Use examples in documentation when helpful +- Keep documentation close to code +- Update documentation when code changes +- Avoid emoji in documentation and comments + +### README and Documentation Files + +- Include clear setup instructions +- Document dependencies and requirements +- Provide usage examples +- Document configuration options +- Include troubleshooting section + +## Tools and Development Workflow + +### Essential Tools + +- `go fmt`: Format code +- `go vet`: Find suspicious constructs +- `golangci-lint`: Additional linting (golint is deprecated) +- `go test`: Run tests +- `go mod`: Manage dependencies +- `go generate`: Code generation + +### Development Practices + +- Run tests before committing +- Use pre-commit hooks for formatting and linting +- Keep commits focused and atomic +- Write meaningful commit messages +- Review diffs before committing + +## Common Pitfalls to Avoid + +- Not checking errors +- Ignoring race conditions +- Creating goroutine leaks +- Not using defer for cleanup +- Modifying maps concurrently +- Not understanding nil interfaces vs nil pointers +- Forgetting to close resources (files, connections) +- Using global variables unnecessarily +- Over-using unconstrained types (e.g., `any`); prefer specific types or generic type parameters with constraints. If an unconstrained type is required, use `any` rather than `interface{}` +- Not considering the zero value of types +- **Creating duplicate `package` declarations** - this is a compile error; always check existing files before adding package declarations + +--- + + diff --git a/.github/instructions/make.instructions.md b/.github/instructions/make.instructions.md new file mode 100644 index 0000000000..9cc3cf5161 --- /dev/null +++ b/.github/instructions/make.instructions.md @@ -0,0 +1,410 @@ +--- +description: "Best practices for authoring GNU Make Makefiles" +applyTo: "**/Makefile,**/makefile,**/*.mk,**/GNUmakefile" +--- + +# Makefile Development Instructions + +Instructions for writing clean, maintainable, and portable GNU Make Makefiles. These instructions are based on the [GNU Make manual](https://www.gnu.org/software/make/manual/). + +## General Principles + +- Write clear and maintainable makefiles that follow GNU Make conventions +- Use descriptive target names that clearly indicate their purpose +- Keep the default goal (first target) as the most common build operation +- Prioritize readability over brevity when writing rules and recipes +- Add comments to explain complex rules, variables, or non-obvious behavior + +## Naming Conventions + +- Name your makefile `Makefile` (recommended for visibility) or `makefile` +- Use `GNUmakefile` only for GNU Make-specific features incompatible with other make implementations +- Use standard variable names: `objects`, `OBJECTS`, `objs`, `OBJS`, `obj`, or `OBJ` for object file lists +- Use uppercase for built-in variable names (e.g., `CC`, `CFLAGS`, `LDFLAGS`) +- Use descriptive target names that reflect their action (e.g., `clean`, `install`, `test`) + +## File Structure + +- Place the default goal (primary build target) as the first rule in the makefile +- Group related targets together logically +- Define variables at the top of the makefile before rules +- Use `.PHONY` to declare targets that don't represent files +- Structure makefiles with: variables, then rules, then phony targets + +```makefile +# Variables +CC = gcc +CFLAGS = -Wall -g +objects = main.o utils.o + +# Default goal +all: program + +# Rules +program: $(objects) + $(CC) -o program $(objects) + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +# Phony targets +.PHONY: clean all +clean: + rm -f program $(objects) +``` + +## Variables and Substitution + +- Use variables to avoid duplication and improve maintainability +- Define variables with `:=` (simple expansion) for immediate evaluation, `=` for recursive expansion +- Use `?=` to set default values that can be overridden +- Use `+=` to append to existing variables +- Reference variables with `$(VARIABLE)` not `$VARIABLE` (unless single character) +- Use automatic variables (`$@`, `$<`, `$^`, `$?`, `$*`) in recipes to make rules more generic + +```makefile +# Simple expansion (evaluates immediately) +CC := gcc + +# Recursive expansion (evaluates when used) +CFLAGS = -Wall $(EXTRA_FLAGS) + +# Conditional assignment +PREFIX ?= /usr/local + +# Append to variable +CFLAGS += -g +``` + +## Rules and Prerequisites + +- Separate targets, prerequisites, and recipes clearly +- Use implicit rules for standard compilations (e.g., `.c` to `.o`) +- List prerequisites in logical order (normal prerequisites before order-only) +- Use order-only prerequisites (after `|`) for directories and dependencies that shouldn't trigger rebuilds +- Include all actual dependencies to ensure correct rebuilds +- Avoid circular dependencies between targets +- Remember that order-only prerequisites are omitted from automatic variables like `$^`, so reference them explicitly if needed + +The example below shows a pattern rule that compiles objects into an `obj/` directory. The directory itself is listed as an order-only prerequisite so it is created before compiling but does not force recompilation when its timestamp changes. + +```makefile +# Normal prerequisites +program: main.o utils.o + $(CC) -o $@ $^ + +# Order-only prerequisites (directory creation) +obj/%.o: %.c | obj + $(CC) $(CFLAGS) -c $< -o $@ + +obj: + mkdir -p obj +``` + +## Recipes and Commands + +- Start every recipe line with a **tab character** (not spaces) unless `.RECIPEPREFIX` is changed +- Use `@` prefix to suppress command echoing when appropriate +- Use `-` prefix to ignore errors for specific commands (use sparingly) +- Combine related commands with `&&` or `;` on the same line when they must execute together +- Keep recipes readable; break long commands across multiple lines with backslash continuation +- Use shell conditionals and loops within recipes when needed + +```makefile +# Silent command +clean: + @echo "Cleaning up..." + @rm -f $(objects) + +# Ignore errors +.PHONY: clean-all +clean-all: + -rm -rf build/ + -rm -rf dist/ + +# Multi-line recipe with proper continuation +install: program + install -d $(PREFIX)/bin && \ + install -m 755 program $(PREFIX)/bin +``` + +## Phony Targets + +- Always declare phony targets with `.PHONY` to avoid conflicts with files of the same name +- Use phony targets for actions like `clean`, `install`, `test`, `all` +- Place phony target declarations near their rule definitions + +```makefile +.PHONY: all clean test install + +all: program + +clean: + rm -f program $(objects) + +test: program + ./run-tests.sh + +install: program + install -m 755 program $(PREFIX)/bin +``` + +## Pattern Rules and Implicit Rules + +- Use pattern rules (`%.o: %.c`) for generic transformations +- Leverage built-in implicit rules when appropriate (GNU Make knows how to compile `.c` to `.o`) +- Override implicit rule variables (like `CC`, `CFLAGS`) rather than rewriting the rules +- Define custom pattern rules only when built-in rules are insufficient + +```makefile +# Use built-in implicit rules by setting variables +CC = gcc +CFLAGS = -Wall -O2 + +# Custom pattern rule for special cases +%.pdf: %.md + pandoc $< -o $@ +``` + +## Splitting Long Lines + +- Use backslash-newline (`\`) to split long lines for readability +- Be aware that backslash-newline is converted to a single space in non-recipe contexts +- In recipes, backslash-newline preserves the line continuation for the shell +- Avoid trailing whitespace after backslashes + +### Splitting Without Adding Whitespace + +If you need to split a line without adding whitespace, you can use a special technique: insert `$ ` (dollar-space) followed by a backslash-newline. The `$ ` refers to a variable with a single-space name, which doesn't exist and expands to nothing, effectively joining the lines without inserting a space. + +```makefile +# Concatenate strings without adding whitespace +# The following creates the value "oneword" +var := one$ \ + word + +# This is equivalent to: +# var := oneword +``` + +```makefile +# Variable definition split across lines +sources = main.c \ + utils.c \ + parser.c \ + handler.c + +# Recipe with long command +build: $(objects) + $(CC) -o program $(objects) \ + $(LDFLAGS) \ + -lm -lpthread +``` + +## Including Other Makefiles + +- Use `include` directive to share common definitions across makefiles +- Use `-include` (or `sinclude`) to include optional makefiles without errors +- Place `include` directives after variable definitions that may affect included files +- Use `include` for shared variables, pattern rules, or common targets + +```makefile +# Include common settings +include config.mk + +# Include optional local configuration +-include local.mk +``` + +## Conditional Directives + +- Use conditional directives (`ifeq`, `ifneq`, `ifdef`, `ifndef`) for platform or configuration-specific rules +- Place conditionals at the makefile level, not within recipes (use shell conditionals in recipes) +- Keep conditionals simple and well-documented + +```makefile +# Platform-specific settings +ifeq ($(OS),Windows_NT) + EXE_EXT = .exe +else + EXE_EXT = +endif + +program: main.o + $(CC) -o program$(EXE_EXT) main.o +``` + +## Automatic Prerequisites + +- Generate header dependencies automatically rather than maintaining them manually +- Use compiler flags like `-MMD` and `-MP` to generate `.d` files with dependencies +- Include generated dependency files with `-include $(deps)` to avoid errors if they don't exist + +```makefile +objects = main.o utils.o +deps = $(objects:.o=.d) + +# Include dependency files +-include $(deps) + +# Compile with automatic dependency generation +%.o: %.c + $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ +``` + +## Error Handling and Debugging + +- Use `$(error text)` or `$(warning text)` functions for build-time diagnostics +- Test makefiles with `make -n` (dry run) to see commands without executing +- Use `make -p` to print the database of rules and variables for debugging +- Validate required variables and tools at the beginning of the makefile + +```makefile +# Check for required tools +ifeq ($(shell which gcc),) + $(error "gcc is not installed or not in PATH") +endif + +# Validate required variables +ifndef VERSION + $(error VERSION is not defined) +endif +``` + +## Clean Targets + +- Always provide a `clean` target to remove generated files +- Declare `clean` as phony to avoid conflicts with a file named "clean" +- Use `-` prefix with `rm` commands to ignore errors if files don't exist +- Consider separate `clean` (removes objects) and `distclean` (removes all generated files) targets + +```makefile +.PHONY: clean distclean + +clean: + -rm -f $(objects) + -rm -f $(deps) + +distclean: clean + -rm -f program config.mk +``` + +## Portability Considerations + +- Avoid GNU Make-specific features if portability to other make implementations is required +- Use standard shell commands (prefer POSIX shell constructs) +- Test with `make -B` to force rebuild all targets +- Document any platform-specific requirements or GNU Make extensions used + +## Performance Optimization + +- Use `:=` for variables that don't need recursive expansion (faster) +- Avoid unnecessary use of `$(shell ...)` which creates subprocesses +- Order prerequisites efficiently (most frequently changing files last) +- Use parallel builds (`make -j`) safely by ensuring targets don't conflict + +## Documentation and Comments + +- Add a header comment explaining the makefile's purpose +- Document non-obvious variable settings and their effects +- Include usage examples or targets in comments +- Add inline comments for complex rules or platform-specific workarounds + +```makefile +# Makefile for building the example application +# +# Usage: +# make - Build the program +# make clean - Remove generated files +# make install - Install to $(PREFIX) +# +# Variables: +# CC - C compiler (default: gcc) +# PREFIX - Installation prefix (default: /usr/local) + +# Compiler and flags +CC ?= gcc +CFLAGS = -Wall -Wextra -O2 + +# Installation directory +PREFIX ?= /usr/local +``` + +## Special Targets + +- Use `.PHONY` for non-file targets +- Use `.PRECIOUS` to preserve intermediate files +- Use `.INTERMEDIATE` to mark files as intermediate (automatically deleted) +- Use `.SECONDARY` to prevent deletion of intermediate files +- Use `.DELETE_ON_ERROR` to remove targets if recipe fails +- Use `.SILENT` to suppress echoing for all recipes (use sparingly) + +```makefile +# Don't delete intermediate files +.SECONDARY: + +# Delete targets if recipe fails +.DELETE_ON_ERROR: + +# Preserve specific files +.PRECIOUS: %.o +``` + +## Common Patterns + +### Standard Project Structure + +```makefile +CC = gcc +CFLAGS = -Wall -O2 +objects = main.o utils.o parser.o + +.PHONY: all clean install + +all: program + +program: $(objects) + $(CC) -o $@ $^ + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + -rm -f program $(objects) + +install: program + install -d $(PREFIX)/bin + install -m 755 program $(PREFIX)/bin +``` + +### Managing Multiple Programs + +```makefile +programs = prog1 prog2 prog3 + +.PHONY: all clean + +all: $(programs) + +prog1: prog1.o common.o + $(CC) -o $@ $^ + +prog2: prog2.o common.o + $(CC) -o $@ $^ + +prog3: prog3.o + $(CC) -o $@ $^ + +clean: + -rm -f $(programs) *.o +``` + +## Anti-Patterns to Avoid + +- Don't start recipe lines with spaces instead of tabs +- Avoid hardcoding file lists when they can be generated with wildcards or functions +- Don't use `$(shell ls ...)` to get file lists (use `$(wildcard ...)` instead) +- Avoid complex shell scripts in recipes (move to separate script files) +- Don't forget to declare phony targets as `.PHONY` +- Avoid circular dependencies between targets +- Don't use recursive make (`$(MAKE) -C subdir`) unless absolutely necessary diff --git a/.github/instructions/shell.instructions.md b/.github/instructions/shell.instructions.md new file mode 100644 index 0000000000..d03617b452 --- /dev/null +++ b/.github/instructions/shell.instructions.md @@ -0,0 +1,199 @@ +--- +applyTo: "**/*.sh" +description: Instructions for shell script implementation using Bash conventions +--- + +# Shell Scripting Instructions + +Instructions for writing clean, safe, and maintainable shell scripts for bash, sh, zsh, and other shells. + +## General Principles + +- Generate code that is clean, simple, and concise +- Ensure scripts are easily readable and understandable +- Keep comments to a minimum, only add comments when the logic may be confusing (regex, complex if statements, confusing variables, etc.) +- Generate concise and simple echo outputs to provide execution status +- Avoid unnecessary echo output and excessive logging +- Always strive to keep bash and shell code simple and well crafted +- Only add functions when needed to simplify logic +- Use shellcheck for static analysis when available +- Assume scripts are for automation and testing rather than production systems unless specified otherwise +- Use the correct and latest conventions for Bash, version 5.3 release +- Prefer safe expansions: double-quote variable references (`"$var"`), use `${var}` for clarity, and avoid `eval` +- Use modern Bash features (`[[ ]]`, `local`, arrays) when portability requirements allow; fall back to POSIX constructs only when needed +- Choose reliable parsers for structured data instead of ad-hoc text processing + +## Error Handling & Safety + +### Core Safety Principles + +- Always enable `set -euo pipefail` to fail fast on errors, catch unset variables, and surface pipeline failures +- Validate all required parameters before execution +- Provide clear error messages with context +- Use `trap` to clean up temporary resources or handle unexpected exits when the script terminates +- Declare immutable values with `readonly` (or `declare -r`) to prevent accidental reassignment +- Use `mktemp` to create temporary files or directories safely and ensure they are removed in your cleanup handler + +### Error Handling and Output Guidelines + +When it's obvious errors should be visible or users explicitly request that errors be visible: + +- NEVER redirect stderr to `/dev/null` or suppress error output +- Allow commands to fail naturally and show their native error messages +- Use `|| echo ""` pattern only when you need to capture output but allow graceful failure +- Prefer natural bash error propagation over complex error capture and re-display +- Let tools like `az login` fail naturally with their built-in error messages + +## Script Structure + +- Start with a clear shebang: `#!/bin/bash` unless specified otherwise +- Include a header comment explaining the script's purpose +- Define default values for all variables at the top +- Use functions for reusable code blocks +- Create reusable functions instead of repeating similar blocks of code +- Keep the main execution flow clean and readable + +### Script Template Example + +```bash +#!/bin/bash + +# ============================================================================ +# Script Description Here +# ============================================================================ + +set -euo pipefail + +cleanup() { + # Remove temporary resources or perform other teardown steps as needed + if [[ -n "${TEMP_DIR:-}" && -d "${TEMP_DIR}" ]]; then + rm -rf "${TEMP_DIR}" + fi +} + +trap cleanup EXIT + +# Default values +RESOURCE_GROUP="" +REQUIRED_PARAM="" +OPTIONAL_PARAM="default-value" +readonly SCRIPT_NAME="$(basename "$0")" + +TEMP_DIR="" + +# Functions +usage() { + echo "Usage: ${SCRIPT_NAME} [OPTIONS]" + echo "Options:" + echo " -g, --resource-group Resource group (required)" + echo " -h, --help Show this help" + exit 0 +} + +validate_requirements() { + if [[ -z "${RESOURCE_GROUP}" ]]; then + echo "Error: Resource group is required" + exit 1 + fi +} + +main() { + validate_requirements + + TEMP_DIR="$(mktemp -d)" + if [[ ! -d "${TEMP_DIR}" ]]; then + echo "Error: failed to create temporary directory" >&2 + exit 1 + fi + + echo "============================================================================" + echo "Script Execution Started" + echo "============================================================================" + + # Main logic here + + echo "============================================================================" + echo "Script Execution Completed" + echo "============================================================================" +} + +# Parse arguments +while [[ $# -gt 0 ]]; do + case $1 in + -g | --resource-group) + RESOURCE_GROUP="$2" + shift 2 + ;; + -h | --help) + usage + ;; + *) + echo "Unknown option: $1" + exit 1 + ;; + esac +done + +# Execute main function +main "$@" +``` + +## Working with JSON and YAML + +- Prefer dedicated parsers (`jq` for JSON, `yq` for YAML - or `jq` on JSON converted via `yq`) over ad-hoc text processing with `grep`, `awk`, or shell string splitting +- When `jq`/`yq` are unavailable or not appropriate, choose the next most reliable parser available in your environment, and be explicit about how it should be used safely +- Validate that required fields exist and handle missing/invalid data paths explicitly (e.g., by checking `jq` exit status or using `// empty`) +- Quote jq/yq filters to prevent shell expansion and prefer `--raw-output` when you need plain strings +- Treat parser errors as fatal: combine with `set -euo pipefail` or test command success before using results +- Document parser dependencies at the top of the script and fail fast with a helpful message if `jq`/`yq` (or alternative tools) are required but not installed + +## Azure CLI and JMESPath Guidelines + +When working with Azure CLI: + +- Research Azure CLI command output structure using #fetch: +- Understand JMESPath syntax thoroughly using #fetch: +- Test JMESPath queries with actual Azure CLI output structure +- Use #githubRepo:"Azure/azure-cli" to research specific Azure CLI behaviors + +## ShellCheck and Formatting Compliance + +You will always follow all shellcheck and shfmt formatting rules: + +- ALWAYS use the get_errors #problems tool to check for linting issues in shell files you are working on +- Use `shellcheck` command line tool only when get_errors #problems tool is not available +- Always follow Shell Style Guide formatting rules from #fetch: +- `shellcheck` is located at #githubRepo:"koalaman/shellcheck" search there for more information +- For all shellcheck rules #fetch: +- Always check the get_errors #problems tool for any issues with the specific shell or bash file being modified before AND after making changes + +### Formatting Rules (Shell Style Guide) + +Follow these formatting conventions along with all others outlined in #fetch:: + +- Use 4 spaces for indentation, never tabs +- Maximum line length is 80 characters +- Put `; then` and `; do` on the same line as `if`, `for`, `while` +- Use `[[ ... ]]` instead of `[ ... ]` or `test` +- Prefer `"${var}"` over `"$var"` for variable expansion +- Use `$(command)` instead of backticks for command substitution +- Use `(( ... ))` for arithmetic operations instead of `let` or `expr` +- Quote all variable expansions unless you specifically need word splitting +- Use arrays for lists of elements: `declare -a array=(item1 item2)` +- Use `local` for function-specific variables +- Function names: lowercase with underscores `my_function()` +- Constants: uppercase with underscores `readonly MY_CONSTANT="value"` + +## Research and Validation Requirements + +Before making changes to shell scripts: + +- Use #fetch to research Azure CLI documentation when working with `az` commands +- Use #githubRepo to research Azure CLI source code for complex scenarios +- Always validate your understanding of command output formats +- Test complex logic patterns and JMESPath queries before implementation +- Understand the user's specific requirements about error handling and output visibility + +--- + + diff --git a/.github/prompts/radius-code-review.prompt.md b/.github/prompts/radius-code-review.prompt.md index 58472455f8..9eb5e9c29e 100644 --- a/.github/prompts/radius-code-review.prompt.md +++ b/.github/prompts/radius-code-review.prompt.md @@ -1,6 +1,7 @@ --- mode: agent -tools: ['codebase', 'githubRepo', 'activePullRequest', "createFile", "editFiles"] +model: Claude Sonnet 4.5 (copilot) +tools: ['search/codebase', 'githubRepo', 'github.vscode-pull-request-github/activePullRequest', "edit/createFile", "edit/editFiles"] description: 'Perform a code review for a pull request (PR) in a GitHub repository.' --- diff --git a/.github/scripts/publish-recipes.sh b/.github/scripts/publish-recipes.sh index c065f911ea..4b3271c762 100755 --- a/.github/scripts/publish-recipes.sh +++ b/.github/scripts/publish-recipes.sh @@ -51,6 +51,7 @@ if [[ -z "$GITHUB_STEP_SUMMARY" ]]; then fi echo "## Recipes published to $REGISTRY_PATH" >>$GITHUB_STEP_SUMMARY + for RECIPE in $(find "$DIRECTORY" -type f -name "*.bicep"); do FILENAME=$(basename $RECIPE) PUBLISH_REF="$REGISTRY_PATH/${FILENAME%.*}:$RECIPE_VERSION" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d8160c211e..744f546d06 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,10 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Build and Test + on: # Enable manual trigger workflow_dispatch: @@ -63,7 +66,7 @@ env: IMAGE_SRC: https://github.com/radius-project/radius # bicep-types ACR url for uploading Radius Bicep types - BICEP_TYPES_REGISTRY: 'biceptypes.azurecr.io' + BICEP_TYPES_REGISTRY: biceptypes.azurecr.io jobs: build-and-push-cli: @@ -92,19 +95,28 @@ jobs: target_arch: arm64 steps: - name: Check out repo - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: submodules: recursive + - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true + + - name: Setup Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version-file: .python-version + - name: Parse release version and set environment variables run: python ./.github/scripts/get_release_version.py + - name: Make build run: make build + - name: Run make test (unit tests) if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' env: @@ -114,15 +126,17 @@ jobs: mkdir -p ./dist/unit_test go install gotest.tools/gotestsum@v${{ env.GOTESTSUMVERSION }} make test + - name: Upload coverage to Codecov if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 with: token: ${{ secrets.CODECOV_TOKEN }} codecov_yml_path: ./.codecov.yml file: ./dist/unit_test/ut_coverage.out fail_ci_if_error: false verbose: true + - name: Process Unit Test Results uses: ./.github/actions/process-test-results # Always is required here to make sure this target runs even when tests fail. @@ -131,35 +145,42 @@ jobs: test_group_name: "Unit Tests" artifact_name: "unit_test_results" result_directory: "dist/unit_test/" + - name: Copy cli binaries to release (unix-like) if: matrix.target_os != 'windows' run: | mkdir ${{ env.RELEASE_PATH }} cp ./dist/${{ matrix.target_os}}_${{ matrix.target_arch}}/release/rad ${{ env.RELEASE_PATH }}/rad_${{ matrix.target_os}}_${{ matrix.target_arch}} + - name: Copy cli binaries to release (windows) if: matrix.target_os == 'windows' run: | mkdir ${{ env.RELEASE_PATH }} cp ./dist/${{ matrix.target_os}}_${{ matrix.target_arch}}/release/rad.exe ${{ env.RELEASE_PATH }}/rad_${{ matrix.target_os}}_${{ matrix.target_arch}}.exe + - name: Upload CLI binary - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: rad_cli_${{ matrix.target_os}}_${{ matrix.target_arch}} path: ${{ env.RELEASE_PATH }} + - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: oras-project/setup-oras@main + + - uses: oras-project/setup-oras@22ce207df3b08e061f537244349aac6ae1d214f6 # v1.2.4 with: version: ${{ env.ORAS_VERSION }} + - name: Push latest rad cli binary to GHCR (unix-like) if: github.ref == 'refs/heads/main' && matrix.target_os != 'windows' run: | cp ./dist/${{ matrix.target_os}}_${{ matrix.target_arch}}/release/rad ./rad oras push ${{ env.CONTAINER_REGISTRY }}/rad/${{ matrix.target_os }}-${{ matrix.target_arch }}:latest ./rad --annotation "org.opencontainers.image.source=${{ env.IMAGE_SRC }}" + - name: Copy cli binaries to release (windows) if: github.ref == 'refs/heads/main' && matrix.target_os == 'windows' run: | @@ -172,29 +193,40 @@ jobs: if: github.repository == 'radius-project/radius' steps: - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: submodules: recursive + + - name: Setup Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version-file: .python-version + - name: Parse release version and set environment variables run: python ./.github/scripts/get_release_version.py + - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true + - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 with: platforms: linux/amd64,linux/arm64,linux/arm/v7 + - name: Push container images (latest) run: | make docker-multi-arch-push @@ -202,6 +234,7 @@ jobs: env: DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} DOCKER_TAG_VERSION: latest + - name: Build container images (PR) # Don't push on PR, agent will not have permission. run: | make docker-multi-arch-build @@ -209,6 +242,7 @@ jobs: env: DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} # includes PR number + - name: Push container images (release) run: | make docker-multi-arch-push @@ -233,16 +267,25 @@ jobs: OCI_REPOSITORY: "radius-project/helm-chart" steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Install helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: version: "v3.11.1" + + - name: Setup Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version-file: .python-version + - name: Parse release version and set environment variables run: python ./.github/scripts/get_release_version.py + - name: Run Helm linter run: | helm lint ${{ env.HELM_CHARTS_DIR }} + - name: Package Helm chart run: | mkdir -p ${{ env.ARTIFACT_DIR }}/${{ env.HELM_PACKAGE_DIR }} @@ -251,12 +294,14 @@ jobs: # Cannot use Workload Identity because azure federated identity doesn't accept wildcard tag version. - name: Setup Azure CLI run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + - name: az CLI login run: | az login --service-principal \ --username ${{ secrets.AZURE_SP_TESTS_APPID }} \ --password ${{ secrets.AZURE_SP_TESTS_PASSWORD }} \ --tenant ${{ secrets.AZURE_SP_TESTS_TENANTID }} + - name: Push helm chart to GHCR run: | echo ${{ secrets.GITHUB_TOKEN }} | helm registry login -u ${{ github.actor }} --password-stdin ${{ env.OCI_REGISTRY }} @@ -266,39 +311,51 @@ jobs: name: Publish Radius bicep types to ACR runs-on: ubuntu-latest environment: publish-bicep - steps: + steps: - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: submodules: recursive + + - name: Setup Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version-file: .python-version + - name: Parse release version and set environment variables run: python ./.github/scripts/get_release_version.py + - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true + - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: '18' + node-version-file: .node-version + - name: Generate Bicep extensibility types from OpenAPI specs run: | make generate-bicep-types VERSION=${{ env.REL_CHANNEL == 'edge' && 'latest' || env.REL_CHANNEL }} + - name: Upload Radius Bicep types artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: radius-bicep-types path: ./hack/bicep-types-radius/generated if-no-files-found: error - - name: 'Login via Azure CLI' + + - name: Login via Azure CLI if: github.repository == 'radius-project/radius' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.BICEPTYPES_CLIENT_ID }} tenant-id: ${{ secrets.BICEPTYPES_TENANT_ID }} subscription-id: ${{ secrets.BICEPTYPES_SUBSCRIPTION_ID }} + - name: Setup and verify bicep CLI if: github.repository == 'radius-project/radius' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) run: | @@ -306,7 +363,8 @@ jobs: chmod +x ./bicep sudo mv ./bicep /usr/local/bin/bicep bicep --version - - name: Publish bicep types + + - name: Publish bicep types if: github.repository == 'radius-project/radius' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) run: | bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/radius:${{ env.REL_CHANNEL == 'edge' && 'latest' || env.REL_CHANNEL }} --force @@ -320,19 +378,30 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + submodules: recursive + + - name: Setup Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version-file: .python-version + - name: Parse release version and set environment variables run: python ./.github/scripts/get_release_version.py + - name: Download release artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: pattern: rad_cli_* merge-multiple: true path: ${{ env.RELEASE_PATH }} + - name: generate checksum files run: | cd ${{ env.RELEASE_PATH }} && for i in *; do sha256sum -b $i > "$i.sha256"; done && cd - ls -l ${{ env.RELEASE_PATH }} + - name: Create GitHub RC Release (pre-release and auto-generate release notes) if: ${{ contains(env.REL_VERSION, 'rc') }} run: | @@ -342,6 +411,7 @@ jobs: --generate-notes \ --verify-tag \ --prerelease + - name: Create GitHub Official Release if: ${{ !contains(env.REL_VERSION, 'rc') }} run: | diff --git a/.github/workflows/close-stale-prs.yml b/.github/workflows/close-stale-prs.yml index 2299bf25c5..bb73b8e404 100644 --- a/.github/workflows/close-stale-prs.yml +++ b/.github/workflows/close-stale-prs.yml @@ -2,26 +2,28 @@ # # For more information, see: # https://github.com/actions/stale + +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Close stale pull requests on: schedule: - - cron: '0 18 * * *' # Run the workflow every day at 6PM UTC (10AM PST). + - cron: "0 18 * * *" # Run the workflow every day at 6PM UTC (10AM PST). jobs: stale: - runs-on: ubuntu-latest permissions: pull-requests: write steps: - - uses: actions/stale@v10 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: 'This pull request has been automatically marked as stale because it has been inactive for 90 days. Remove stale label or comment or this PR will be closed in 7 days.' - stale-pr-label: 'stale' - days-before-pr-stale: 90 # 3 months - days-before-pr-close: 7 - days-before-issue-stale: -1 - days-before-issue-close: -1 + - uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-pr-message: "This pull request has been automatically marked as stale because it has been inactive for 90 days. Remove stale label or comment or this PR will be closed in 7 days." + stale-pr-label: "stale" + days-before-pr-stale: 90 # 3 months + days-before-pr-close: 7 + days-before-issue-stale: -1 + days-before-issue-close: -1 diff --git a/.github/workflows/devcontainer-feature-release.yaml b/.github/workflows/devcontainer-feature-release.yaml index 8b28909877..511a452003 100644 --- a/.github/workflows/devcontainer-feature-release.yaml +++ b/.github/workflows/devcontainer-feature-release.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: "Release dev container feature" on: @@ -7,9 +9,8 @@ jobs: call-workflow-test: uses: ./.github/workflows/devcontainer-feature-test.yaml - deploy: - needs: + needs: - call-workflow-test if: ${{ github.ref == 'refs/heads/main' && github.repository == 'radius-project/radius' }} runs-on: ubuntu-latest @@ -18,10 +19,10 @@ jobs: pull-requests: write packages: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - name: "Publish Features" - uses: devcontainers/action@v1 + uses: devcontainers/action@1082abd5d2bf3a11abccba70eef98df068277772 # v1.4.3 with: publish-features: "true" base-path-to-features: "./deploy/devcontainer-feature/src" @@ -33,6 +34,6 @@ jobs: # We don't want to include the repo name, being consistent without # examples at https://containers.dev/collections features-namespace: "radius-project/devcontainer-features" - + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/devcontainer-feature-test.yaml b/.github/workflows/devcontainer-feature-test.yaml index 3d214e6f4b..ab49e45449 100644 --- a/.github/workflows/devcontainer-feature-test.yaml +++ b/.github/workflows/devcontainer-feature-test.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: "Test dev container feature" on: workflow_dispatch: @@ -22,7 +24,7 @@ jobs: - mcr.microsoft.com/devcontainers/base:ubuntu - mcr.microsoft.com/devcontainers/base:debian steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - name: "Install latest devcontainer CLI" run: npm install -g @devcontainers/cli @@ -34,7 +36,7 @@ jobs: test-scenarios: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - name: "Install latest devcontainer CLI" run: npm install -g @devcontainers/cli diff --git a/.github/workflows/devops-boards.yaml b/.github/workflows/devops-boards.yaml index 62751839b7..373ef0186e 100644 --- a/.github/workflows/devops-boards.yaml +++ b/.github/workflows/devops-boards.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Sync issue to Azure DevOps work item on: @@ -23,27 +25,31 @@ jobs: # Auth using Azure Service Principals was added as a part of v2.3 # reference: https://github.com/danhellem/github-actions-issue-to-work-item/pull/143 - name: Login to Azure - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ vars.AZURE_SP_DEVOPS_SYNC_CLIENT_ID }} tenant-id: ${{ vars.AZURE_SP_DEVOPS_SYNC_TENANT_ID }} allow-no-subscriptions: true + - name: Get Azure DevOps token id: get_ado_token run: # The resource ID for Azure DevOps is always 499b84ac-1321-427f-aa17-267ca6975798 # https://learn.microsoft.com/azure/devops/integrate/get-started/authentication/service-principal-managed-identity - echo "ADO_TOKEN=$(az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv)" >> $GITHUB_ENV + ADO_TOKEN=$(az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv) + echo "::add-mask::$ADO_TOKEN" + echo "ADO_TOKEN=$ADO_TOKEN" >> $GITHUB_ENV + - name: Sync issue to Azure DevOps - uses: danhellem/github-actions-issue-to-work-item@v2.5 + uses: danhellem/github-actions-issue-to-work-item@8d0ead9b49a65aa66dac6949b1ff149d7ef8b4de # v2.5 env: ado_token: ${{ env.ADO_TOKEN }} - github_token: '${{ secrets.GH_RAD_CI_BOT_PAT }}' - ado_organization: 'azure-octo' - ado_project: 'Incubations' + github_token: ${{ secrets.GH_RAD_CI_BOT_PAT }} + ado_organization: azure-octo + ado_project: Incubations ado_area_path: "Incubations\\Radius" ado_iteration_path: "Incubations\\Radius" - ado_new_state: 'New' - ado_active_state: 'Active' - ado_close_state: 'Closed' - ado_wit: 'GitHub Issue' + ado_new_state: New + ado_active_state: Active + ado_close_state: Closed + ado_wit: GitHub Issue diff --git a/.github/workflows/functional-test-cloud.yaml b/.github/workflows/functional-test-cloud.yaml index 2dac442ce3..68e8183ebb 100644 --- a/.github/workflows/functional-test-cloud.yaml +++ b/.github/workflows/functional-test-cloud.yaml @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Functional Tests (with Cloud Resources) permissions: @@ -31,10 +33,8 @@ on: required: true default: "main" schedule: - # Run every 4 hours on weekdays. - - cron: "30 0,4,8,12,16,20 * * 1-5" - # Run every 12 hours on weekends. - - cron: "30 0,12 * * 0,6" + # Run three times a day at 6 AM PDT (1 PM UTC), 12 PM PDT (7 PM UTC), and 6 PM PDT (1 AM UTC next day) + - cron: "0 1,13,19 * * *" # Dispatch on external events repository_dispatch: types: [de-functional-test] @@ -135,7 +135,7 @@ jobs: echo "Updated At: ${{ github.event.workflow_run.updated_at }}" fi - name: Get GitHub app token - uses: tibdex/github-app-token@v2 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 id: get_installation_token with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} @@ -167,7 +167,7 @@ jobs: echo "CHECKOUT_REF=refs/heads/${{ github.event.inputs.branch }}" >> $GITHUB_ENV - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: submodules: recursive @@ -178,7 +178,7 @@ jobs: - name: "Set PR context (workflow_run)" if: github.event_name == 'workflow_run' - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -192,7 +192,7 @@ jobs: - name: Set DE image and tag (repository_dispatch from de-functional-test) if: github.event_name == 'repository_dispatch' - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | @@ -209,12 +209,12 @@ jobs: } - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} submodules: recursive - + - name: Copy Deployment Engine image to GHCR if: github.event_name == 'repository_dispatch' uses: ./.github/actions/copy-deployment-engine-image @@ -225,16 +225,16 @@ jobs: DE_CONTAINER_AZURE_SUBSCRIPTION_ID: ${{ secrets.DE_CONTAINER_AZURE_SUBSCRIPTION_ID }} with: tag: ${{ env.DE_TAG }} - + - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} submodules: recursive - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum @@ -262,7 +262,7 @@ jobs: echo "DE_IMAGE=${{ env.DE_IMAGE }}" >> $GITHUB_OUTPUT echo "DE_TAG=${{ env.DE_TAG }}" >> $GITHUB_OUTPUT - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: env.PR_NUMBER != '' continue-on-error: true with: @@ -303,13 +303,13 @@ jobs: ## Test Status - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: env.PR_NUMBER != '' continue-on-error: true with: @@ -328,13 +328,13 @@ jobs: DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} - name: Upload CLI binary - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ steps.gen-id.outputs.RAD_CLI_ARTIFACT_NAME }} path: | ./dist/linux_amd64/release/rad - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: success() && env.PR_NUMBER != '' continue-on-error: true with: @@ -345,7 +345,7 @@ jobs: message: | :white_check_mark: Container images build succeeded - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: failure() && env.PR_NUMBER != '' continue-on-error: true with: @@ -356,7 +356,7 @@ jobs: message: | :x: Container images build failed - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: env.PR_NUMBER != '' continue-on-error: true with: @@ -368,23 +368,23 @@ jobs: :hourglass: Publishing Bicep Recipes for functional tests... - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "18" + node-version-file: .node-version - name: Generate Bicep extensibility types from OpenAPI specs run: | make generate-bicep-types VERSION=${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} - name: Upload Radius Bicep types artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: radius_bicep_types_cloud path: ./hack/bicep-types-radius/generated if-no-files-found: error - name: "Login via Azure CLI" - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.BICEPTYPES_CLIENT_ID }} tenant-id: ${{ secrets.BICEPTYPES_TENANT_ID }} @@ -434,7 +434,7 @@ jobs: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.REL_VERSION }} - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: success() && env.PR_NUMBER != '' continue-on-error: true with: @@ -445,7 +445,7 @@ jobs: message: | :white_check_mark: Recipe publishing succeeded - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: failure() && env.PR_NUMBER != '' continue-on-error: true with: @@ -482,13 +482,13 @@ jobs: DE_TAG: ${{ needs.build.outputs.DE_TAG }} steps: - name: Get GitHub app token - uses: tibdex/github-app-token@v2 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 id: get_installation_token with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - - uses: LouisBrunner/checks-action@v2.0.0 + - uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2.0.0 if: always() with: token: ${{ steps.get_installation_token.outputs.token }} @@ -499,14 +499,14 @@ jobs: details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - name: Checkout Radius repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} submodules: recursive - name: Checkout Samples repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 if: matrix.name == 'samples' with: repository: radius-project/samples @@ -514,26 +514,26 @@ jobs: path: samples - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true - name: Download rad CLI - uses: actions/download-artifact@v5 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ env.RAD_CLI_ARTIFACT_NAME }} path: bin - name: Login to Azure - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.AZURE_SP_TESTS_APPID }} tenant-id: ${{ secrets.AZURE_SP_TESTS_TENANTID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID_TESTS }} - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 continue-on-error: true with: GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} @@ -555,14 +555,14 @@ jobs: env: RESOURCE_GROUP: ${{ env.AZURE_TEST_RESOURCE_GROUP }} - - uses: azure/setup-helm@v4 + - uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: version: ${{ env.HELM_VER }} # The role-to-assume is the role that the github action will assume to execute aws commands and # construct cloud control client in test code. - name: configure aws credentials using assumed role - uses: aws-actions/configure-aws-credentials@v5.1.0 + uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: role-to-assume: ${{ secrets.AWS_GH_ACTIONS_ROLE }} role-session-name: GitHub_to_AWS_via_FederatedOIDC @@ -622,7 +622,7 @@ jobs: helm install workload-identity-webhook azure-workload-identity/workload-identity-webhook --namespace radius-default --create-namespace --version ${{ env.AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER }} --set azureTenantID=${{ secrets.AZURE_SP_TESTS_TENANTID }} - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -640,7 +640,7 @@ jobs: run: | go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VER }} - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: failure() && env.PR_NUMBER != '' continue-on-error: true with: @@ -665,7 +665,7 @@ jobs: --set de.image=${{ env.DE_IMAGE }},de.tag=${{ env.DE_TAG }} \ --set bicep.image=${{ env.CONTAINER_REGISTRY }}/bicep,bicep.tag=${{ env.REL_VERSION }} \ --set global.azureWorkloadIdentity.enabled=true \ - --set global.aws.irsa.enabled=true + --set global.aws.irsa.enabled=true echo "*** Verify manifests are registered ***" rm -f registermanifest_logs.txt @@ -733,7 +733,7 @@ jobs: rad credential register aws irsa \ --iam-role ${{ secrets.FUNC_TEST_RAD_IRSA_ROLE }} - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: failure() && env.PR_NUMBER != '' continue-on-error: true with: @@ -773,14 +773,14 @@ jobs: run: | # Restore Radius Bicep types bicep restore ./test/functional-portable/corerp/cloud/resources/testdata/corerp-azure-connection-database-service.bicep --force - # Restore AWS Bicep types + # Restore AWS Bicep types bicep restore ./test/functional-portable/corerp/cloud/resources/testdata/aws-logs-loggroup.bicep --force - name: Run functional tests run: | # Ensure rad cli is in path before running tests. export PATH=$GITHUB_WORKSPACE/bin:$PATH # Make directory to capture functional test results - mkdir -p ./dist/functional_test + mkdir -p ./dist/functional_test cd $GITHUB_WORKSPACE which rad || { echo "cannot find rad"; exit 1; } @@ -830,7 +830,7 @@ jobs: - name: Upload container logs if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.name }}_container_logs path: ./${{ env.RADIUS_CONTAINER_LOG_BASE }} @@ -852,14 +852,14 @@ jobs: kubectl get events -n $namespace > recipes/pod-logs/events.txt - name: Upload Terraform recipe publishing logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: always() with: name: ${{ matrix.name }}_recipes-pod-logs path: recipes/pod-logs if-no-files-found: error - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: success() && env.PR_NUMBER != '' continue-on-error: true with: @@ -870,7 +870,7 @@ jobs: message: | :white_check_mark: ${{ matrix.name }} functional tests succeeded - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: failure() && env.PR_NUMBER != '' continue-on-error: true with: @@ -881,7 +881,7 @@ jobs: message: | :x: ${{ matrix.name }} functional test failed. Please check [the logs](${{ env.ACTION_LINK }}) for more details - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 if: cancelled() && env.PR_NUMBER != '' continue-on-error: true with: @@ -910,7 +910,7 @@ jobs: CHECKOUT_REF: ${{ needs.build.outputs.CHECKOUT_REF }} steps: - name: Get GitHub app token - uses: tibdex/github-app-token@v2 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 id: get_installation_token with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} @@ -937,7 +937,7 @@ jobs: echo "Test Status: $TEST_STATUS" echo "test_status=$TEST_STATUS" >> $GITHUB_OUTPUT - - uses: LouisBrunner/checks-action@v2.0.0 + - uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2.0.0 if: always() with: token: ${{ steps.get_installation_token.outputs.token }} @@ -957,7 +957,7 @@ jobs: if: failure() && github.event_name == 'schedule' && github.repository == 'radius-project/radius' steps: - name: Create failure issue for failing scheduled run - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | diff --git a/.github/workflows/functional-test-noncloud.yaml b/.github/workflows/functional-test-noncloud.yaml index 671af61f2b..3279b4729b 100644 --- a/.github/workflows/functional-test-noncloud.yaml +++ b/.github/workflows/functional-test-noncloud.yaml @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Functional Tests (with Non-Cloud Resources) permissions: @@ -31,10 +33,8 @@ on: required: true default: "main" schedule: - # Run every 4 hours on weekdays. - - cron: "30 0,4,8,12,16,20 * * 1-5" - # Run every 12 hours on weekends. - - cron: "30 0,12 * * 0,6" + # Run three times a day at 6 AM PDT (1 PM UTC), 12 PM PDT (7 PM UTC), and 6 PM PDT (1 AM UTC next day) + - cron: "0 1,13,19 * * *" # Dispatch on external events repository_dispatch: types: [de-functional-test] @@ -76,15 +76,15 @@ env: # Local Docker registry port LOCAL_REGISTRY_PORT: "5000" # bicep-types ACR url for uploading Radius Bicep types - BICEP_TYPES_REGISTRY: 'biceptypes.azurecr.io' - # Gitea server URL - GITEA_SERVER_URL: "http://localhost:30080" - # Gitea username - GITEA_USERNAME: "testuser" - # Gitea email - GITEA_EMAIL: "testuser@radapp.io" - # Gitea access token name - GITEA_ACCESS_TOKEN_NAME: "radius-functional-test" + BICEP_TYPES_REGISTRY: biceptypes.azurecr.io + # Git HTTP server URL + GIT_HTTP_SERVER_URL: "http://localhost:30080" + # Git username used for pushing commits during tests + GIT_HTTP_USERNAME: "testuser" + # Git email used for commit authorship during tests + GIT_HTTP_EMAIL: "testuser@radapp.io" + # Git password used for pushing commits during tests + GIT_HTTP_PASSWORD: "not-a-secret-password" # Kubernetes client QPS and Burst settings for high-concurrency CI environments RADIUS_QPS_AND_BURST: "800" @@ -102,7 +102,7 @@ jobs: steps: - name: Set DE image and tag (repository_dispatch from de-functional-test) if: github.event_name == 'repository_dispatch' - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | @@ -119,7 +119,7 @@ jobs: } - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} @@ -134,7 +134,7 @@ jobs: DE_CONTAINER_AZURE_SUBSCRIPTION_ID: ${{ secrets.DE_CONTAINER_AZURE_SUBSCRIPTION_ID }} with: tag: ${{ env.DE_TAG }} - + - name: Generate ID for release id: gen-id run: | @@ -149,7 +149,8 @@ jobs: # Set output variables to be used in the other jobs echo "REL_VERSION=pr-${UNIQUE_ID}" >> $GITHUB_OUTPUT echo "DE_IMAGE=${{ env.DE_IMAGE }}" >> $GITHUB_OUTPUT - echo "DE_TAG=${{ env.DE_TAG }}" >> $GITHUB_OUTPUT + echo "DE_TAG=${{ env.DE_TAG }}" >> $GITHUB_OUTPUT + tests: name: Run ${{ matrix.name }} functional tests needs: build @@ -197,12 +198,12 @@ jobs: echo "CHECKOUT_REF=refs/heads/${{ github.event.inputs.branch }}" >> $GITHUB_ENV - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: submodules: recursive - name: Checkout samples repo - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 if: matrix.name == 'samples-noncloud' with: repository: radius-project/samples @@ -210,27 +211,27 @@ jobs: path: samples - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: '18' + node-version-file: .node-version - name: Generate Bicep extensibility types from OpenAPI specs run: | make generate-bicep-types VERSION=${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} - name: Upload Radius Bicep types artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.name }}_radius_bicep_types path: ./hack/bicep-types-radius/generated - if-no-files-found: error + if-no-files-found: error - name: Create a secure local registry id: create-local-registry @@ -241,9 +242,9 @@ jobs: registry-server: ${{ env.LOCAL_REGISTRY_SERVER }} registry-port: ${{ env.LOCAL_REGISTRY_PORT }} - - name: Publish bicep types - run: | - bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force + - name: Publish bicep types + run: | + bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force - name: Generate test bicepconfig.json run: | @@ -281,7 +282,7 @@ jobs: rad bicep download rad version - - uses: azure/setup-helm@v4 + - uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: version: ${{ env.HELM_VER }} @@ -352,7 +353,7 @@ jobs: # Poll logs for up to iterations, 30 seconds each (upto 3 minutes total) for i in {1..6}; do kubectl logs "$POD_NAME" -n radius-system | tee registermanifest_logs.txt > /dev/null - + # Exit on error if grep -qi "Service initializer terminated with error" registermanifest_logs.txt; then echo "Error found in ucp logs." @@ -388,37 +389,31 @@ jobs: env: USE_CERT_FILE: "true" TEMP_CERT_DIR: ${{ steps.create-local-registry.outputs.temp-cert-dir }} - + - name: Install Flux CLI and Source Controller if: matrix.name == 'kubernetes-noncloud' uses: ./.github/actions/install-flux - # https://github.com/radius-project/radius/issues/10441 - # - name: Install Gitea - # if: matrix.name == 'kubernetes-noncloud' - # id: install-gitea - # uses: ./.github/actions/install-gitea - # env: - # GITEA_PASSWORD: ${{ secrets.GITEA_PASSWORD }} - # with: - # gitea-username: ${{ env.GITEA_USERNAME }} - # gitea-email: ${{ env.GITEA_EMAIL }} - # gitea-access-token-name: ${{ env.GITEA_ACCESS_TOKEN_NAME }} - - # https://github.com/radius-project/radius/issues/10441 - # - name: Port-forward to Gitea - # if: matrix.name == 'kubernetes-noncloud' - # run: | - # # Start port forwarding in the background - # kubectl port-forward -n gitea svc/gitea-http 30080:3000 & - - # # Wait for port forwarding to be established - # sleep 5 - - # # Test the connection to ensure port forwarding is working - # curl -s http://localhost:30080 > /dev/null || (echo "Port forwarding failed" && exit 1) - - # echo "Port forwarding established successfully" + - name: Install Git HTTP backend + if: matrix.name == 'kubernetes-noncloud' + uses: ./.github/actions/install-git-http-backend + with: + git-username: ${{ env.GIT_HTTP_USERNAME }} + git-password: ${{ env.GIT_HTTP_PASSWORD }} + + - name: Port-forward to Git server + if: matrix.name == 'kubernetes-noncloud' + run: | + # Start port forwarding in the background + kubectl port-forward -n git-http-backend svc/git-http 30080:3000 & + + # Wait for port forwarding to be established + sleep 5 + + # Test the connection to ensure port forwarding is working + curl -s http://localhost:30080 > /dev/null || (echo "Port forwarding failed" && exit 1) + + echo "Port forwarding established successfully" - name: Install Dapr CLI and control plane if: matrix.name == 'daprrp-noncloud' @@ -437,11 +432,11 @@ jobs: sudo mv ./bicep /usr/local/bin/bicep bicep --version - - name: Publish bicep types - run: | - bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force + - name: Publish bicep types + run: | + bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force - - name: Publish UDT types + - name: Publish UDT types run: | export PATH=$GITHUB_WORKSPACE/bin:$PATH which rad || { echo "cannot find rad"; exit 1; } @@ -486,7 +481,7 @@ jobs: # Ensure rad cli is in path before running tests. export PATH=$GITHUB_WORKSPACE/bin:$PATH # Make directory to capture functional test results - mkdir -p ./dist/functional_test + mkdir -p ./dist/functional_test cd $GITHUB_WORKSPACE which rad || { echo "cannot find rad"; exit 1; } @@ -501,8 +496,8 @@ jobs: BICEP_RECIPE_TAG_VERSION: ${{ env.BICEP_RECIPE_TAG_VERSION }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOTESTSUM_OPTS: "--junitfile ./dist/functional_test/results.xml" - # GITEA_ACCESS_TOKEN: ${{ steps.install-gitea.outputs.gitea-access-token }} RADIUS_TEST_FAST_CLEANUP: true + GIT_HTTP_PASSWORD: ${{ env.GIT_HTTP_PASSWORD }} - name: Process Functional Test Results uses: ./.github/actions/process-test-results @@ -531,7 +526,7 @@ jobs: kubectl get events -n $namespace > func-nc/radius-logs-events/${{ matrix.name }}/events.txt - name: Upload Pod logs for failed tests - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: always() && steps.radius-logs-events.outcome == 'success' with: name: ${{ matrix.name }}-radius-pod-logs @@ -548,10 +543,10 @@ jobs: kubectl get pods -A >> $POD_STATE_LOG_FILENAME echo "kubectl describe pods -A" >> $POD_STATE_LOG_FILENAME kubectl describe pods -A >> $POD_STATE_LOG_FILENAME - + - name: Upload container logs if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.name }}_container_logs path: ./${{ env.RADIUS_CONTAINER_LOG_BASE }} @@ -573,7 +568,7 @@ jobs: kubectl get events -n $namespace > recipes/pod-logs/events.txt - name: Upload Terraform recipe publishing logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: always() with: name: ${{ matrix.name }}_recipes-pod-logs @@ -587,7 +582,7 @@ jobs: if: failure() && github.event_name == 'schedule' && github.repository == 'radius-project/radius' steps: - name: Create failure issue for failing scheduled run - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | diff --git a/.github/workflows/functional-tests-approval.yaml b/.github/workflows/functional-tests-approval.yaml index 6534a65a2d..dd857886ba 100644 --- a/.github/workflows/functional-tests-approval.yaml +++ b/.github/workflows/functional-tests-approval.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: "Approve Functional Tests" on: pull_request: @@ -5,6 +7,7 @@ on: - main - features/* - release/* + jobs: approve-functional-tests-run: name: "Approve Functional Tests" @@ -12,7 +15,7 @@ jobs: environment: functional-tests steps: - name: Checkout Radius repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - name: Save PR number uses: ./.github/actions/save-pr-as-artifact diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3df3027a4b..ef391d55e4 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Check code is up-to-date on: @@ -38,83 +40,102 @@ jobs: HELM_CHARTS_DIR: deploy/Chart steps: - name: Check out repo - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: submodules: recursive + - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true + - name: Setup NodeJS - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version-file: .node-version + - name: Install TypeSpec compiler run: | pushd typespec npm ci popd + - name: Install autorest - run: npm install -g autorest@3.7.1 + run: npm install -g autorest@3.7.2 + - name: Install oav - run: npm install -g oav@3.3.5 + run: npm install -g oav@4.0.2 + - name: Install mockgen run: go install go.uber.org/mock/mockgen@v0.4.0 + - name: Install controller-gen run: go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.0 + - name: Install helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: version: "v3.11.1" + - name: Run Helm linter run: | helm lint ${{ env.HELM_CHARTS_DIR }} + - name: Run Helm unit tests run: | helm plugin install https://github.com/helm-unittest/helm-unittest.git || true cd ${{ env.HELM_CHARTS_DIR }} && helm unittest . + - name: Run TypeSpec format check run: | pushd typespec npx tsp format --check "**/*.tsp" popd + - name: Run linter - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # v9.0.0 with: version: "v2.5.0" args: --timeout=10m skip-cache: true install-mode: "binary" + - name: Run make generate run: make generate + - name: Check if generated code is up to date continue-on-error: true id: gitdiff run: | git diff --exit-code + - name: Check failures if: steps.gitdiff.outcome != 'success' run: | echo "Generated code is not up to date, run 'make generate' to update generated code." exit 1 + format-check: name: Format check with Prettier runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Check out repo - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Setup NodeJS - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version-file: .node-version + - name: Run `make format-check` id: format-check continue-on-error: true run: | make format-check + - name: Check for formatting failures if: steps.format-check.outcome == 'failure' run: | diff --git a/.github/workflows/long-running-azure.yaml b/.github/workflows/long-running-azure.yaml index 8d8bdcd51e..45dc6d6b84 100644 --- a/.github/workflows/long-running-azure.yaml +++ b/.github/workflows/long-running-azure.yaml @@ -36,6 +36,8 @@ # # Grafana dashboard URL: https://radlrtest00-dashboard-e4ffc0cwggchdhba.wus3.grafana.azure.com +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Long-running test on Azure permissions: @@ -48,19 +50,18 @@ on: workflow_dispatch: inputs: skip-build: - description: 'Skip build (true/false). Setting to false will cause the tests to run with the latest changes from the main branch.' + description: "Skip build (true/false). Setting to false will cause the tests to run with the latest changes from the main branch." required: false - default: 'true' + default: "true" type: choice options: - - 'true' - - 'false' + - "true" + - "false" schedule: - # Run every 4 hours - - cron: "0 */4 * * *" + # Run once per day at 3:00 AM PDT (10:00 AM UTC) + - cron: "0 10 * * *" env: - GOPROXY: https://proxy.golang.org # gotestsum version - see: https://github.com/gotestyourself/gotestsum @@ -71,7 +72,7 @@ env: # Container registry for storing Bicep recipe artifacts BICEP_RECIPE_REGISTRY: ghcr.io/radius-project/dev # ACR url for uploading test UDT Bicep types - TEST_BICEP_TYPES_REGISTRY: 'testuserdefinedbiceptypes.azurecr.io' + TEST_BICEP_TYPES_REGISTRY: "testuserdefinedbiceptypes.azurecr.io" # The radius functional test timeout FUNCTIONALTEST_TIMEOUT: 60m # The Azure Location to store test resources @@ -105,14 +106,14 @@ env: # The current GitHub action link ACTION_LINK: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - # Gitea server URL - GITEA_SERVER_URL: "http://localhost:30080" - # Gitea username - GITEA_USERNAME: "testuser" - # Gitea email - GITEA_EMAIL: "testuser@radapp.io" - # Gitea access token name - GITEA_ACCESS_TOKEN_NAME: "radius-functional-test" + # Git HTTP server URL + GIT_HTTP_SERVER_URL: "http://localhost:30080" + # Git username used for pushing commits during tests + GIT_HTTP_USERNAME: "testuser" + # Git email used for commit authorship during tests + GIT_HTTP_EMAIL: "testuser@radapp.io" + # Git password used for pushing commits during tests + GIT_HTTP_PASSWORD: "not-a-secret-password" jobs: build: @@ -129,10 +130,11 @@ jobs: RAD_CLI_ARTIFACT_NAME: ${{ steps.gen-id.outputs.RAD_CLI_ARTIFACT_NAME }} steps: - name: Restore the latest cached binaries - uses: actions/cache/restore@v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ./dist/cache key: radius-test-latest- + - name: Skip build if build is still valid if: github.event_name != 'pull_request' id: skip-build @@ -143,11 +145,11 @@ jobs: lastbuild=$(cat ./dist/cache/.lastbuildtime) current_time=$(date +%s) if [ $((current_time-lastbuild)) -lt ${{ env.VALID_RADIUS_BUILD_WINDOW }} ]; then - echo "Last build is still within valid window" + echo "Last build is still within valid window" SKIP_BUILD="true" fi fi - + # Check override in workflow_dispatch mode if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ github.event.inputs.skip-build }}" = "false" ]; then echo "Manual run with skip-build=false, forcing build" @@ -160,12 +162,14 @@ jobs: run: | echo "CHECKOUT_REPO=${{ github.repository }}" >> $GITHUB_ENV echo "CHECKOUT_REF=refs/heads/main" >> $GITHUB_ENV + - name: Set up checkout target (pull_request) if: steps.skip-build.outputs.SKIP_BUILD != 'true' && github.event_name == 'pull_request' run: | echo "CHECKOUT_REPO=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV echo "CHECKOUT_REF=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV + - name: Generate ID for release id: gen-id run: | @@ -180,7 +184,7 @@ jobs: fi UNIQUE_ID=longr$(echo $BASE_STR | sha1sum | head -c 10) echo "REL_VERSION=pr-${UNIQUE_ID}" >> $GITHUB_ENV - + # Set output variables to be used in the other jobs echo "REL_VERSION=pr-${UNIQUE_ID}" >> $GITHUB_OUTPUT echo "UNIQUE_ID=${UNIQUE_ID}" >> $GITHUB_OUTPUT @@ -197,20 +201,23 @@ jobs: cat ./dist/cache/.buildenv >> $GITHUB_STEP_SUMMARY echo "\`\`\`" >> $GITHUB_STEP_SUMMARY fi + - name: Check out code if: steps.skip-build.outputs.SKIP_BUILD != 'true' - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} submodules: recursive + - name: Set up Go if: steps.skip-build.outputs.SKIP_BUILD != 'true' - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true + - name: Log the summary of build info for new version. if: steps.skip-build.outputs.SKIP_BUILD != 'true' continue-on-error: true @@ -244,19 +251,22 @@ jobs: - name: Setup Azure CLI if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + - name: Login to Azure if: steps.skip-build.outputs.SKIP_BUILD != 'true' - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.AZURE_SP_TESTS_APPID }} tenant-id: ${{ secrets.AZURE_SP_TESTS_TENANTID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID_TESTS }} + - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and Push container images if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | @@ -264,28 +274,33 @@ jobs: env: DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} + - name: Upload CLI binary if: steps.skip-build.outputs.SKIP_BUILD != 'true' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ steps.gen-id.outputs.RAD_CLI_ARTIFACT_NAME }} path: | ./dist/linux_amd64/release/rad + - name: Log the build result (success) if: steps.skip-build.outputs.SKIP_BUILD != 'true' && success() continue-on-error: true run: | echo ":white_check_mark: Container images build succeeded" >> $GITHUB_STEP_SUMMARY + - name: Log the build result (failure) if: steps.skip-build.outputs.SKIP_BUILD != 'true' && failure() continue-on-error: true run: | echo ":x: Container images build failed" >> $GITHUB_STEP_SUMMARY + - name: Log test Bicep recipe publish status if: steps.skip-build.outputs.SKIP_BUILD != 'true' continue-on-error: true run: | echo ":hourglass: Publishing Bicep Recipes for functional tests..." >> $GITHUB_STEP_SUMMARY + - name: Move the latest binaries to cache if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | @@ -298,12 +313,14 @@ jobs: echo "CHECKOUT_REF=$(git rev-parse HEAD)" >> ./dist/cache/.buildenv echo "PR_NUMBER=${{ steps.gen-id.outputs.PR_NUMBER }}" >> ./dist/cache/.buildenv echo "BICEP_RECIPE_TAG_VERSION=${{ steps.gen-id.outputs.REL_VERSION }}" >> ./dist/cache/.buildenv + - name: Store the latest binaries into cache - uses: actions/cache/save@v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 if: steps.skip-build.outputs.SKIP_BUILD != 'true' && success() with: path: ./dist/cache key: radius-test-latest-${{ github.sha }}-${{ github.run_number }} + - name: Publish UDT types if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | @@ -315,6 +332,7 @@ jobs: rad bicep download rad version rad bicep publish-extension -f ./test/functional-portable/dynamicrp/noncloud/resources/testdata/testresourcetypes.yaml --target br:${{ env.TEST_BICEP_TYPES_REGISTRY}}/testresources:latest --force + - name: Publish Bicep Test Recipes if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | @@ -324,10 +342,12 @@ jobs: env: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.REL_VERSION }} + - name: Log Bicep recipe publish status (success) if: steps.skip-build.outputs.SKIP_BUILD != 'true' && success() run: | echo ":white_check_mark: Recipe publishing succeeded" >> $GITHUB_STEP_SUMMARY + - name: Log recipe publish status (failure) if: steps.skip-build.outputs.SKIP_BUILD != 'true' && failure() run: | @@ -349,7 +369,7 @@ jobs: BICEP_RECIPE_TAG_VERSION: ${{ needs.build.outputs.REL_VERSION }} steps: - name: Get GitHub app token - uses: tibdex/github-app-token@v2 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 id: get_installation_token with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} @@ -361,54 +381,62 @@ jobs: # already-expired tokens in workflows that exceed the 1-hour token lifetime. revoke: false - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} submodules: recursive + - name: Checkout samples repo - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/samples ref: refs/heads/edge token: ${{ secrets.GH_RAD_CI_BOT_PAT }} path: samples + - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: go.mod cache-dependency-path: go.sum cache: true + - name: Download rad CLI if: env.SKIP_BUILD != 'true' - uses: actions/download-artifact@v5 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ env.RAD_CLI_ARTIFACT_NAME }} path: bin + - name: Restore the latest cached binaries if: env.SKIP_BUILD == 'true' - uses: actions/cache/restore@v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ./dist/cache key: radius-test-latest- + - name: Install rad CLI in bin if: env.SKIP_BUILD == 'true' run: | mkdir -p ./bin mv ./dist/cache/rad ./bin/ chmod +x ./bin/rad + - name: Login to Azure - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.AZURE_SP_TESTS_APPID }} tenant-id: ${{ secrets.AZURE_SP_TESTS_TENANTID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID_TESTS }} + - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Create azure resource group - ${{ env.AZURE_TEST_RESOURCE_GROUP }} run: | current_time=$(date +%s) @@ -420,6 +448,7 @@ jobs: while [ $(az group exists --name $RESOURCE_GROUP) = false ]; do sleep 2; done env: RESOURCE_GROUP: ${{ env.AZURE_TEST_RESOURCE_GROUP }} + - name: Get kubeconf credential for AKS cluster run: | az aks get-credentials \ @@ -428,23 +457,27 @@ jobs: --name ${{ env.AKS_CLUSTER_NAME }} --admin env: RESOURCE_GROUP: ${{ env.AZURE_TEST_RESOURCE_GROUP }} + - name: Restore skip-delete-resources-list if: always() - uses: actions/cache/restore@v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: skip-delete-resources-list.txt - key: skip-delete-resources-list-file + key: skip-delete-resources-list-file + - name: Clean up cluster if: always() timeout-minutes: 60 run: | - if [ "${{ env.SKIP_BUILD }}" != "true" ] ; then - echo "Running cleanup without skip delete resource list. This will delete all resources." - ./.github/scripts/cleanup-long-running-cluster.sh - else - echo "Running cleanup with skip-delete-resources-list.txt. Built-In resources will not be deleted." + # Always use skip list if it exists, regardless of SKIP_BUILD + if [ -f skip-delete-resources-list.txt ] && [ -s skip-delete-resources-list.txt ]; then + echo "Running cleanup with skip-delete-resources-list.txt. Built-in resources will not be deleted." ./.github/scripts/cleanup-long-running-cluster.sh skip-delete-resources-list.txt + else + echo "No skip-delete-resources-list.txt found or file is empty. Running cleanup without skip list." + ./.github/scripts/cleanup-long-running-cluster.sh fi + - name: Download Bicep run: | chmod +x ./bin/rad @@ -452,9 +485,11 @@ jobs: which rad || { echo "cannot find rad"; exit 1; } rad bicep download rad version + - name: Install gotestsum (test reporting tool) run: | go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VER }} + - name: Install Radius if: env.SKIP_BUILD != 'true' run: | @@ -513,16 +548,19 @@ jobs: echo "Manifests not registered after 10 minutes." exit 1 fi + - name: Create a list of resources not to be deleted if: env.SKIP_BUILD != 'true' run: | kubectl get resources.ucp.dev -n radius-system --no-headers -o custom-columns=":metadata.name" > skip-delete-resources-list.txt + - name: Save list of resources not to be deleted if: env.SKIP_BUILD != 'true' - uses: actions/cache/save@v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: skip-delete-resources-list.txt key: skip-delete-resources-list-file + - name: Configure Radius test workspace run: | set -x @@ -554,43 +592,45 @@ jobs: if: failure() run: | echo ":x: Failed to install Radius for functional test." >> $GITHUB_STEP_SUMMARY + - name: Install Flux CLI and Source Controller uses: ./.github/actions/install-flux - # - name: Install Gitea - # id: install-gitea - # uses: ./.github/actions/install-gitea - # env: - # GITEA_PASSWORD: ${{ secrets.GITEA_PASSWORD }} - # with: - # gitea-username: ${{ env.GITEA_USERNAME }} - # gitea-email: ${{ env.GITEA_EMAIL }} - # gitea-access-token-name: ${{ env.GITEA_ACCESS_TOKEN_NAME }} - # - name: Port-forward to Gitea - # run: | - # # Start port forwarding in the background - # kubectl port-forward -n gitea svc/gitea-http 30080:3000 & - - # # Wait for port forwarding to be established - # sleep 5 - - # # Test the connection to ensure port forwarding is working - # curl -s http://localhost:30080 > /dev/null || (echo "Port forwarding failed" && exit 1) - - # echo "Port forwarding established successfully" + + - name: Install Git HTTP backend + uses: ./.github/actions/install-git-http-backend + with: + git-username: ${{ env.GIT_HTTP_USERNAME }} + git-password: ${{ env.GIT_HTTP_PASSWORD }} + + - name: Port-forward to Git server + run: | + # Start port forwarding in the background + kubectl port-forward -n git-http-backend svc/git-http 30080:3000 & + + # Wait for port forwarding to be established + sleep 5 + + # Test the connection to ensure port forwarding is working + curl -s http://localhost:30080 > /dev/null || (echo "Port forwarding failed" && exit 1) + + echo "Port forwarding established successfully" - name: Publish Terraform test recipes run: | make publish-test-terraform-recipes + - name: Get OIDC Issuer from AKS cluster run: | echo "FUNCTEST_OIDC_ISSUER=$(az aks show -n ${{ env.AKS_CLUSTER_NAME }} -g ${{ env.AKS_RESOURCE_GROUP }} --query "oidcIssuerProfile.issuerUrl" -otsv)" >> $GITHUB_ENV + - name: Restore Bicep artifacts before running functional tests - # The exact files chosen to run the command can be changed, but we need 1 that uses the Radius extension, 1 that uses the AWS extension and 1 that uses UDT testresources - # so we can restore all Bicep artifacts before the tests start. + # The exact files chosen to run the command can be changed, but we need 1 that uses the Radius extension, 1 that uses the AWS extension and 1 that uses UDT testresources + # so we can restore all Bicep artifacts before the tests start. run: | # Restore Radius Bicep types bicep restore ./test/functional-portable/corerp/cloud/resources/testdata/corerp-azure-connection-database-service.bicep --force - # Restore AWS Bicep types + # Restore AWS Bicep types bicep restore ./test/functional-portable/corerp/cloud/resources/testdata/aws-s3-bucket.bicep --force + - name: Run functional tests run: | # Ensure rad cli is in path before running tests. @@ -623,7 +663,8 @@ jobs: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.BICEP_RECIPE_TAG_VERSION }} GH_TOKEN: ${{ steps.get_installation_token.outputs.token }} - # GITEA_ACCESS_TOKEN: ${{ steps.install-gitea.outputs.gitea-access-token }} + GIT_HTTP_PASSWORD: ${{ env.GIT_HTTP_PASSWORD }} + - name: Collect Pod details if: always() run: | @@ -633,27 +674,32 @@ jobs: kubectl get pods -A >> $POD_STATE_LOG_FILENAME echo "kubectl describe pods -A" >> $POD_STATE_LOG_FILENAME kubectl describe pods -A >> $POD_STATE_LOG_FILENAME + - name: Upload container logs if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: all_container_logs path: ./${{ env.RADIUS_CONTAINER_LOG_BASE }} + - name: Log radius e2e test status (success) if: success() run: | echo ":white_check_mark: functional tests succeeded" >> $GITHUB_STEP_SUMMARY + - name: Log radius e2e test status (failure) if: failure() run: | echo ":x: functional test failed." >> $GITHUB_STEP_SUMMARY + - name: Login to Azure if: always() - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.AZURE_SP_TESTS_APPID }} tenant-id: ${{ secrets.AZURE_SP_TESTS_TENANTID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID_TESTS }} + - name: Delete azure resource group - ${{ env.AZURE_TEST_RESOURCE_GROUP }} if: always() run: | @@ -662,12 +708,14 @@ jobs: --subscription ${{ secrets.AZURE_SUBSCRIPTIONID_TESTS }} \ --name ${{ env.AZURE_TEST_RESOURCE_GROUP }} \ --yes --verbose + - name: Restore skip-delete-resources-list if: always() - uses: actions/cache/restore@v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: skip-delete-resources-list.txt key: skip-delete-resources-list-file + - name: Clean up cluster if: always() timeout-minutes: 60 @@ -679,6 +727,7 @@ jobs: echo "Found skip-delete-resources-list.txt. Cleaning up resources..." fi ./.github/scripts/cleanup-long-running-cluster.sh skip-delete-resources-list.txt + report-failure: name: Report test failure needs: [build, tests] @@ -686,7 +735,7 @@ jobs: if: failure() && github.repository == 'radius-project/radius' && github.event_name == 'schedule' steps: - name: Create failure issue for failing long running test run - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | diff --git a/.github/workflows/nightly-rad-CLI-tests.yaml b/.github/workflows/nightly-rad-CLI-tests.yaml index db8fb31a20..03f2a628e3 100644 --- a/.github/workflows/nightly-rad-CLI-tests.yaml +++ b/.github/workflows/nightly-rad-CLI-tests.yaml @@ -1,9 +1,11 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Nightly rad CLI tests on: schedule: # Run every day at 11:47 PM UTC - - cron: '47 23 * * *' + - cron: "47 23 * * *" workflow_dispatch: pull_request: types: [opened, synchronize, reopened] @@ -38,9 +40,11 @@ jobs: ext: .exe steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Test CLI download run: make test-cli-download OS=${{ matrix.os }} ARCH=${{ matrix.arch }} FILE=${{ matrix.file }} EXT=${{ matrix.ext }} + - name: Create GitHub issue on failure if: ${{ failure() }} env: diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml index 3cff0dd5ed..dc6f2d23e6 100644 --- a/.github/workflows/publish-docs.yaml +++ b/.github/workflows/publish-docs.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Generate reference docs on: @@ -27,13 +29,20 @@ jobs: GOPRIVATE: github.com/radius-project steps: - name: Checkout radius repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/radius path: radius submodules: recursive + + - name: Setup Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version-file: radius/.python-version + - name: Parse release version and set environment variables run: python radius/.github/scripts/get_release_version.py + - name: Generate docs release branch name run: | if [[ ${{ env.REL_CHANNEL }} != "edge" ]]; then @@ -41,72 +50,87 @@ jobs: else echo DOCS_BRANCH="edge" >> $GITHUB_ENV fi + - name: Checkout docs repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/docs path: docs ref: ${{ env.DOCS_BRANCH }} + # Setup dependencies - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: radius/go.mod cache-dependency-path: radius/go.sum cache: true + - name: Setup NodeJS - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "18" + node-version-file: radius/.node-version + - name: Install TypeSpec compiler run: | pushd radius/typespec npm ci popd + - name: Install autorest - run: npm install -g autorest@3.7.1 + run: npm install -g autorest@3.7.2 + - name: Install oav - run: npm install -g oav@3.3.5 + run: npm install -g oav@4.0.2 + - name: Install mockgen run: | cd radius go install go.uber.org/mock/mockgen@v0.4.0 + - name: Install controller-gen run: | cd radius go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.0 + # Generate Bicep docs - name: Generate Bicep docs run: | cd radius make generate + # Generate resource reference docs - name: Generate resource reference docs run: python docs/.github/scripts/generate_resource_references.py ./radius/hack/bicep-types-radius/generated/ ./docs/docs/content/reference/resources + - name: Upload resource reference docs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: resource-docs path: docs/docs/content/reference/resources + # Generate and upload CLI docs - name: Generate CLI docs run: | find docs/docs/content/reference/cli -type f ! -name '_index.md' -delete cd radius go run cmd/docgen/main.go ../docs/docs/content/reference/cli + - name: Upload CLI docs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: cli-docs path: docs/docs/content/reference/cli + # Open PR against docs repository - name: Show git diff run: | cd docs git status --porcelain -unormal -- *.md + - name: Create pull request if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.open_pull_request == 'true') - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: token: ${{ secrets.GH_RAD_CI_BOT_PAT }} path: docs diff --git a/.github/workflows/purge-artifacts.yaml b/.github/workflows/purge-artifacts.yaml index 209d71d30a..8c1b951422 100644 --- a/.github/workflows/purge-artifacts.yaml +++ b/.github/workflows/purge-artifacts.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: "Delete all GitHub artifacts" on: @@ -12,7 +14,7 @@ jobs: delete-artifacts: runs-on: ubuntu-latest steps: - - uses: kolpav/purge-artifacts-action@v1 + - uses: kolpav/purge-artifacts-action@04c636a505f26ebc82f8d070b202fb87ff572b10 # v1 with: token: ${{ secrets.GITHUB_TOKEN }} expire-in: ${{ github.event.inputs.retention }} diff --git a/.github/workflows/purge-aws-test-resources.yaml b/.github/workflows/purge-aws-test-resources.yaml index 9385db554a..cc920b9ff9 100644 --- a/.github/workflows/purge-aws-test-resources.yaml +++ b/.github/workflows/purge-aws-test-resources.yaml @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Purge AWS test resources on: workflow_dispatch: @@ -34,18 +36,21 @@ jobs: if: github.repository == 'radius-project/radius' steps: - name: Checkout the repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v5.1.0 + uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: aws-access-key-id: ${{ secrets.FUNCTEST_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.FUNCTEST_AWS_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} + - name: Delete old AWS resources run: | ./.github/scripts/delete-aws-resources.sh ${{ env.AWS_RESOURCE_TYPES }} + - name: Create issue for failing purge aws test resources run - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 if: failure() with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} diff --git a/.github/workflows/purge-azure-test-resources.yaml b/.github/workflows/purge-azure-test-resources.yaml index b991fc4e38..ddc41b023d 100644 --- a/.github/workflows/purge-azure-test-resources.yaml +++ b/.github/workflows/purge-azure-test-resources.yaml @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Purge Azure test resources permissions: @@ -43,8 +45,9 @@ jobs: steps: - name: Setup Azure CLI run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + - name: Login to Azure - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.AZURE_SP_TESTS_APPID }} tenant-id: ${{ secrets.AZURE_SP_TESTS_TENANTID }} @@ -95,13 +98,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Login to Azure - uses: azure/login@v2 + uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 with: client-id: ${{ secrets.BICEPTYPES_CLIENT_ID }} tenant-id: ${{ secrets.BICEPTYPES_TENANT_ID }} subscription-id: ${{ secrets.BICEPTYPES_SUBSCRIPTION_ID }} - # Delete Bicep types that are older than 30 days from the test registry + # Delete Bicep types that are older than 30 days from the test registry - name: Delete test bicep type manifests run: | REPO_NAME="test/radius" @@ -112,7 +115,7 @@ jobs: -r $REGISTRY_NAME \ -n $REPO_NAME \ --query "[?lastUpdateTime<='$DATE'].digest" \ - -o tsv | while read DIGEST; do + -o tsv | while read DIGEST; do az acr manifest delete \ -n $REPO_NAME@$DIGEST \ -r $REGISTRY_NAME --yes @@ -124,7 +127,7 @@ jobs: runs-on: ubuntu-latest if: ${{ failure() && github.event_name != 'workflow_dispatch' }} steps: - - uses: actions/github-script@v8 + - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | @@ -133,4 +136,4 @@ jobs: title: `Purge Azure test resources failed - Run ID: ${context.runId}`, labels: ['test-failure'], body: `## Bug information \n\nThis bug is generated automatically if the purge Azure test resources workflow fails. For the further investigation, please visit [here](${process.env.ACTION_LINK}).` - }) \ No newline at end of file + }) diff --git a/.github/workflows/purge-old-images.yaml b/.github/workflows/purge-old-images.yaml index a10562ef23..faa7c190b3 100644 --- a/.github/workflows/purge-old-images.yaml +++ b/.github/workflows/purge-old-images.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Purge test container images permissions: @@ -22,7 +24,7 @@ jobs: if: github.repository == 'radius-project/radius' steps: - name: Delete 'dev' containers older than a week - uses: snok/container-retention-policy@v3.0.1 + uses: snok/container-retention-policy@3b0972b2276b171b212f8c4efbca59ebba26eceb # v3.0.1 with: account: radius-project token: ${{ secrets.GH_RAD_CI_BOT_PAT }} @@ -36,7 +38,7 @@ jobs: runs-on: ubuntu-latest if: ${{ failure() && github.event_name != 'workflow_dispatch' }} steps: - - uses: actions/github-script@v8 + - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | diff --git a/.github/workflows/radius-bot.yaml b/.github/workflows/radius-bot.yaml index a0e3035e64..3b67afd1fd 100644 --- a/.github/workflows/radius-bot.yaml +++ b/.github/workflows/radius-bot.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: radius-bot on: @@ -10,15 +12,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: sparse-checkout: | .github/scripts/radius-bot.js sparse-checkout-cone-mode: false + - name: Comment analyzer - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: - TEAM_SLUG: 'approvers-radius' + TEAM_SLUG: "approvers-radius" with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} script: | diff --git a/.github/workflows/release-verification.yaml b/.github/workflows/release-verification.yaml index 368045a59a..6549c4a102 100644 --- a/.github/workflows/release-verification.yaml +++ b/.github/workflows/release-verification.yaml @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Release verification on: @@ -30,10 +32,12 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'radius-project/radius' steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Ensure inputs.version is valid semver run: | python ./.github/scripts/validate_semver.py ${{ inputs.version }} + - name: Run release verification run: | ./.github/scripts/release-verification.sh ${{ inputs.version }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 555b81603d..5bfa9b6f36 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,22 +14,24 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Release Radius on: push: branches: - main - - 'release/*' + - "release/*" paths: - - 'versions.yaml' + - "versions.yaml" pull_request: branches: - main - - 'release/*' + - "release/*" paths: - - 'versions.yaml' - + - "versions.yaml" + permissions: id-token: write packages: write @@ -49,19 +51,22 @@ jobs: RELNOTE_FOUND: false steps: - name: Checkout radius-project/radius - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Get supported versions from versions.yaml id: get-supported-versions - uses: mikefarah/yq@v4.48.1 + uses: mikefarah/yq@796317b885ae219215caa36e9bdacc87c9962c15 # v4.48.2 with: # Get a comma-separated list of supported versions cmd: yq '.supported[].version' versions.yaml | tr '\n' ',' | sed 's/,$//' + - name: Determine desired release version id: get-version run: | ./.github/scripts/release-get-version.sh ${{ steps.get-supported-versions.outputs.result }} "." + - name: Find the previous tag - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 id: latest-release-tag with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} @@ -72,8 +77,9 @@ jobs: repo: context.repo.repo, }) return data.tag_name + - name: Generate the release notes - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 id: generate-notes with: github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }} @@ -87,12 +93,13 @@ jobs: previous_tag_name: '${{ steps.latest-release-tag.outputs.result }}', }) return data.body - - uses: marocchino/sticky-pull-request-comment@v2 + + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 with: header: relnote-${{ github.run_id }} number: ${{ github.event.pull_request.number }} hide: true - hide_classify: 'OUTDATED' + hide_classify: "OUTDATED" message: | ## Release Information * Previous version: ${{ steps.latest-release-tag.outputs.result }} @@ -102,13 +109,15 @@ jobs: ``` ${{ steps.generate-notes.outputs.result }} ``` + - name: Find release note shell: bash run: | if [ -f ./docs/release-notes/${{ steps.get-version.outputs.release-version }}.md ]; then echo "RELNOTE_FOUND=true" >> $GITHUB_ENV fi - - uses: marocchino/sticky-pull-request-comment@v2 + + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 continue-on-error: true if: ${{ !contains(steps.get-version.outputs.release-version, '-rc') && env.RELNOTE_FOUND == 'false' }} with: @@ -118,75 +127,78 @@ jobs: message: | ## :warning: Missing release note :warning: - This is the official Radius release. Create the release note by following instruction: + This is the official Radius release. Create the release note by following instruction: 1. Create ./docs/release-notes/${{ steps.get-version.outputs.release-version }}.md from [release note template](https://github.com/radius-project/radius/blob/main/docs/release-notes/template.md) 2. Update the each section and add the above Change logs to the end of release note. 3. Push release note changes to the PR branch. + - name: Stop the workflow if release is the official and its release note is not found. if: ${{ !contains(steps.get-version.outputs.release-version, '-rc') && env.RELNOTE_FOUND == 'false' }} run: exit 1 + release: name: Create a new Radius release if: github.repository == 'radius-project/radius' && github.event_name == 'push' runs-on: ubuntu-latest environment: release steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/radius ref: main + - name: Checkout radius-project/radius@main - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/radius ref: main token: ${{ secrets.GH_RAD_CI_BOT_PAT }} path: radius + - name: Checkout radius-project/recipes@main - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/recipes ref: main token: ${{ secrets.GH_RAD_CI_BOT_PAT }} path: recipes + - name: Checkout radius-project/dashboard@main - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/dashboard ref: main token: ${{ secrets.GH_RAD_CI_BOT_PAT }} path: dashboard + - name: Checkout radius-project/bicep-types-aws@main - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: repository: radius-project/bicep-types-aws ref: main token: ${{ secrets.GH_RAD_CI_BOT_PAT }} path: bicep-types-aws - - name: Checkout radius-project/bicep-tools@main - uses: actions/checkout@v5 - with: - repository: radius-project/bicep-tools - ref: main - token: ${{ secrets.GH_RAD_CI_BOT_PAT }} - path: bicep-tools + - name: Set up GitHub credentials run: | git config --global user.name "Radius CI Bot" git config --global user.email "radiuscoreteam@service.microsoft.com" + - name: Get supported versions from versions.yaml id: get-supported-versions - uses: mikefarah/yq@v4.48.1 + uses: mikefarah/yq@796317b885ae219215caa36e9bdacc87c9962c15 # v4.48.2 with: # Get a comma-separated list of supported versions cmd: yq '.supported[].version' ./radius/versions.yaml | tr '\n' ',' | sed 's/,$//' + - name: Determine desired release version id: get-version run: | ./radius/.github/scripts/release-get-version.sh ${{ steps.get-supported-versions.outputs.result }} radius + - name: Check if release branch exists id: release-branch-exists - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: result-encoding: string script: | @@ -208,6 +220,7 @@ jobs: console.log("Release branch ${{ steps.get-version.outputs.release-branch-name }} does not exist.") return 'false' } + - name: Generate release summary if: steps.release-branch-exists.outputs.result == 'false' run: | @@ -217,26 +230,27 @@ jobs: echo "* Desired release tag: ${{ steps.get-version.outputs.release-version }}" >> $GITHUB_STEP_SUMMARY echo "* Desired release branch: ${{ steps.get-version.outputs.release-branch-name }}" >> $GITHUB_STEP_SUMMARY echo "* Release date: $(date)" >> $GITHUB_STEP_SUMMARY - - name: Release radius-project/bicep-tools version ${{ steps.get-version.outputs.release-version }} - if: success() && steps.release-branch-exists.outputs.result == 'false' - run: | - ./radius/.github/scripts/release-create-tag-and-branch.sh bicep-tools ${{ steps.get-version.outputs.release-version }} ${{ steps.get-version.outputs.release-branch-name }} + - name: Release radius-project/radius version ${{ steps.get-version.outputs.release-version }} if: success() && steps.release-branch-exists.outputs.result == 'false' run: | ./radius/.github/scripts/release-create-tag-and-branch.sh radius ${{ steps.get-version.outputs.release-version }} ${{ steps.get-version.outputs.release-branch-name }} + - name: Release radius-project/recipes version ${{ steps.get-version.outputs.release-version }} if: success() && steps.release-branch-exists.outputs.result == 'false' run: | ./radius/.github/scripts/release-create-tag-and-branch.sh recipes ${{ steps.get-version.outputs.release-version }} ${{ steps.get-version.outputs.release-branch-name }} + - name: Release radius-project/dashboard version ${{ steps.get-version.outputs.release-version }} if: success() && steps.release-branch-exists.outputs.result == 'false' run: | ./radius/.github/scripts/release-create-tag-and-branch.sh dashboard ${{ steps.get-version.outputs.release-version }} ${{ steps.get-version.outputs.release-branch-name }} + - name: Release radius-project/bicep-types-aws version ${{ steps.get-version.outputs.release-version }} if: success() && steps.release-branch-exists.outputs.result == 'false' run: | ./radius/.github/scripts/release-create-tag-and-branch.sh bicep-types-aws ${{ steps.get-version.outputs.release-version }} ${{ steps.get-version.outputs.release-branch-name }} + - name: Copy Deployment Engine image to GHCR if: success() && steps.release-branch-exists.outputs.result == 'false' uses: ./.github/actions/copy-deployment-engine-image diff --git a/.github/workflows/require-pr-checklist.yaml b/.github/workflows/require-pr-checklist.yaml index 01f957d0d2..a813eaa353 100644 --- a/.github/workflows/require-pr-checklist.yaml +++ b/.github/workflows/require-pr-checklist.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Require PR Checklist on: @@ -9,6 +11,6 @@ jobs: if: github.event.pull_request.user.login != 'dependabot[bot]' # Skip for Dependabot PRs runs-on: ubuntu-latest steps: - - uses: mheap/require-checklist-action@v2 + - uses: mheap/require-checklist-action@46d2ca1a0f90144bd081fd13a80b1dc581759365 # v2.5.0 with: - requireChecklist: true # If this is true and there are no checklists detected or not filled out, the action will fail \ No newline at end of file + requireChecklist: true # If this is true and there are no checklists detected or not filled out, the action will fail diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index e6eda7dbfe..8f500e61b7 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -4,7 +4,7 @@ # 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 @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: OpenSSF scorecard analysis on: # Only the default branch is supported. See @@ -21,10 +23,10 @@ on: branch_protection_rule: schedule: # The workflow will run at 5:42PM UTC every Monday. - - cron: '42 17 * * 1' + - cron: "42 17 * * 1" push: # The workflow will be triggered on every push to the main branch. - branches: [ "main" ] + branches: ["main"] # By default, the workflow has read-only access to the repository. permissions: read-all @@ -42,7 +44,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.1.5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false @@ -59,7 +61,7 @@ jobs: # uploads of run results in SARIF format to the repository Actions tab. # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts - name: "Upload artifact" - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: OpenSSF scan results path: results.sarif @@ -67,6 +69,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@83a02f7883b12e0e4e1a146174f5e2292a01e601 # v2.16.4 + uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4 with: sarif_file: results.sarif diff --git a/.github/workflows/triage-bot.yaml b/.github/workflows/triage-bot.yaml index 4062a63c1f..9c64c34de2 100644 --- a/.github/workflows/triage-bot.yaml +++ b/.github/workflows/triage-bot.yaml @@ -4,7 +4,7 @@ # 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 @@ -14,28 +14,34 @@ # limitations under the License. # ------------------------------------------------------------ -name: 'Radius Triage Bot' +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- +name: "Radius Triage Bot" + on: issues: types: [labeled, unlabeled] + permissions: contents: read issues: write + jobs: build: - name: 'Process Triage Labels' + name: "Process Triage Labels" runs-on: ubuntu-latest if: github.repository == 'radius-project/radius' - env: + env: RADIUS_TRIAGE_BOT_APP_ID: 417813 steps: - - uses: tibdex/github-app-token@v2 - id: get_installation_token - with: - app_id: ${{ env.RADIUS_TRIAGE_BOT_APP_ID }} - private_key: ${{ secrets.RADIUS_TRIAGE_BOT_PRIVATE_KEY }} - - uses: dessant/label-actions@v4 - with: - github-token: ${{ steps.get_installation_token.outputs.token }} - config-path: '.github/triage-bot/triage-bot-config.yaml' - process-only: 'issues' \ No newline at end of file + - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 + id: get_installation_token + with: + app_id: ${{ env.RADIUS_TRIAGE_BOT_APP_ID }} + private_key: ${{ secrets.RADIUS_TRIAGE_BOT_PRIVATE_KEY }} + + - uses: dessant/label-actions@102faf474a544be75fbaf4df54e73d3c515a0e65 # v4.0.1 + with: + github-token: ${{ steps.get_installation_token.outputs.token }} + config-path: ".github/triage-bot/triage-bot-config.yaml" + process-only: "issues" diff --git a/.github/workflows/validate-bicep.yaml b/.github/workflows/validate-bicep.yaml index bdaa8bf066..7af971dc96 100644 --- a/.github/workflows/validate-bicep.yaml +++ b/.github/workflows/validate-bicep.yaml @@ -4,7 +4,7 @@ # 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 @@ -14,7 +14,10 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Validate Bicep Code + on: # Enable manual trigger workflow_dispatch: @@ -44,10 +47,13 @@ jobs: name: Validate Bicep Code runs-on: ubuntu-latest steps: + - name: Check out repo + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: '18' + node-version-file: .node-version - name: Verify npx installation run: | @@ -64,23 +70,26 @@ jobs: chmod +x ./bicep sudo mv ./bicep /usr/local/bin/bicep bicep --version - - name: Check out repo - uses: actions/checkout@v5 - - name: Create a temporary file system + + - name: Create a temporary file system run: | mkdir tmp-radius-bicep-extension mkdir tmp-testresources-bicep-extension - - name: Publish bicep types - run: | + - name: Publish bicep types + run: | bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target ./tmp-radius-bicep-extension/radius.tgz --force + - name: Generate testresources extension index run: | npx @radius-project/manifest-to-bicep-extension@edge generate ./test/functional-portable/dynamicrp/noncloud/resources/testdata/testresourcetypes.yaml ./tmp-testresources-bicep-extension + - name: Publish testresources extension run: | bicep publish-extension ./tmp-testresources-bicep-extension/index.json --target ./tmp-testresources-bicep-extension/testresources.tgz --force + - name: Install jq run: sudo apt-get install -y jq + - name: Modify bicepconfig.json run: | # Update bicepconfig.json with paths for extensions @@ -95,7 +104,8 @@ jobs: cp -f bicepconfig.json ./test/functional-portable/dynamicrp/noncloud/resources/bicepconfig.json - name: Print updated bicepconfig.json run: cat bicepconfig.json + - name: Verify Bicep files run: ./build/validate-bicep.sh env: - BICEP_PATH: 'bicep' + BICEP_PATH: bicep diff --git a/.github/workflows/validate-devcontainer-feature.yaml b/.github/workflows/validate-devcontainer-feature.yaml index 90db06e81a..b7324a0fed 100644 --- a/.github/workflows/validate-devcontainer-feature.yaml +++ b/.github/workflows/validate-devcontainer-feature.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: "Validate devcontainer-feature.json files" on: workflow_dispatch: @@ -12,10 +14,10 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - name: "Validate devcontainer-feature.json files" - uses: devcontainers/action@v1 + uses: devcontainers/action@1082abd5d2bf3a11abccba70eef98df068277772 # v1.4.3 with: validate-only: "true" base-path-to-features: "./deploy/devcontainer-feature/src" diff --git a/.github/workflows/validate-installers.yaml b/.github/workflows/validate-installers.yaml index c4c42b576e..c3104f7ab6 100644 --- a/.github/workflows/validate-installers.yaml +++ b/.github/workflows/validate-installers.yaml @@ -4,7 +4,7 @@ # 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 @@ -14,6 +14,8 @@ # limitations under the License. # ------------------------------------------------------------ +# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json +--- name: Validate Radius Installers on: pull_request: @@ -30,7 +32,8 @@ jobs: name: Validate Installers runs-on: windows-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Run installer test script shell: powershell run: "deploy/test-pwsh-install.ps1" diff --git a/.gitignore b/.gitignore index 6838005fa2..1fae99915c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,8 @@ kcp.exe docs/.hugo_build.lock main -.vscode/ +.vscode/* +!.vscode/mcp.json .DS_Store .idea/ creds.json @@ -81,4 +82,4 @@ demo .debug/ # Folder generated by the PR review Copilot prompt. See the .github/prompts folder. -pr-review/ \ No newline at end of file +pr-review/ diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000..2bd5a0a98a --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +22 diff --git a/.python-version b/.python-version new file mode 100644 index 0000000000..6324d401a0 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/.vscode/mcp.json b/.vscode/mcp.json new file mode 100644 index 0000000000..5b15b817c4 --- /dev/null +++ b/.vscode/mcp.json @@ -0,0 +1,12 @@ +{ + "servers": { + "GitHub": { + "type": "http", + "url": "https://api.githubcopilot.com/mcp/" + }, + "Terraform": { + "command": "docker", + "args": ["run", "-i", "--rm", "hashicorp/terraform-mcp-server:0.3"] + } + } +} diff --git a/bicep-types b/bicep-types index 093b31c176..42aa3c3c5d 160000 --- a/bicep-types +++ b/bicep-types @@ -1 +1 @@ -Subproject commit 093b31c176071d34cb924df63834a36de1cfddef +Subproject commit 42aa3c3c5d374658b8f0b2647b892542bb394435 diff --git a/build/build.mk b/build/build.mk index a53da642ac..6fa7956cfe 100644 --- a/build/build.mk +++ b/build/build.mk @@ -66,7 +66,12 @@ export CGO_ENABLED=0 ##@ Build .PHONY: build -build: build-packages build-binaries build-bicep +build: check-bicep-types-submodule build-packages build-binaries build-bicep ## Builds all packages and binaries. + +.PHONY: check-bicep-types-submodule +check-bicep-types-submodule: ## Checks if bicep-types submodule exists and is at the correct version. + @git submodule status bicep-types | grep -q '^-' && { echo "$(ARROW) Error: The bicep-types submodule is not initialized."; echo "$(ARROW) Please run: git submodule update --init --recursive"; exit 1; } || true + @git submodule status bicep-types | grep -q '^+' && { echo "$(ARROW) Warning: The bicep-types submodule is not at the expected commit."; echo "$(ARROW) Please run: git submodule update --init --recursive"; exit 1; } || true .PHONY: build-packages build-packages: ## Builds all go packages. diff --git a/build/generate.mk b/build/generate.mk index 4911465092..a348ca9635 100644 --- a/build/generate.mk +++ b/build/generate.mk @@ -4,7 +4,7 @@ # 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 @@ -25,7 +25,7 @@ endif # generate-rad-corerp-client-2025-08-01-preview is a new target, which will replace generate-rad-corerp-client in future, once all resources of Radius.Core are ready and Applications.Core is deprecated. .PHONY: generate -generate: generate-genericcliclient generate-rad-corerp-client generate-rad-corerp-client-2025-08-01-preview generate-rad-datastoresrp-client generate-rad-messagingrp-client generate-rad-daprrp-client generate-rad-ucp-client generate-go generate-bicep-types generate-ucp-crd generate-controller ## Generates all targets. +generate: generate-cleanup generate-genericcliclient generate-rad-corerp-client generate-rad-corerp-client-2025-08-01-preview generate-rad-datastoresrp-client generate-rad-messagingrp-client generate-rad-daprrp-client generate-rad-ucp-client generate-go generate-bicep-types generate-ucp-crd generate-controller ## Generates all targets. .PHONY: generate-tsp-installed generate-tsp-installed: @@ -36,7 +36,7 @@ generate-tsp-installed: .PHONY: generate-openapi-spec generate-openapi-spec: # Generates all Radius OpenAPI specs from TypeSpec. @echo "Generating openapi specs from typespec models." - cd typespec/UCP && npx$(CMD_EXT) tsp compile . + cd typespec/UCP && npx$(CMD_EXT) tsp compile . cd typespec/Applications.Core && npx$(CMD_EXT) tsp compile . cd typespec/Applications.Dapr && npx$(CMD_EXT) tsp compile . cd typespec/Applications.Messaging && npx$(CMD_EXT) tsp compile . @@ -52,7 +52,7 @@ generate-node-installed: .PHONY: generate-autorest-installed generate-autorest-installed: @echo "$(ARROW) Detecting autorest..." - @which autorest > /dev/null || { echo "run 'npm install -g autorest' to install autorest"; exit 1; } + @which autorest > /dev/null || { echo "run 'npm install -g autorest@3.7.2' to install autorest"; exit 1; } @echo "$(ARROW) OK" .PHONY: generate-controller-gen-installed @@ -73,40 +73,51 @@ generate-controller: generate-controller-gen-installed ## Generates the CRDs for controller-gen object:headerFile=./boilerplate.go.txt paths=./pkg/controller/api/... controller-gen crd paths=./pkg/controller/api/... output:crd:dir=./deploy/Chart/crds/radius +.PHONY: generate-cleanup +generate-cleanup: ## Deletes all generated code. + @echo "$(ARROW) Deleting generated code..." + find . -type f -name 'zz_*.go' ! -name 'zz_*.deepcopy.go' -delete + @echo "$(ARROW) Done." + .PHONY: generate-genericcliclient generate-genericcliclient: generate-node-installed generate-autorest-installed - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/cli/clients_new/README.md --tag=2023-10-01-preview + @echo "$(ARROW) Generating 'pkg/cli/clients_new/generated'" + autorest pkg/cli/clients_new/README.md --tag=2023-10-01-preview && rm pkg/cli/clients_new/generated/go.mod && go fmt ./pkg/cli/clients_new/generated/... + @echo "$(ARROW) Done." .PHONY: generate-rad-corerp-client generate-rad-corerp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the corerp client SDK (Autorest). - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/corerp/api/README.md --tag=core-2023-10-01-preview && rm pkg/corerp/api/v20231001preview/go.mod + @echo "$(ARROW) Generating 'pkg/corerp/api/v20231001preview'" + autorest pkg/corerp/api/README.md --tag=core-2023-10-01-preview && rm pkg/corerp/api/v20231001preview/go.mod && go fmt ./pkg/corerp/api/v20231001preview/... + @echo "$(ARROW) Done." .PHONY: generate-rad-corerp-client-2025-08-01-preview generate-rad-corerp-client-2025-08-01-preview: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the corerp client SDK for 2025-08-01-preview (Autorest). - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/corerp/api/README.md --tag=core-2025-08-01-preview && rm pkg/corerp/api/v20250801preview/go.mod + @echo "$(ARROW) Generating 'pkg/corerp/api/v20250801preview'" + autorest pkg/corerp/api/README.md --tag=core-2025-08-01-preview && rm pkg/corerp/api/v20250801preview/go.mod && go fmt ./pkg/corerp/api/v20250801preview/... + @echo "$(ARROW) Done." .PHONY: generate-rad-datastoresrp-client generate-rad-datastoresrp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the datastoresrp client SDK (Autorest). - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/datastoresrp/api/README.md --tag=datastores-2023-10-01-preview && rm pkg/datastoresrp/api/v20231001preview/go.mod + @echo "$(ARROW) Generating 'pkg/datastoresrp/api/v20231001preview'" + autorest pkg/datastoresrp/api/README.md --tag=datastores-2023-10-01-preview && rm pkg/datastoresrp/api/v20231001preview/go.mod && go fmt ./pkg/datastoresrp/api/v20231001preview/... + @echo "$(ARROW) Done." .PHONY: generate-rad-messagingrp-client generate-rad-messagingrp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the messagingrp client SDK (Autorest). - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/messagingrp/api/README.md --tag=messaging-2023-10-01-preview && rm pkg/messagingrp/api/v20231001preview/go.mod + @echo "$(ARROW) Generating 'pkg/messagingrp/api/v20231001preview'" + autorest pkg/messagingrp/api/README.md --tag=messaging-2023-10-01-preview && rm pkg/messagingrp/api/v20231001preview/go.mod && go fmt ./pkg/messagingrp/api/v20231001preview/... + @echo "$(ARROW) Done." .PHONY: generate-rad-daprrp-client generate-rad-daprrp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the daprrp client SDK (Autorest). - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/daprrp/api/README.md --tag=dapr-2023-10-01-preview && rm pkg/daprrp/api/v20231001preview/go.mod + @echo "$(ARROW) Generating 'pkg/daprrp/api/v20231001preview'" + autorest pkg/daprrp/api/README.md --tag=dapr-2023-10-01-preview && rm pkg/daprrp/api/v20231001preview/go.mod && go fmt ./pkg/daprrp/api/v20231001preview/... + @echo "$(ARROW) Done." .PHONY: generate-rad-ucp-client generate-rad-ucp-client: generate-node-installed generate-autorest-installed test-ucp-spec-examples ## Generates the UCP client SDK (Autorest). - @echo "$(AUTOREST_MODULE_VERSION) is module version" - autorest pkg/ucp/api/README.md --tag=ucp-2023-10-01-preview && rm pkg/ucp/api/v20231001preview/go.mod + autorest pkg/ucp/api/README.md --tag=ucp-2023-10-01-preview && rm pkg/ucp/api/v20231001preview/go.mod && go fmt ./pkg/ucp/api/v20231001preview/... .PHONY: generate-mockgen-installed generate-mockgen-installed: diff --git a/build/test.mk b/build/test.mk index 4c89d2190a..0a68676334 100644 --- a/build/test.mk +++ b/build/test.mk @@ -171,7 +171,7 @@ test-helm: ## Runs Helm chart unit tests .PHONY: oav-installed oav-installed: @echo "$(ARROW) Detecting oav (https://github.com/Azure/oav)..." - @which oav > /dev/null || { echo "run 'npm install -g oav' to install oav"; exit 1; } + @which oav > /dev/null || { echo "run 'npm install -g oav@4.0.2' to install oav"; exit 1; } @echo "$(ARROW) OK" # TODO re-enable https://github.com/radius-project/radius/issues/5091 diff --git a/build/version.mk b/build/version.mk index e82695b9fb..6e6f3045d2 100644 --- a/build/version.mk +++ b/build/version.mk @@ -4,7 +4,7 @@ # 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 @@ -19,16 +19,6 @@ GIT_COMMIT = $(shell git rev-list -1 HEAD) GIT_VERSION = $(shell git describe --always --abbrev=7 --dirty --tags) -# Azure Autorest require a --module-version, which is used -# as a telemetry key in the generated API client. -# -# It has the format ${major}.${minor}.${patch}[-beta.${N}], where -# all ${major}, ${minor}, ${patch}, ${N} are numbers. -# -# Currently we don't use this yet, so just setting to 0.0.1 to -# make autorest happy. -AUTOREST_MODULE_VERSION = 0.0.1 - REL_VERSION ?= edge REL_CHANNEL ?= edge -CHART_VERSION ?= 0.42.42-dev \ No newline at end of file +CHART_VERSION ?= 0.42.42-dev diff --git a/cmd/rad/cmd/recipepack.go b/cmd/rad/cmd/recipepack.go new file mode 100644 index 0000000000..b8634e724c --- /dev/null +++ b/cmd/rad/cmd/recipepack.go @@ -0,0 +1,35 @@ +/* +Copyright 2023 The Radius Authors. + +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 cmd + +import ( + "github.com/spf13/cobra" +) + +func init() { + RootCmd.AddCommand(recipePackCmd) + recipePackCmd.PersistentFlags().StringP("workspace", "w", "", "The workspace name") +} + +func NewRecipePackCommand() *cobra.Command { + return &cobra.Command{ + Use: "recipe-pack", + Short: "Manage recipe-packs", + Long: `Manage recipe-packs + Recipe-packs automate the deployment of infrastructure and configuration of radius resources.`, + } +} diff --git a/cmd/rad/cmd/root.go b/cmd/rad/cmd/root.go index e48b598333..fa75683306 100644 --- a/cmd/rad/cmd/root.go +++ b/cmd/rad/cmd/root.go @@ -55,6 +55,9 @@ import ( recipe_register "github.com/radius-project/radius/pkg/cli/cmd/recipe/register" recipe_show "github.com/radius-project/radius/pkg/cli/cmd/recipe/show" recipe_unregister "github.com/radius-project/radius/pkg/cli/cmd/recipe/unregister" + recipe_pack_delete "github.com/radius-project/radius/pkg/cli/cmd/recipepack/delete" + recipe_pack_list "github.com/radius-project/radius/pkg/cli/cmd/recipepack/list" + recipe_pack_show "github.com/radius-project/radius/pkg/cli/cmd/recipepack/show" resource_create "github.com/radius-project/radius/pkg/cli/cmd/resource/create" resource_delete "github.com/radius-project/radius/pkg/cli/cmd/resource/delete" resource_list "github.com/radius-project/radius/pkg/cli/cmd/resource/list" @@ -124,6 +127,7 @@ var resourceCmd = NewResourceCommand() var resourceProviderCmd = NewResourceProviderCommand() var resourceTypeCmd = NewResourceTypeCommand() var recipeCmd = NewRecipeCommand() +var recipePackCmd = NewRecipePackCommand() var envCmd = NewEnvironmentCommand() var workspaceCmd = NewWorkspaceCommand() @@ -303,6 +307,15 @@ func initSubCommands() { unregisterRecipeCmd, _ := recipe_unregister.NewCommand(framework) recipeCmd.AddCommand(unregisterRecipeCmd) + listRecipePackCmd, _ := recipe_pack_list.NewCommand(framework) + recipePackCmd.AddCommand(listRecipePackCmd) + + deleteRecipePackCmd, _ := recipe_pack_delete.NewCommand(framework) + recipePackCmd.AddCommand(deleteRecipePackCmd) + + showRecipePackCmd, _ := recipe_pack_show.NewCommand(framework) + recipePackCmd.AddCommand(showRecipePackCmd) + providerCmd := credential.NewCommand(framework) RootCmd.AddCommand(providerCmd) diff --git a/deploy/Chart/crds/radius/radapp.io_deploymentresources.yaml b/deploy/Chart/crds/radius/radapp.io_deploymentresources.yaml index 481cd74e3b..7d0524605b 100644 --- a/deploy/Chart/crds/radius/radapp.io_deploymentresources.yaml +++ b/deploy/Chart/crds/radius/radapp.io_deploymentresources.yaml @@ -63,7 +63,6 @@ spec: observedGeneration: description: ObservedGeneration is the most recent generation observed for this DeploymentResource. - format: int64 type: integer operation: description: Operation tracks the status of an in-progress provisioning diff --git a/deploy/Chart/crds/radius/radapp.io_deploymenttemplates.yaml b/deploy/Chart/crds/radius/radapp.io_deploymenttemplates.yaml index 1b68f4b1db..723d8544ef 100644 --- a/deploy/Chart/crds/radius/radapp.io_deploymenttemplates.yaml +++ b/deploy/Chart/crds/radius/radapp.io_deploymenttemplates.yaml @@ -73,7 +73,6 @@ spec: observedGeneration: description: ObservedGeneration is the most recent generation observed for this DeploymentTemplate. - format: int64 type: integer operation: description: Operation tracks the status of an in-progress provisioning diff --git a/deploy/Chart/crds/radius/radapp.io_recipes.yaml b/deploy/Chart/crds/radius/radapp.io_recipes.yaml index 15afb1220a..242039d0b6 100644 --- a/deploy/Chart/crds/radius/radapp.io_recipes.yaml +++ b/deploy/Chart/crds/radius/radapp.io_recipes.yaml @@ -88,7 +88,6 @@ spec: description: |- ObservedGeneration is the most recent generation observed for this Recipe. It corresponds to the Recipe's generation, which is updated on mutation by the API Server. - format: int64 type: integer operation: description: Operation tracks the status of an in-progress provisioning diff --git a/deploy/Chart/templates/dynamic-rp/rbac.yaml b/deploy/Chart/templates/dynamic-rp/rbac.yaml index 9501c7257f..97a7730349 100644 --- a/deploy/Chart/templates/dynamic-rp/rbac.yaml +++ b/deploy/Chart/templates/dynamic-rp/rbac.yaml @@ -27,14 +27,6 @@ rules: - patch - update - watch - verbs: - - create - - delete - - get - - list - - patch - - update - - watch # Adding coordination.k8s.io api group as Terraform need to access leases resource for backend initialization for state locking: https://developer.hashicorp.com/terraform/language/settings/backends/kubernetes. - apiGroups: - coordination.k8s.io diff --git a/deploy/manifest/built-in-providers/dev/radius-core.yaml b/deploy/manifest/built-in-providers/dev/radius-core.yaml index 73e3962905..57e6e390bd 100644 --- a/deploy/manifest/built-in-providers/dev/radius-core.yaml +++ b/deploy/manifest/built-in-providers/dev/radius-core.yaml @@ -6,6 +6,10 @@ types: apiVersions: "2025-08-01-preview": schema: {} + applications: + apiVersions: + "2025-08-01-preview": + schema: {} recipePacks: apiVersions: "2025-08-01-preview": diff --git a/deploy/manifest/built-in-providers/self-hosted/radius-core.yaml b/deploy/manifest/built-in-providers/self-hosted/radius-core.yaml index 577206029a..d608e10f4d 100644 --- a/deploy/manifest/built-in-providers/self-hosted/radius-core.yaml +++ b/deploy/manifest/built-in-providers/self-hosted/radius-core.yaml @@ -6,6 +6,10 @@ types: apiVersions: "2025-08-01-preview": schema: {} + applications: + apiVersions: + "2025-08-01-preview": + schema: {} recipePacks: apiVersions: "2025-08-01-preview": diff --git a/docs/contributing/contributing-code/contributing-code-building/README.md b/docs/contributing/contributing-code/contributing-code-building/README.md index 488badf246..5c14b16ed6 100644 --- a/docs/contributing/contributing-code/contributing-code-building/README.md +++ b/docs/contributing/contributing-code/contributing-code-building/README.md @@ -4,6 +4,8 @@ Radius uses a Makefile to build the repository and automate most common reposito You can run `make` (no additional arguments) to see the list of targets and their descriptions. +> NOTE: Some parts of the build process depend on the submodule `bicep-types`, so after cloning the repository, you should run `git submodule update --init --recursive` to ensure that the `bicep-types` submodule is checked out. By default, `git clone` will not clone submodules. If you have not cloned the submodule, or if the submodule is out of date, the `make build` command will fail and prompt you to update the submodule. + ## Building the repository You can build the repository with `make build`. This will build all of the packages and executables. The first time you run `make build` it may take a few minutes because it will download and build dependencies. Subsequent builds will be faster because they can use cached output. diff --git a/docs/contributing/contributing-code/contributing-code-prerequisites/README.md b/docs/contributing/contributing-code/contributing-code-prerequisites/README.md index 5f31e7af56..b83294921e 100644 --- a/docs/contributing/contributing-code/contributing-code-prerequisites/README.md +++ b/docs/contributing/contributing-code/contributing-code-prerequisites/README.md @@ -181,8 +181,8 @@ Enter the following commands to install all of the required tools. ```bash cd typespec && npm ci -npm install -g autorest -npm install -g oav +npm install -g autorest@3.7.2 +npm install -g oav@4.0.2 go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.0 go install go.uber.org/mock/mockgen@v0.4.0 ``` diff --git a/docs/contributing/contributing-code/contributing-code-reviewing/README.md b/docs/contributing/contributing-code/contributing-code-reviewing/README.md index 76c6f5fc46..cf878bfb21 100644 --- a/docs/contributing/contributing-code/contributing-code-reviewing/README.md +++ b/docs/contributing/contributing-code/contributing-code-reviewing/README.md @@ -169,7 +169,7 @@ More details about those roles can be found in the [community repo](https://gith Approvers are expected to display good judgement, responsibility, and competence over the *top* of the code review pyramid (Style, Correctness, Design). -It's likely that for for small changes a maintainer will delegate responsibility for approval to a maintainer working in the relevant area. +It's likely that for small changes a maintainer will delegate responsibility for approval to a maintainer working in the relevant area. Approvers are responsible for enforcing the **completeness** of a change. Each pull-request that is merged to `main` must stand on its own merits. We do not allow a submitter to merge and then "follow up" to complete the work (for example merging a change without tests). If you encounter this situation, **DO NOT** merge the pull-request, ask the submitter to complete the work. If they are unable to do so, then it is appropriate to close the pull-request without merging. diff --git a/docs/release-notes/v0.53.0.md b/docs/release-notes/v0.53.0.md new file mode 100644 index 0000000000..a0dcd88a49 --- /dev/null +++ b/docs/release-notes/v0.53.0.md @@ -0,0 +1,80 @@ +## Announcing Radius v0.53.0 +Today we're happy to announce the release of Radius v0.53.0. Check out the [highlights](#highlights) below, along with the [full changelog](#changelog) for more details. + +We would like to extend our thanks to all the [new](#new-contributors) and existing contributors who helped make this release possible! + +## Intro to Radius + +If you're new to Radius, check out our website, [radapp.io](https://radapp.io), for more information. Also visit our [getting started guide](https://docs.radapp.io/getting-started/) to learn how to install Radius and create your first app. + +## Highlights + +### Contour ingress controller installation re-enabled +Thanks to the newly available [Contour Helm Charts](https://github.com/projectcontour/helm-charts/releases/tag/contour-0.1.0), Radius has re-enabled installation of the Contour ingress controller during `rad install kubernetes` or `rad init`. This means that you no longer need to manually install and configure a Contour ingress controller before deploying Gateway resources. + +### Improved Environment deletion experience +The [`rad env delete`](https://docs.radapp.io/reference/cli/rad_environment_delete/) command has been enhanced to make Environment cleanup safer and more transparent. It will now show different prompts for deleting empty vs. populated Environments to help users understand what will be deleted. Furthermore, progress messages during deletion operations have been added to provide clearer progress information during the deletion process. + +## New contributors + +Welcome to our new contributors who have merged their first PR in this release! + +* @koksay made their first contribution in https://github.com/radius-project/radius/pull/10614 +* @DariuszPorowski made their first contribution in https://github.com/radius-project/radius/pull/10771 + + +## Upgrading to Radius v0.53.0 + +You can upgrade to this release by upgrading your Radius CLI then running `rad upgrade kubernetes`. Only incremental version upgrades are supported. Consult the [upgrade documentation](https://docs.radapp.io/guides/operations/kubernetes/kubernetes-upgrade/) for full details. + +## What's Changed +### changelog +* Adds TF debug/trace logging support. by @vishwahiremat in https://github.com/radius-project/radius/pull/10544 +* New GH Action to pull deployment engine image to GHCR by @willdavsmith in https://github.com/radius-project/radius/pull/10623 +* Re-enable Contour by @willdavsmith in https://github.com/radius-project/radius/pull/10573 +* Release 0.52.0 by @brooke-hamilton in https://github.com/radius-project/radius/pull/10625 +* Add checkout steps for `copy-deployment-engine-image` action by @willdavsmith in https://github.com/radius-project/radius/pull/10627 +* recipe packs schema and generated files by @nithyatsu in https://github.com/radius-project/radius/pull/10592 +* Bump the github-actions group across 1 directory with 4 updates by @dependabot[bot] in https://github.com/radius-project/radius/pull/10666 +* pin setup-envtest version to a version compible with go by @nithyatsu in https://github.com/radius-project/radius/pull/10683 +* Bump bicep-types from `7f36e72` to `dee7e86` by @dependabot[bot] in https://github.com/radius-project/radius/pull/10668 +* Updated functional test cloud workflow to checkout submodule by @vishwahiremat in https://github.com/radius-project/radius/pull/10688 +* Updated functional test cloud workflow to checkout submodule by @vishwahiremat in https://github.com/radius-project/radius/pull/10691 +* Bump `charmbracelet/x/exp/teatest` version by @willdavsmith in https://github.com/radius-project/radius/pull/10628 +* chore(ci): update github runners to oci gh arc runners by @koksay in https://github.com/radius-project/radius/pull/10614 +* Update functional tests and long-running tests to use ubuntu-latest runner by @brooke-hamilton in https://github.com/radius-project/radius/pull/10708 +* Standardize argument naming and help text for `rad resource-type` commands by @Copilot in https://github.com/radius-project/radius/pull/10372 +* Adding bicep-tools changes in golang into radius by @vishwahiremat in https://github.com/radius-project/radius/pull/10686 +* Add submodule get on workflows to fix build failures by @brooke-hamilton in https://github.com/radius-project/radius/pull/10721 +* Bump actions/setup-node from 5 to 6 in the github-actions group by @dependabot[bot] in https://github.com/radius-project/radius/pull/10724 +* Bump bicep-types from `dee7e86` to `093b31c` by @dependabot[bot] in https://github.com/radius-project/radius/pull/10725 +* Removing npx install check from publish bicep extesion command by @vishwahiremat in https://github.com/radius-project/radius/pull/10726 +* Recipe Packs basic controller and routing to the Radius.Core namespace by @nithyatsu in https://github.com/radius-project/radius/pull/10606 +* feat(cli): enhance rad env delete with resource counting and safety prompts by @ytimocin in https://github.com/radius-project/radius/pull/10455 +* upgrade go to 1.25.0 by @nithyatsu in https://github.com/radius-project/radius/pull/10684 +* update dev container lint version by @nithyatsu in https://github.com/radius-project/radius/pull/10741 +* Add Radius.Core/applications type by @lakshmimsft in https://github.com/radius-project/radius/pull/10722 +* Bump `charmbracelet/x/exp/teatest` version by @brooke-hamilton in https://github.com/radius-project/radius/pull/10742 +* Bump the go-dependencies group across 1 directory with 13 updates by @dependabot[bot] in https://github.com/radius-project/radius/pull/10740 +* Add submodule check to make build by @brooke-hamilton in https://github.com/radius-project/radius/pull/10738 +* Go dependabot config for `mapgiego` and `testrp` by @brooke-hamilton in https://github.com/radius-project/radius/pull/10743 +* Bump the go-dependencies group with 7 updates by @dependabot[bot] in https://github.com/radius-project/radius/pull/10744 +* Workflow schedule update for functional tests and long running tests by @brooke-hamilton in https://github.com/radius-project/radius/pull/10745 +* Add Readme file to help generate bicep types under Radius.Core by @lakshmimsft in https://github.com/radius-project/radius/pull/10746 +* Bump the github-actions group with 2 updates by @dependabot[bot] in https://github.com/radius-project/radius/pull/10754 +* Bump bicep-types from `093b31c` to `eb75ca1` by @dependabot[bot] in https://github.com/radius-project/radius/pull/10756 +* Bump the go-dependencies group with 10 updates by @dependabot[bot] in https://github.com/radius-project/radius/pull/10755 +* Add entries to help register new applications type by @lakshmimsft in https://github.com/radius-project/radius/pull/10760 +* Adding rad recipe-pack list and show commands by @vishwahiremat in https://github.com/radius-project/radius/pull/10759 +* Update deprecated tool list names in code review prompt by @brooke-hamilton in https://github.com/radius-project/radius/pull/10770 +* update rc version by @sylvainsf in https://github.com/radius-project/radius/pull/10773 +* Sylvainsf/release 0.53.0 rc2 by @sylvainsf in https://github.com/radius-project/radius/pull/10776 +* Adding rad recipe-pack delete command by @vishwahiremat in https://github.com/radius-project/radius/pull/10768 +* Remove bicep-tools from release by @sk593 in https://github.com/radius-project/radius/pull/10775 +* build: bump autorest and typespec by @DariuszPorowski in https://github.com/radius-project/radius/pull/10771 +* Add support for rad deploy using recipepacks by @nithyatsu in https://github.com/radius-project/radius/pull/10747 +* Add kubebuilder instruction to exclude format specifier by @nithyatsu in https://github.com/radius-project/radius/pull/10785 +* Bump bicep-types from `eb75ca1` to `42aa3c3` by @dependabot[bot] in https://github.com/radius-project/radius/pull/10791 +* create RC by @sylvainsf in https://github.com/radius-project/radius/pull/10794 + +**Full Changelog**: https://github.com/radius-project/radius/compare/v0.52.0...v0.53.0 \ No newline at end of file diff --git a/go.mod b/go.mod index 9ff2acaad8..83148c15ad 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ replace github.com/stretchr/testify => github.com/stretchr/testify v1.10.0 replace golang.org/x/tools => golang.org/x/tools v0.23.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0 github.com/Azure/azure-sdk-for-go/sdk/containers/azcontainerregistry v0.2.3 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v2 v2.2.0 @@ -27,30 +27,30 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus/v2 v2.0.0-beta.3 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 github.com/Azure/bicep-types/src/bicep-types-go v0.0.0-00010101000000-000000000000 - github.com/Azure/secrets-store-csi-driver-provider-azure v1.7.1 + github.com/Azure/secrets-store-csi-driver-provider-azure v1.7.2 github.com/Masterminds/semver v1.5.0 github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d github.com/agnivade/levenshtein v1.2.1 - github.com/aws/aws-sdk-go-v2 v1.39.2 - github.com/aws/aws-sdk-go-v2/config v1.31.12 - github.com/aws/aws-sdk-go-v2/credentials v1.18.16 - github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.6 - github.com/aws/aws-sdk-go-v2/service/cloudformation v1.67.0 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.255.0 - github.com/aws/aws-sdk-go-v2/service/ecr v1.50.5 - github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 - github.com/aws/smithy-go v1.23.0 + github.com/aws/aws-sdk-go-v2 v1.39.6 + github.com/aws/aws-sdk-go-v2/config v1.31.17 + github.com/aws/aws-sdk-go-v2/credentials v1.18.21 + github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.29.1 + github.com/aws/aws-sdk-go-v2/service/cloudformation v1.68.3 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.263.0 + github.com/aws/aws-sdk-go-v2/service/ecr v1.51.2 + github.com/aws/aws-sdk-go-v2/service/sts v1.39.1 + github.com/aws/smithy-go v1.23.2 github.com/charmbracelet/bubbles v0.20.0 github.com/charmbracelet/bubbletea v1.3.10 github.com/charmbracelet/lipgloss v1.1.0 - github.com/charmbracelet/x/ansi v0.10.2 - github.com/charmbracelet/x/exp/teatest v0.0.0-20240408110044-525ba71bb562 + github.com/charmbracelet/x/ansi v0.11.1 + github.com/charmbracelet/x/exp/teatest v0.0.0-20251020183722-ee4914f58d13 // Pinned: fixes race condition where FinalModel() can return nil (PR #10742) github.com/dimchansky/utfbom v1.1.1 github.com/fatih/color v1.18.0 github.com/fluxcd/pkg/apis/meta v1.22.0 github.com/fluxcd/pkg/http/fetch v0.20.0 github.com/fluxcd/pkg/tar v0.15.0 - github.com/fluxcd/source-controller/api v1.7.2 + github.com/fluxcd/source-controller/api v1.7.3 github.com/getkin/kin-openapi v0.133.0 github.com/go-chi/chi/v5 v5.2.3 github.com/go-git/go-git/v5 v5.16.3 @@ -88,7 +88,7 @@ require ( github.com/spf13/cobra v1.10.1 github.com/spf13/pflag v1.0.10 github.com/spf13/viper v1.21.0 - github.com/stern/stern v1.33.0 + github.com/stern/stern v1.33.1 github.com/stretchr/testify v1.11.1 github.com/wI2L/jsondiff v0.7.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 @@ -110,12 +110,19 @@ require ( k8s.io/api v0.34.1 k8s.io/apiextensions-apiserver v0.34.1 k8s.io/apimachinery v0.34.1 - k8s.io/cli-runtime v0.34.0 + k8s.io/cli-runtime v0.34.1 k8s.io/client-go v0.34.1 - k8s.io/kubectl v0.34.0 + k8s.io/kubectl v0.34.1 oras.land/oras-go/v2 v2.6.0 - sigs.k8s.io/controller-runtime v0.22.2 + sigs.k8s.io/controller-runtime v0.22.4 sigs.k8s.io/secrets-store-csi-driver v1.5.4 + sigs.k8s.io/yaml v1.6.0 +) + +require ( + github.com/clipperhouse/displaywidth v0.6.0 // indirect + github.com/clipperhouse/stringish v0.1.1 // indirect + github.com/clipperhouse/uax29/v2 v2.3.0 // indirect ) require ( @@ -128,39 +135,79 @@ require ( cloud.google.com/go/monitoring v1.21.2 // indirect cloud.google.com/go/storage v1.49.0 // indirect dario.cat/mergo v1.0.2 // indirect - github.com/42wim/httpsig v1.2.3 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect + github.com/BurntSushi/toml v1.5.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect + github.com/MakeNowJust/heredoc v1.0.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.4.0 + github.com/Masterminds/sprig/v3 v3.3.0 // indirect + github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/ProtonMail/go-crypto v1.1.6 // indirect + github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/atotto/clipboard v0.1.4 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/aymanbagabas/go-udiff v0.3.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/charmbracelet/colorprofile v0.3.2 // indirect - github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/chai2010/gettext-go v1.0.3 // indirect + github.com/charmbracelet/colorprofile v0.3.3 // indirect + github.com/charmbracelet/x/cellbuf v0.0.14 // indirect github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 // indirect - github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/charmbracelet/x/term v0.2.2 // indirect + github.com/cloudflare/circl v1.6.1 // indirect github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect + github.com/containerd/containerd v1.7.29 github.com/containerd/errdefs v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect - github.com/davidmz/go-pageant v1.0.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect + github.com/cyphar/filepath-securejoin v0.4.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/envoyproxy/go-control-plane/envoy v1.32.5-0.20250722125442-5321204dac14 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect + github.com/evanphx/json-patch v5.9.11+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect + github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fluxcd/pkg/apis/acl v0.9.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/go-fed/httpsig v1.1.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.10 // indirect + github.com/go-errors/errors v1.5.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.6.2 // indirect + github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-jose/go-jose/v4 v4.1.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/analysis v0.24.0 // indirect + github.com/go-openapi/jsonreference v0.21.2 // indirect + github.com/go-openapi/swag v0.24.1 // indirect github.com/go-openapi/swag/cmdutils v0.24.0 // indirect github.com/go-openapi/swag/conv v0.25.1 // indirect github.com/go-openapi/swag/fileutils v0.25.1 // indirect @@ -171,128 +218,41 @@ require ( github.com/go-openapi/swag/stringutils v0.25.1 // indirect github.com/go-openapi/swag/typeutils v0.25.1 // indirect github.com/go-openapi/swag/yamlutils v0.25.1 // indirect + github.com/go-openapi/validate v0.25.0 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect github.com/googleapis/gax-go/v2 v2.14.1 // indirect - github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect - github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect - github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect - github.com/jackc/puddle/v2 v2.2.2 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.10 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect - github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect - github.com/opencontainers/go-digest/blake3 v0.0.0-20250116041648-1e56c6daea3b // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect - github.com/pjbgf/sha1cd v0.3.2 // indirect - github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect - github.com/prometheus/otlptranslator v0.0.2 // indirect - github.com/sagikazarmark/locafero v0.11.0 // indirect - github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/skeema/knownhosts v1.3.1 // indirect - github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect - github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect - github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.1 // indirect - github.com/tidwall/sjson v1.2.5 // indirect - github.com/ulikunitz/xz v0.5.15 // indirect - github.com/woodsbury/decimal128 v1.3.0 // indirect - github.com/x448/float16 v0.8.4 // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - github.com/zeebo/blake3 v0.2.4 // indirect - github.com/zeebo/errs v1.4.0 // indirect - go.mongodb.org/mongo-driver v1.17.4 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/tools v0.38.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.215.0 // indirect - gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect -) - -require ( - code.gitea.io/sdk/gitea v0.22.0 - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect - github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect - github.com/BurntSushi/toml v1.5.0 // indirect - github.com/MakeNowJust/heredoc v1.0.0 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.4.0 - github.com/Masterminds/sprig/v3 v3.3.0 // indirect - github.com/Masterminds/squirrel v1.5.4 // indirect - github.com/ProtonMail/go-crypto v1.1.6 // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/aymanbagabas/go-udiff v0.3.1 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chai2010/gettext-go v1.0.3 // indirect - github.com/cloudflare/circl v1.6.1 // indirect - github.com/containerd/containerd v1.7.28 - github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect - github.com/cyphar/filepath-securejoin v0.4.1 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/emicklei/go-restful/v3 v3.13.0 // indirect - github.com/evanphx/json-patch v5.9.11+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.9.11 // indirect - github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.10 // indirect - github.com/go-errors/errors v1.5.1 // indirect - github.com/go-gorp/gorp/v3 v3.1.0 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.24.0 // indirect - github.com/go-openapi/jsonreference v0.21.2 // indirect - github.com/go-openapi/swag v0.24.1 // indirect - github.com/go-openapi/validate v0.25.0 // indirect - github.com/gobwas/glob v0.2.3 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/btree v1.1.3 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gosuri/uitable v0.0.4 // indirect + github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect + github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.8.2 + github.com/hashicorp/go-getter v1.8.3 github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hcl v1.0.1-vault-5 // indirect github.com/hashicorp/hcl/v2 v2.21.0 // indirect - github.com/hashicorp/terraform-json v0.27.1 + github.com/hashicorp/terraform-json v0.27.2 github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect @@ -303,56 +263,94 @@ require ( github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.19 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/spdystream v0.5.0 // indirect github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/termenv v0.16.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect github.com/oklog/ulid v1.3.1 // indirect + github.com/opencontainers/go-digest/blake3 v0.0.0-20250116041648-1e56c6daea3b // indirect github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect + github.com/pjbgf/sha1cd v0.3.2 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/otlptranslator v0.0.2 // indirect github.com/prometheus/procfs v0.17.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rubenv/sql-migrate v1.8.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sahilm/fuzzy v0.1.1 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/skeema/knownhosts v1.3.1 // indirect + github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect + github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/tidwall/gjson v1.18.0 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/sjson v1.2.5 // indirect + github.com/ulikunitz/xz v0.5.15 // indirect + github.com/woodsbury/decimal128 v1.3.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xlab/treeprint v1.2.0 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/zclconf/go-cty v1.16.4 // indirect + github.com/zeebo/blake3 v0.2.4 // indirect + github.com/zeebo/errs v1.4.0 // indirect + go.mongodb.org/mongo-driver v1.17.4 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.43.0 // indirect golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/mod v0.29.0 // indirect golang.org/x/net v0.46.0 // indirect golang.org/x/oauth2 v0.31.0 // indirect - golang.org/x/sys v0.37.0 // indirect + golang.org/x/sys v0.38.0 // indirect golang.org/x/term v0.36.0 // indirect golang.org/x/time v0.12.0 // indirect + golang.org/x/tools v0.38.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect + google.golang.org/api v0.215.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect google.golang.org/grpc v1.75.0 // indirect google.golang.org/protobuf v1.36.8 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect k8s.io/apiserver v0.34.1 // indirect k8s.io/component-base v0.34.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect @@ -361,5 +359,6 @@ require ( sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/kustomize/api v0.20.1 // indirect sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect - sigs.k8s.io/yaml v1.6.0 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect ) diff --git a/go.sum b/go.sum index de1f86291d..dd2a2c8f36 100644 --- a/go.sum +++ b/go.sum @@ -21,18 +21,14 @@ cloud.google.com/go/storage v1.49.0 h1:zenOPBOWHCnojRd9aJZAyQXBYqkJkdQS42dxL55CI cloud.google.com/go/storage v1.49.0/go.mod h1:k1eHhhpLvrPjVGfo0mOUPEJ4Y2+a/Hv5PiwehZI9qGU= cloud.google.com/go/trace v1.11.2 h1:4ZmaBdL8Ng/ajrgKqY5jfvzqMXbrDcBsUGXOT9aqTtI= cloud.google.com/go/trace v1.11.2/go.mod h1:bn7OwXd4pd5rFuAnTrzBuoZ4ax2XQeG3qNgYmfCy0Io= -code.gitea.io/sdk/gitea v0.22.0 h1:HCKq7bX/HQ85Nw7c/HAhWgRye+vBp5nQOE8Md1+9Ef0= -code.gitea.io/sdk/gitea v0.22.0/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM= dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs= -github.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 h1:5YTBM8QDVIBN3sxBil89WfdAAqDZbyJTgh688DSxX5w= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 h1:JXg2dwJUmPB9JmtVmdEB16APJ7jurfbY5jnfXpJoRMc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0 h1:KpMC6LFL7mqpExyMC9jVOYRiVhLmamjeZfRsUpB7l4s= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0/go.mod h1:J7MUC/wtRpfGVbQ5sIItY5/FuVWmvzlY21WAOfQnq/I= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= @@ -65,8 +61,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1/go.mod h1:Ng3urmn6dYe8gnbCMoHHVl5APYz2txho3koEkV2o2HA= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/secrets-store-csi-driver-provider-azure v1.7.1 h1:XkTt+o/XtsGCkeMDxh16iLrBAim4Lwd8NXn8A1GKQJk= -github.com/Azure/secrets-store-csi-driver-provider-azure v1.7.1/go.mod h1:CCWnn0Zrm3LoDOKXv/zKyqN2ZzWe0FOUgqXdBKicNXo= +github.com/Azure/secrets-store-csi-driver-provider-azure v1.7.2 h1:GVtAKa3sOzkHQGgOXiKQSbNf7aKo6eIHq96nmnjrugA= +github.com/Azure/secrets-store-csi-driver-provider-azure v1.7.2/go.mod h1:W7V0fas3icuZl36SZs5YjxYEmDTpVi7gqf4T5k+MoqA= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 h1:XkkQbfMyuH2jTSjQjSoihryI8GINRcs4xp8lNawg0FI= @@ -119,50 +115,50 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I= -github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= +github.com/aws/aws-sdk-go-v2 v1.39.6 h1:2JrPCVgWJm7bm83BDwY5z8ietmeJUbh3O2ACnn+Xsqk= +github.com/aws/aws-sdk-go-v2 v1.39.6/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= -github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8= -github.com/aws/aws-sdk-go-v2/config v1.31.12/go.mod h1:/MM0dyD7KSDPR+39p9ZNVKaHDLb9qnfDurvVS2KAhN8= -github.com/aws/aws-sdk-go-v2/credentials v1.18.16 h1:4JHirI4zp958zC026Sm+V4pSDwW4pwLefKrc0bF2lwI= -github.com/aws/aws-sdk-go-v2/credentials v1.18.16/go.mod h1:qQMtGx9OSw7ty1yLclzLxXCRbrkjWAM7JnObZjmCB7I= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 h1:Mv4Bc0mWmv6oDuSWTKnk+wgeqPL5DRFu5bQL9BGPQ8Y= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9/go.mod h1:IKlKfRppK2a1y0gy1yH6zD+yX5uplJ6UuPlgd48dJiQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 h1:se2vOWGD3dWQUtfn4wEjRQJb1HK1XsNIt825gskZ970= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9/go.mod h1:hijCGH2VfbZQxqCDN7bwz/4dzxV+hkyhjawAtdPWKZA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 h1:6RBnKZLkJM4hQ+kN6E7yWFveOTg8NLPHAkqrs4ZPlTU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9/go.mod h1:V9rQKRmK7AWuEsOMnHzKj8WyrIir1yUJbZxDuZLFvXI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= +github.com/aws/aws-sdk-go-v2/config v1.31.17 h1:QFl8lL6RgakNK86vusim14P2k8BFSxjvUkcWLDjgz9Y= +github.com/aws/aws-sdk-go-v2/config v1.31.17/go.mod h1:V8P7ILjp/Uef/aX8TjGk6OHZN6IKPM5YW6S78QnRD5c= +github.com/aws/aws-sdk-go-v2/credentials v1.18.21 h1:56HGpsgnmD+2/KpG0ikvvR8+3v3COCwaF4r+oWwOeNA= +github.com/aws/aws-sdk-go-v2/credentials v1.18.21/go.mod h1:3YELwedmQbw7cXNaII2Wywd+YY58AmLPwX4LzARgmmA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 h1:T1brd5dR3/fzNFAQch/iBKeX07/ffu/cLu+q+RuzEWk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13/go.mod h1:Peg/GBAQ6JDt+RoBf4meB1wylmAipb7Kg2ZFakZTlwk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 h1:a+8/MLcWlIxo1lF9xaGt3J/u3yOZx+CdSveSNwjhD40= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13/go.mod h1:oGnKwIYZ4XttyU2JWxFrwvhF6YKiK/9/wmE3v3Iu9K8= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 h1:HBSI2kDkMdWz4ZM7FjwE7e/pWDEZ+nR95x8Ztet1ooY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13/go.mod h1:YE94ZoDArI7awZqJzBAZ3PDD2zSfuP7w6P2knOzIn8M= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcuz+RjeziUtNJackkM= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.6 h1:jqP2tyJOEj7qDoLyqyKGnDMAW+Lmi0WwNB2OruNao6w= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.28.6/go.mod h1:GIOHLcWXFDrHSzJJFMNRxLsfA++pOENXO2QVvMT0mJI= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.67.0 h1:dXbv06SZ39MYWL70KgFdMgFl9ZLfHe3AWIiTs0V2LAE= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.67.0/go.mod h1:/q63oDWCyO4xLLRiVYpwufJDwSkL0IbC5epFNJne8JQ= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.255.0 h1:itmZc+F4yGJdk5mjIfalFjHu6kqz9jRSYtsnnRLjulQ= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.255.0/go.mod h1:M8WWWIfXmxA4RgTXcI/5cSByxRqjgne32Sh0VIbrn0A= -github.com/aws/aws-sdk-go-v2/service/ecr v1.50.5 h1:jzjNyiIrXJHumV1hwofcQLpIZtcDw+vPQL00rLI3s4g= -github.com/aws/aws-sdk-go-v2/service/ecr v1.50.5/go.mod h1:UtPKcYVHY6RrV9EaaM1KZGNaf9dgviFdsT6xoFMLQsM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.29.1 h1:JdROcIIy8NsG5yoAZgr8zya8khelwZEkiQhC+2qwnLM= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.29.1/go.mod h1:6kx+wmHMUP1fQBUpXN2N9xRt2sQUlloxwyF5cMIvDOc= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.68.3 h1:H4jVDatTYCt6WSG7oC0dlZl8kfKHT2anADHQiQI1HVo= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.68.3/go.mod h1:llucikq1Q6I1Ps8rNV3St0bOY5RQMxYh1lpCaskyhPw= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.263.0 h1:xABL6ywlOAG90hMm9mD0OxTMGZ6SoL5S281h4vqnuFE= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.263.0/go.mod h1:NDdDLLW5PtLLXN661gKcvJvqAH5OBXsfhMlmKVu1/pY= +github.com/aws/aws-sdk-go-v2/service/ecr v1.51.2 h1:aq2N/9UkbEyljIQ7OFcudEgUsJzO8MYucmfsM/k/dmc= +github.com/aws/aws-sdk-go-v2/service/ecr v1.51.2/go.mod h1:1NVD1KuMjH2GqnPwMotPndQaT/MreKkWpjkF12d6oKU= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 h1:x2Ibm/Af8Fi+BH+Hsn9TXGdT+hKbDd5XOTZxTMxDk7o= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3/go.mod h1:IW1jwyrQgMdhisceG8fQLmQIydcT/jWY21rFhzgaKwo= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 h1:BCG7DCXEXpNCcpwCxg1oi9pkJWH2+eZzTn9MY56MbVw= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD4WZudeEKZ9/iKpiT6cM1JyEROpXjOcdWv8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 h1:kDqdFvMY4AtKoACfzIGD8A0+hbT41KTKF//gq7jITfM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13/go.mod h1:lmKuogqSU3HzQCwZ9ZtcqOc5XGMqtDK7OIc2+DxiUEg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1 h1:xYEAf/6QHiTZDccKnPMbsMwlau13GsDsTgdue3wmHGw= github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1/go.mod h1:qbn305Je/IofWBJ4bJz/Q7pDEtnnoInw/dGt71v6rHE= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.6/go.mod h1:5PfYspyCU5Vw1wNPsxi15LZovOnULudOQuVxphSflQA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7UT9RpFH3hR6HWL6bIgVY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1/go.mod h1:xBEjWD13h+6nq+z4AkqSfSvqRKFgDIQeaMguAJndOWo= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47hZb5HUQ0tn6Q9kA= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.6/go.mod h1:WtKK+ppze5yKPkZ0XwqIVWD4beCwv056ZbPQNoeHqM8= -github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= -github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.1 h1:0JPwLz1J+5lEOfy/g0SURC9cxhbQ1lIMHMa+AHZSzz0= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.1/go.mod h1:fKvyjJcz63iL/ftA6RaM8sRCtN4r4zl4tjL3qw5ec7k= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5 h1:OWs0/j2UYR5LOGi88sD5/lhN6TDLG6SfA7CqsQO9zF0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5/go.mod h1:klO+ejMvYsB4QATfEOIXk8WAEwN4N0aBfJpvC+5SZBo= +github.com/aws/aws-sdk-go-v2/service/sts v1.39.1 h1:mLlUgHn02ue8whiR4BmxxGJLR2gwU6s6ZzJ5wDamBUs= +github.com/aws/aws-sdk-go-v2/service/sts v1.39.1/go.mod h1:E19xDjpzPZC7LS2knI9E6BaRFDK43Eul7vd6rSq2HWk= +github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM= +github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY= @@ -186,28 +182,34 @@ github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQW github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU= github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= -github.com/charmbracelet/colorprofile v0.3.2 h1:9J27WdztfJQVAQKX2WOlSSRB+5gaKqqITmrvb1uTIiI= -github.com/charmbracelet/colorprofile v0.3.2/go.mod h1:mTD5XzNeWHj8oqHb+S1bssQb7vIHbepiebQ2kPKVKbI= +github.com/charmbracelet/colorprofile v0.3.3 h1:DjJzJtLP6/NZ8p7Cgjno0CKGr7wwRJGxWUwh2IyhfAI= +github.com/charmbracelet/colorprofile v0.3.3/go.mod h1:nB1FugsAbzq284eJcjfah2nhdSLppN2NqvfotkfRYP4= github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= -github.com/charmbracelet/x/ansi v0.10.2 h1:ith2ArZS0CJG30cIUfID1LXN7ZFXRCww6RUvAPA+Pzw= -github.com/charmbracelet/x/ansi v0.10.2/go.mod h1:HbLdJjQH4UH4AqA2HpRWuWNluRE6zxJH/yteYEYCFa8= -github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= -github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/charmbracelet/x/ansi v0.11.1 h1:iXAC8SyMQDJgtcz9Jnw+HU8WMEctHzoTAETIeA3JXMk= +github.com/charmbracelet/x/ansi v0.11.1/go.mod h1:M49wjzpIujwPceJ+t5w3qh2i87+HRtHohgb5iTyepL0= +github.com/charmbracelet/x/cellbuf v0.0.14 h1:iUEMryGyFTelKW3THW4+FfPgi4fkmKnnaLOXuc+/Kj4= +github.com/charmbracelet/x/cellbuf v0.0.14/go.mod h1:P447lJl49ywBbil/KjCk2HexGh4tEY9LH0/1QrZZ9rA= github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ= github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= -github.com/charmbracelet/x/exp/teatest v0.0.0-20240408110044-525ba71bb562 h1:8ePTYvWHJvthAosOpbQ6LO3Oxn/eWl8QZ9s5OTF1jdU= -github.com/charmbracelet/x/exp/teatest v0.0.0-20240408110044-525ba71bb562/go.mod h1:0SMV+i+eNGuC1HCylD8oWbDA27tTtIP3kllV0GJFHUA= -github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= -github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/charmbracelet/x/exp/teatest v0.0.0-20251020183722-ee4914f58d13 h1:YTU1/9mxy7mXwXj3TDgIzGyob30Wcf8MyxISLns+eP8= +github.com/charmbracelet/x/exp/teatest v0.0.0-20251020183722-ee4914f58d13/go.mod h1:aPVjFrBwbJgj5Qz1F0IXsnbcOVJcMKgu1ySUfTAxh7k= +github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= +github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/clipperhouse/displaywidth v0.6.0 h1:k32vueaksef9WIKCNcoqRNyKbyvkvkysNYnAWz2fN4s= +github.com/clipperhouse/displaywidth v0.6.0/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o= +github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs= +github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA= +github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4= +github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= -github.com/containerd/containerd v1.7.28 h1:Nsgm1AtcmEh4AHAJ4gGlNSaKgXiNccU270Dnf81FQ3c= -github.com/containerd/containerd v1.7.28/go.mod h1:azUkWcOvHrWvaiUjSQH0fjzuHIwSPg1WL5PshGP4Szs= +github.com/containerd/containerd v1.7.29 h1:90fWABQsaN9mJhGkoVnuzEY+o1XDPbg9BTC9QTAHnuE= +github.com/containerd/containerd v1.7.29/go.mod h1:azUkWcOvHrWvaiUjSQH0fjzuHIwSPg1WL5PshGP4Szs= github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -225,8 +227,6 @@ github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGL github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0= -github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo= @@ -285,8 +285,8 @@ github.com/fluxcd/pkg/tar v0.15.0 h1:xoMLngTahZ0/j3CgM/9sLw1F0PkDwiZCRbu6hYxx0Gw github.com/fluxcd/pkg/tar v0.15.0/go.mod h1:54zTMvJG+aWdoLcuhD2plTVODgxl5/w+mnoDVCcU34Y= github.com/fluxcd/pkg/testserver v0.13.0 h1:xEpBcEYtD7bwvZ+i0ZmChxKkDo/wfQEV3xmnzVybSSg= github.com/fluxcd/pkg/testserver v0.13.0/go.mod h1:akRYv3FLQUsme15na9ihECRG6hBuqni4XEY9W8kzs8E= -github.com/fluxcd/source-controller/api v1.7.2 h1:/lg/xoyRjxwdhHKqjTxQS2o1cp+DMKJ8W4rpm+ZLemQ= -github.com/fluxcd/source-controller/api v1.7.2/go.mod h1:2JtCeUVpl0aqKImS19jUz9EEnMdzgqNWHkllrIhV004= +github.com/fluxcd/source-controller/api v1.7.3 h1:JCDbaJqAbQtjCt3Ijsm/6nZf+SZiby3/R6lVZ1gDllE= +github.com/fluxcd/source-controller/api v1.7.3/go.mod h1:2JtCeUVpl0aqKImS19jUz9EEnMdzgqNWHkllrIhV004= github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -305,8 +305,6 @@ github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= -github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= @@ -465,8 +463,8 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.8.2 h1:CGCK+bZQLl44PYiwJweVzfpjg7bBwtuXu3AGcLiod2o= -github.com/hashicorp/go-getter v1.8.2/go.mod h1:CUTt9x2bCtJ/sV8ihgrITL3IUE+0BE1j/e4n5P/GIM4= +github.com/hashicorp/go-getter v1.8.3 h1:gIS+oTNv3kyYAvlUVgMR46MiG0bM0KuSON/KZEvRoRg= +github.com/hashicorp/go-getter v1.8.3/go.mod h1:CUTt9x2bCtJ/sV8ihgrITL3IUE+0BE1j/e4n5P/GIM4= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -489,8 +487,8 @@ github.com/hashicorp/terraform-config-inspect v0.0.0-20240607080351-271db412dbcb github.com/hashicorp/terraform-config-inspect v0.0.0-20240607080351-271db412dbcb/go.mod h1:Gz/z9Hbn+4KSp8A2FBtNszfLSdT2Tn/uAKGuVqqWmDI= github.com/hashicorp/terraform-exec v0.24.0 h1:mL0xlk9H5g2bn0pPF6JQZk5YlByqSqrO5VoaNtAf8OE= github.com/hashicorp/terraform-exec v0.24.0/go.mod h1:lluc/rDYfAhYdslLJQg3J0oDqo88oGQAdHR+wDqFvo4= -github.com/hashicorp/terraform-json v0.27.1 h1:zWhEracxJW6lcjt/JvximOYyc12pS/gaKSy/wzzE7nY= -github.com/hashicorp/terraform-json v0.27.1/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= +github.com/hashicorp/terraform-json v0.27.2 h1:BwGuzM6iUPqf9JYM/Z4AF1OJ5VVJEEzoKST/tRDBJKU= +github.com/hashicorp/terraform-json v0.27.2/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -550,8 +548,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= -github.com/mattn/go-runewidth v0.0.17 h1:78v8ZlW0bP43XfmAfPsdXcoNCelfMHsDmd/pkENfrjQ= -github.com/mattn/go-runewidth v0.0.17/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= +github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/miekg/dns v1.1.65 h1:0+tIPHzUW0GCge7IiK3guGP57VAw7hoPDfApjkMD1Fc= @@ -651,7 +649,6 @@ github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 h1:EfpWLLCyXw8PSM2/XNJLjI3Pb github.com/redis/go-redis/extra/redisotel/v9 v9.0.5/go.mod h1:WZjPDy7VNzn77AAfnAfVjZNvfJTYfPetfZk5yoSTLaQ= github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= @@ -692,8 +689,8 @@ github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= -github.com/stern/stern v1.33.0 h1:iIXPmWW1Z6wgyKKxG7MJ8FrtGDZCnJDMBzi4Q/kExSo= -github.com/stern/stern v1.33.0/go.mod h1:LXYqd4g9LEHio/9GVqY+koo/vhtx9YnQL7M+Oi4Q5pM= +github.com/stern/stern v1.33.1 h1:kb02cxi/+oxxAM93xTfeHKqLrkXQKfMWje96HJdiRPA= +github.com/stern/stern v1.33.1/go.mod h1:LXYqd4g9LEHio/9GVqY+koo/vhtx9YnQL7M+Oi4Q5pM= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= @@ -815,7 +812,6 @@ go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= @@ -836,7 +832,6 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= @@ -870,8 +865,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= -golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= @@ -952,8 +947,8 @@ k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA= k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0= -k8s.io/cli-runtime v0.34.0 h1:N2/rUlJg6TMEBgtQ3SDRJwa8XyKUizwjlOknT1mB2Cw= -k8s.io/cli-runtime v0.34.0/go.mod h1:t/skRecS73Piv+J+FmWIQA2N2/rDjdYSQzEE67LUUs8= +k8s.io/cli-runtime v0.34.1 h1:btlgAgTrYd4sk8vJTRG6zVtqBKt9ZMDeQZo2PIzbL7M= +k8s.io/cli-runtime v0.34.1/go.mod h1:aVA65c+f0MZiMUPbseU/M9l1Wo2byeaGwUuQEQVVveE= k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY= k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8= k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A= @@ -962,14 +957,14 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250905212525-66792eed8611 h1:o4oKOsvSymDkZRsMAPZU7bRdwL+lPOK5VS10Dr1D6eg= k8s.io/kube-openapi v0.0.0-20250905212525-66792eed8611/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= -k8s.io/kubectl v0.34.0 h1:NcXz4TPTaUwhiX4LU+6r6udrlm0NsVnSkP3R9t0dmxs= -k8s.io/kubectl v0.34.0/go.mod h1:bmd0W5i+HuG7/p5sqicr0Li0rR2iIhXL0oUyLF3OjR4= +k8s.io/kubectl v0.34.1 h1:1qP1oqT5Xc93K+H8J7ecpBjaz511gan89KO9Vbsh/OI= +k8s.io/kubectl v0.34.1/go.mod h1:JRYlhJpGPyk3dEmJ+BuBiOB9/dAvnrALJEiY/C5qa6A= k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= -sigs.k8s.io/controller-runtime v0.22.2 h1:cK2l8BGWsSWkXz09tcS4rJh95iOLney5eawcK5A33r4= -sigs.k8s.io/controller-runtime v0.22.2/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= +sigs.k8s.io/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A= +sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= diff --git a/hack/bicep-types-radius/generated/index.json b/hack/bicep-types-radius/generated/index.json index 20fc1e0464..ce8975f362 100644 --- a/hack/bicep-types-radius/generated/index.json +++ b/hack/bicep-types-radius/generated/index.json @@ -44,6 +44,15 @@ }, "Applications.Messaging/rabbitMQQueues@2023-10-01-preview": { "$ref": "applications/applications.messaging/2023-10-01-preview/types.json#/55" + }, + "Radius.Core/applications@2025-08-01-preview": { + "$ref": "radius/radius.core/2025-08-01-preview/types.json#/44" + }, + "Radius.Core/environments@2025-08-01-preview": { + "$ref": "radius/radius.core/2025-08-01-preview/types.json#/64" + }, + "Radius.Core/recipePacks@2025-08-01-preview": { + "$ref": "radius/radius.core/2025-08-01-preview/types.json#/87" } }, "resourceFunctions": {}, diff --git a/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json b/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json new file mode 100644 index 0000000000..5594669aee --- /dev/null +++ b/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json @@ -0,0 +1,1063 @@ +[ + { + "$type": "StringType" + }, + { + "$type": "StringLiteralType", + "value": "Radius.Core/applications" + }, + { + "$type": "StringLiteralType", + "value": "2025-08-01-preview" + }, + { + "$type": "ObjectType", + "name": "Radius.Core/applications", + "properties": { + "id": { + "type": { + "$ref": "#/0" + }, + "flags": 10, + "description": "The resource id" + }, + "name": { + "type": { + "$ref": "#/0" + }, + "flags": 25, + "description": "The resource name" + }, + "type": { + "type": { + "$ref": "#/1" + }, + "flags": 10, + "description": "The resource type" + }, + "apiVersion": { + "type": { + "$ref": "#/2" + }, + "flags": 10, + "description": "The resource api version" + }, + "properties": { + "type": { + "$ref": "#/4" + }, + "flags": 1, + "description": "Application properties" + }, + "tags": { + "type": { + "$ref": "#/32" + }, + "flags": 0, + "description": "Resource tags." + }, + "location": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The geo-location where the resource lives" + }, + "systemData": { + "type": { + "$ref": "#/33" + }, + "flags": 2, + "description": "Metadata pertaining to creation and last modification of the resource." + } + } + }, + { + "$type": "ObjectType", + "name": "ApplicationProperties", + "properties": { + "provisioningState": { + "type": { + "$ref": "#/13" + }, + "flags": 2, + "description": "Provisioning state of the resource at the time the operation was called" + }, + "environment": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "Fully qualified resource ID for the environment that the application is linked to" + }, + "status": { + "type": { + "$ref": "#/14" + }, + "flags": 2, + "description": "Status of a resource." + } + } + }, + { + "$type": "StringLiteralType", + "value": "Creating" + }, + { + "$type": "StringLiteralType", + "value": "Updating" + }, + { + "$type": "StringLiteralType", + "value": "Deleting" + }, + { + "$type": "StringLiteralType", + "value": "Accepted" + }, + { + "$type": "StringLiteralType", + "value": "Provisioning" + }, + { + "$type": "StringLiteralType", + "value": "Succeeded" + }, + { + "$type": "StringLiteralType", + "value": "Failed" + }, + { + "$type": "StringLiteralType", + "value": "Canceled" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/5" + }, + { + "$ref": "#/6" + }, + { + "$ref": "#/7" + }, + { + "$ref": "#/8" + }, + { + "$ref": "#/9" + }, + { + "$ref": "#/10" + }, + { + "$ref": "#/11" + }, + { + "$ref": "#/12" + } + ] + }, + { + "$type": "ObjectType", + "name": "ResourceStatus", + "properties": { + "compute": { + "type": { + "$ref": "#/15" + }, + "flags": 0, + "description": "Represents backing compute resource" + }, + "recipe": { + "type": { + "$ref": "#/28" + }, + "flags": 2, + "description": "Recipe status at deployment time for a resource." + }, + "outputResources": { + "type": { + "$ref": "#/31" + }, + "flags": 0, + "description": "Properties of an output resource" + } + } + }, + { + "$type": "DiscriminatedObjectType", + "name": "EnvironmentCompute", + "discriminator": "kind", + "baseProperties": { + "resourceId": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The resource id of the compute resource for application environment." + }, + "identity": { + "type": { + "$ref": "#/16" + }, + "flags": 0, + "description": "IdentitySettings is the external identity setting." + } + }, + "elements": { + "aci": { + "$ref": "#/24" + }, + "kubernetes": { + "$ref": "#/26" + } + } + }, + { + "$type": "ObjectType", + "name": "IdentitySettings", + "properties": { + "kind": { + "type": { + "$ref": "#/22" + }, + "flags": 1, + "description": "IdentitySettingKind is the kind of supported external identity setting" + }, + "oidcIssuer": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The URI for your compute platform's OIDC issuer" + }, + "resource": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The resource ID of the provisioned identity" + }, + "managedIdentity": { + "type": { + "$ref": "#/23" + }, + "flags": 0, + "description": "The list of user assigned managed identities" + } + } + }, + { + "$type": "StringLiteralType", + "value": "undefined" + }, + { + "$type": "StringLiteralType", + "value": "azure.com.workload" + }, + { + "$type": "StringLiteralType", + "value": "userAssigned" + }, + { + "$type": "StringLiteralType", + "value": "systemAssigned" + }, + { + "$type": "StringLiteralType", + "value": "systemAssignedUserAssigned" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/17" + }, + { + "$ref": "#/18" + }, + { + "$ref": "#/19" + }, + { + "$ref": "#/20" + }, + { + "$ref": "#/21" + } + ] + }, + { + "$type": "ArrayType", + "itemType": { + "$ref": "#/0" + } + }, + { + "$type": "ObjectType", + "name": "AzureContainerInstanceCompute", + "properties": { + "resourceGroup": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The resource group to use for the environment." + }, + "kind": { + "type": { + "$ref": "#/25" + }, + "flags": 1, + "description": "Discriminator property for EnvironmentCompute." + } + } + }, + { + "$type": "StringLiteralType", + "value": "aci" + }, + { + "$type": "ObjectType", + "name": "KubernetesCompute", + "properties": { + "namespace": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "The namespace to use for the environment." + }, + "kind": { + "type": { + "$ref": "#/27" + }, + "flags": 1, + "description": "Discriminator property for EnvironmentCompute." + } + } + }, + { + "$type": "StringLiteralType", + "value": "kubernetes" + }, + { + "$type": "ObjectType", + "name": "RecipeStatus", + "properties": { + "templateKind": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "TemplateKind is the kind of the recipe template used by the portable resource upon deployment." + }, + "templatePath": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "TemplatePath is the path of the recipe consumed by the portable resource upon deployment." + }, + "templateVersion": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "TemplateVersion is the version number of the template." + } + } + }, + { + "$type": "ObjectType", + "name": "OutputResource", + "properties": { + "localId": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency relationship. LocalIDs do not have any particular format or meaning beyond being compared to determine dependency relationships." + }, + "id": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The UCP resource ID of the underlying resource." + }, + "radiusManaged": { + "type": { + "$ref": "#/30" + }, + "flags": 0, + "description": "Determines whether Radius manages the lifecycle of the underlying resource." + } + } + }, + { + "$type": "BooleanType" + }, + { + "$type": "ArrayType", + "itemType": { + "$ref": "#/29" + } + }, + { + "$type": "ObjectType", + "name": "TrackedResourceTags", + "properties": {}, + "additionalProperties": { + "$ref": "#/0" + } + }, + { + "$type": "ObjectType", + "name": "SystemData", + "properties": { + "createdBy": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The identity that created the resource." + }, + "createdByType": { + "type": { + "$ref": "#/38" + }, + "flags": 0, + "description": "The type of identity that created the resource." + }, + "createdAt": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": { + "$ref": "#/43" + }, + "flags": 0, + "description": "The type of identity that created the resource." + }, + "lastModifiedAt": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + { + "$type": "StringLiteralType", + "value": "User" + }, + { + "$type": "StringLiteralType", + "value": "Application" + }, + { + "$type": "StringLiteralType", + "value": "ManagedIdentity" + }, + { + "$type": "StringLiteralType", + "value": "Key" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/34" + }, + { + "$ref": "#/35" + }, + { + "$ref": "#/36" + }, + { + "$ref": "#/37" + } + ] + }, + { + "$type": "StringLiteralType", + "value": "User" + }, + { + "$type": "StringLiteralType", + "value": "Application" + }, + { + "$type": "StringLiteralType", + "value": "ManagedIdentity" + }, + { + "$type": "StringLiteralType", + "value": "Key" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/39" + }, + { + "$ref": "#/40" + }, + { + "$ref": "#/41" + }, + { + "$ref": "#/42" + } + ] + }, + { + "$type": "ResourceType", + "name": "Radius.Core/applications@2025-08-01-preview", + "body": { + "$ref": "#/3" + }, + "readableScopes": 0, + "writableScopes": 0, + "functions": {} + }, + { + "$type": "StringLiteralType", + "value": "Radius.Core/environments" + }, + { + "$type": "StringLiteralType", + "value": "2025-08-01-preview" + }, + { + "$type": "ObjectType", + "name": "Radius.Core/environments", + "properties": { + "id": { + "type": { + "$ref": "#/0" + }, + "flags": 10, + "description": "The resource id" + }, + "name": { + "type": { + "$ref": "#/0" + }, + "flags": 25, + "description": "The resource name" + }, + "type": { + "type": { + "$ref": "#/45" + }, + "flags": 10, + "description": "The resource type" + }, + "apiVersion": { + "type": { + "$ref": "#/46" + }, + "flags": 10, + "description": "The resource api version" + }, + "properties": { + "type": { + "$ref": "#/48" + }, + "flags": 1, + "description": "Environment properties" + }, + "tags": { + "type": { + "$ref": "#/63" + }, + "flags": 0, + "description": "Resource tags." + }, + "location": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The geo-location where the resource lives" + }, + "systemData": { + "type": { + "$ref": "#/33" + }, + "flags": 2, + "description": "Metadata pertaining to creation and last modification of the resource." + } + } + }, + { + "$type": "ObjectType", + "name": "EnvironmentProperties", + "properties": { + "provisioningState": { + "type": { + "$ref": "#/57" + }, + "flags": 2, + "description": "Provisioning state of the resource at the time the operation was called" + }, + "recipePacks": { + "type": { + "$ref": "#/58" + }, + "flags": 0, + "description": "List of Recipe Pack resource IDs linked to this environment." + }, + "providers": { + "type": { + "$ref": "#/59" + }, + "flags": 0 + }, + "simulated": { + "type": { + "$ref": "#/30" + }, + "flags": 0, + "description": "Simulated environment." + } + } + }, + { + "$type": "StringLiteralType", + "value": "Creating" + }, + { + "$type": "StringLiteralType", + "value": "Updating" + }, + { + "$type": "StringLiteralType", + "value": "Deleting" + }, + { + "$type": "StringLiteralType", + "value": "Accepted" + }, + { + "$type": "StringLiteralType", + "value": "Provisioning" + }, + { + "$type": "StringLiteralType", + "value": "Succeeded" + }, + { + "$type": "StringLiteralType", + "value": "Failed" + }, + { + "$type": "StringLiteralType", + "value": "Canceled" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/49" + }, + { + "$ref": "#/50" + }, + { + "$ref": "#/51" + }, + { + "$ref": "#/52" + }, + { + "$ref": "#/53" + }, + { + "$ref": "#/54" + }, + { + "$ref": "#/55" + }, + { + "$ref": "#/56" + } + ] + }, + { + "$type": "ArrayType", + "itemType": { + "$ref": "#/0" + } + }, + { + "$type": "ObjectType", + "name": "Providers", + "properties": { + "azure": { + "type": { + "$ref": "#/60" + }, + "flags": 0, + "description": "The Azure cloud provider definition." + }, + "kubernetes": { + "type": { + "$ref": "#/61" + }, + "flags": 0 + }, + "aws": { + "type": { + "$ref": "#/62" + }, + "flags": 0, + "description": "The AWS cloud provider definition." + } + } + }, + { + "$type": "ObjectType", + "name": "ProvidersAzure", + "properties": { + "subscriptionId": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "Azure subscription ID hosting deployed resources." + }, + "resourceGroupName": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "Optional resource group name." + }, + "identity": { + "type": { + "$ref": "#/16" + }, + "flags": 0, + "description": "IdentitySettings is the external identity setting." + } + } + }, + { + "$type": "ObjectType", + "name": "ProvidersKubernetes", + "properties": { + "namespace": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "Kubernetes namespace to deploy workloads into." + } + } + }, + { + "$type": "ObjectType", + "name": "ProvidersAws", + "properties": { + "scope": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'." + } + } + }, + { + "$type": "ObjectType", + "name": "TrackedResourceTags", + "properties": {}, + "additionalProperties": { + "$ref": "#/0" + } + }, + { + "$type": "ResourceType", + "name": "Radius.Core/environments@2025-08-01-preview", + "body": { + "$ref": "#/47" + }, + "readableScopes": 0, + "writableScopes": 0, + "functions": {} + }, + { + "$type": "StringLiteralType", + "value": "Radius.Core/recipePacks" + }, + { + "$type": "StringLiteralType", + "value": "2025-08-01-preview" + }, + { + "$type": "ObjectType", + "name": "Radius.Core/recipePacks", + "properties": { + "id": { + "type": { + "$ref": "#/0" + }, + "flags": 10, + "description": "The resource id" + }, + "name": { + "type": { + "$ref": "#/0" + }, + "flags": 25, + "description": "The resource name" + }, + "type": { + "type": { + "$ref": "#/65" + }, + "flags": 10, + "description": "The resource type" + }, + "apiVersion": { + "type": { + "$ref": "#/66" + }, + "flags": 10, + "description": "The resource api version" + }, + "properties": { + "type": { + "$ref": "#/68" + }, + "flags": 1, + "description": "Recipe Pack properties" + }, + "tags": { + "type": { + "$ref": "#/86" + }, + "flags": 0, + "description": "Resource tags." + }, + "location": { + "type": { + "$ref": "#/0" + }, + "flags": 0, + "description": "The geo-location where the resource lives" + }, + "systemData": { + "type": { + "$ref": "#/33" + }, + "flags": 2, + "description": "Metadata pertaining to creation and last modification of the resource." + } + } + }, + { + "$type": "ObjectType", + "name": "RecipePackProperties", + "properties": { + "provisioningState": { + "type": { + "$ref": "#/77" + }, + "flags": 2, + "description": "Provisioning state of the resource at the time the operation was called" + }, + "referencedBy": { + "type": { + "$ref": "#/78" + }, + "flags": 2, + "description": "List of environment IDs that reference this recipe pack" + }, + "recipes": { + "type": { + "$ref": "#/85" + }, + "flags": 1, + "description": "Map of resource types to their recipe configurations" + } + } + }, + { + "$type": "StringLiteralType", + "value": "Creating" + }, + { + "$type": "StringLiteralType", + "value": "Updating" + }, + { + "$type": "StringLiteralType", + "value": "Deleting" + }, + { + "$type": "StringLiteralType", + "value": "Accepted" + }, + { + "$type": "StringLiteralType", + "value": "Provisioning" + }, + { + "$type": "StringLiteralType", + "value": "Succeeded" + }, + { + "$type": "StringLiteralType", + "value": "Failed" + }, + { + "$type": "StringLiteralType", + "value": "Canceled" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/69" + }, + { + "$ref": "#/70" + }, + { + "$ref": "#/71" + }, + { + "$ref": "#/72" + }, + { + "$ref": "#/73" + }, + { + "$ref": "#/74" + }, + { + "$ref": "#/75" + }, + { + "$ref": "#/76" + } + ] + }, + { + "$type": "ArrayType", + "itemType": { + "$ref": "#/0" + } + }, + { + "$type": "ObjectType", + "name": "RecipeDefinition", + "properties": { + "recipeKind": { + "type": { + "$ref": "#/82" + }, + "flags": 1, + "description": "The type of recipe" + }, + "plainHttp": { + "type": { + "$ref": "#/30" + }, + "flags": 0, + "description": "Connect to the location using HTTP (not HTTPS). This should be used when the location is known not to support HTTPS, for example in a locally hosted registry for Bicep recipes. Defaults to false (use HTTPS/TLS)" + }, + "recipeLocation": { + "type": { + "$ref": "#/0" + }, + "flags": 1, + "description": "URL path to the recipe" + }, + "parameters": { + "type": { + "$ref": "#/84" + }, + "flags": 0, + "description": "Parameters to pass to the recipe" + } + } + }, + { + "$type": "StringLiteralType", + "value": "terraform" + }, + { + "$type": "StringLiteralType", + "value": "bicep" + }, + { + "$type": "UnionType", + "elements": [ + { + "$ref": "#/80" + }, + { + "$ref": "#/81" + } + ] + }, + { + "$type": "AnyType" + }, + { + "$type": "ObjectType", + "name": "RecipeDefinitionParameters", + "properties": {}, + "additionalProperties": { + "$ref": "#/83" + } + }, + { + "$type": "ObjectType", + "name": "RecipePackPropertiesRecipes", + "properties": {}, + "additionalProperties": { + "$ref": "#/79" + } + }, + { + "$type": "ObjectType", + "name": "TrackedResourceTags", + "properties": {}, + "additionalProperties": { + "$ref": "#/0" + } + }, + { + "$type": "ResourceType", + "name": "Radius.Core/recipePacks@2025-08-01-preview", + "body": { + "$ref": "#/67" + }, + "readableScopes": 0, + "writableScopes": 0, + "functions": {} + } +] \ No newline at end of file diff --git a/hack/bicep-types-radius/src/autorest.bicep/package-lock.json b/hack/bicep-types-radius/src/autorest.bicep/package-lock.json index 195c4fa06e..4e6398bc2b 100644 --- a/hack/bicep-types-radius/src/autorest.bicep/package-lock.json +++ b/hack/bicep-types-radius/src/autorest.bicep/package-lock.json @@ -37,7 +37,7 @@ "license": "MIT", "devDependencies": { "@types/jest": "^29.0.3", - "@types/node": "^22.0.0", + "@types/node": "^24.0.13", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "eslint": "^8.23.1", @@ -817,9 +817,9 @@ } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -875,9 +875,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -1025,9 +1025,9 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -2155,9 +2155,9 @@ "link": true }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2544,9 +2544,9 @@ } }, "node_modules/dir-compare/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -2775,9 +2775,9 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -3221,9 +3221,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -3573,9 +3573,9 @@ } }, "node_modules/jake/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -4187,9 +4187,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -5206,9 +5206,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/hack/bicep-types-radius/src/generator/package-lock.json b/hack/bicep-types-radius/src/generator/package-lock.json index 3fb2ba9e96..03a70e1278 100644 --- a/hack/bicep-types-radius/src/generator/package-lock.json +++ b/hack/bicep-types-radius/src/generator/package-lock.json @@ -26,7 +26,7 @@ "colors": "^1.4.0", "eslint": "^9.12.0", "eslint-plugin-header": "^3.1.1", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "lodash": "^4.17.21", "ts-node": "^10.9.2", "typescript": "^5.6.3", @@ -39,7 +39,7 @@ "license": "MIT", "devDependencies": { "@types/jest": "^29.0.3", - "@types/node": "^22.0.0", + "@types/node": "^24.0.13", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "eslint": "^8.23.1", @@ -1918,9 +1918,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/hack/bicep-types-radius/src/generator/package.json b/hack/bicep-types-radius/src/generator/package.json index 2bf78cd95d..36b8c90fc8 100644 --- a/hack/bicep-types-radius/src/generator/package.json +++ b/hack/bicep-types-radius/src/generator/package.json @@ -41,7 +41,7 @@ "colors": "^1.4.0", "eslint": "^9.12.0", "eslint-plugin-header": "^3.1.1", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "lodash": "^4.17.21", "ts-node": "^10.9.2", "typescript": "^5.6.3", diff --git a/pkg/cli/clients/clients.go b/pkg/cli/clients/clients.go index ac0cc3c1f9..4bf2d039cc 100644 --- a/pkg/cli/clients/clients.go +++ b/pkg/cli/clients/clients.go @@ -23,6 +23,7 @@ import ( "github.com/radius-project/radius/pkg/cli/clients_new/generated" corerp "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + radiuscore "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" ucp_v20231001preview "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" ucpresources "github.com/radius-project/radius/pkg/ucp/resources" ) @@ -201,6 +202,18 @@ type ApplicationsManagementClient interface { // ListEnvironmentsAll lists all environments across resource groups. ListEnvironmentsAll(ctx context.Context) ([]corerp.EnvironmentResource, error) + // ListRecipePacksInResourceGroup lists all recipe packs in the configured scope (assumes configured scope is a resource group). + ListRecipePacksInResourceGroup(ctx context.Context) ([]radiuscore.RecipePackResource, error) + + // ListRecipePacks lists all recipe packs in all resource groups. + ListRecipePacks(ctx context.Context) ([]radiuscore.RecipePackResource, error) + + // GetRecipePack retrieves a recipe pack by its name (in the configured scope) or resource ID. + GetRecipePack(ctx context.Context, recipePackNameOrID string) (radiuscore.RecipePackResource, error) + + // DeleteRecipePack deletes a recipe pack by its name (in the configured scope) or resource ID. + DeleteRecipePack(ctx context.Context, recipePackNameOrID string) (bool, error) + // GetEnvironment retrieves an environment by its name (in the configured scope) or resource ID. GetEnvironment(ctx context.Context, environmentNameOrID string) (corerp.EnvironmentResource, error) diff --git a/pkg/cli/clients/management.go b/pkg/cli/clients/management.go index 8067773ba5..16f9281930 100644 --- a/pkg/cli/clients/management.go +++ b/pkg/cli/clients/management.go @@ -32,6 +32,7 @@ import ( aztoken "github.com/radius-project/radius/pkg/azure/tokencredentials" "github.com/radius-project/radius/pkg/cli/clients_new/generated" corerpv20231001 "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + corerpv20250801 "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" ucpv20231001 "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" "github.com/radius-project/radius/pkg/ucp/resources" resources_radius "github.com/radius-project/radius/pkg/ucp/resources/radius" @@ -43,6 +44,7 @@ type UCPApplicationsManagementClient struct { genericResourceClientFactory func(scope string, resourceType string) (genericResourceClient, error) applicationResourceClientFactory func(scope string) (applicationResourceClient, error) environmentResourceClientFactory func(scope string) (environmentResourceClient, error) + recipePackResourceClientFactory func(scope string) (recipePackResourceClient, error) resourceGroupClientFactory func() (resourceGroupClient, error) resourceProviderClientFactory func() (resourceProviderClient, error) resourceTypeClientFactory func() (resourceTypeClient, error) @@ -402,6 +404,63 @@ func (amc *UCPApplicationsManagementClient) DeleteApplication(ctx context.Contex return response.StatusCode != 204, nil } +// ListRecipePacksInResourceGroup lists all recipe packs in the configured scope (assumes configured scope is a resource group). +func (amc *UCPApplicationsManagementClient) ListRecipePacksInResourceGroup(ctx context.Context) ([]corerpv20250801.RecipePackResource, error) { + client, err := amc.createRecipePackClient(amc.RootScope) + if err != nil { + return nil, err + } + + result := []corerpv20250801.RecipePackResource{} + pager := client.NewListByScopePager(&corerpv20250801.RecipePacksClientListByScopeOptions{}) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + return nil, err + } + for _, rp := range page.RecipePackResourceListResult.Value { + result = append(result, *rp) + } + } + + return result, nil +} + +// ListRecipePacks lists all recipe packs in all resource groups. +func (amc *UCPApplicationsManagementClient) ListRecipePacks(ctx context.Context) ([]corerpv20250801.RecipePackResource, error) { + scope, err := resources.ParseScope(amc.RootScope) + if err != nil { + return []corerpv20250801.RecipePackResource{}, err + } + + // Query at plane scope, not resource group scope. We don't enforce the exact structure of the scope, so handle both cases. + // + // - /planes/radius/local + // - /planes/radius/local/resourceGroups/my-group + if scope.FindScope(resources_radius.ScopeResourceGroups) != "" { + scope = scope.Truncate() + } + + client, err := amc.createRecipePackClient(scope.String()) + if err != nil { + return nil, err + } + + result := []corerpv20250801.RecipePackResource{} + pager := client.NewListByScopePager(&corerpv20250801.RecipePacksClientListByScopeOptions{}) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + return nil, err + } + for _, rp := range page.RecipePackResourceListResult.Value { + result = append(result, *rp) + } + } + + return result, nil +} + // ListEnvironments lists all environments in the configured scope (assumes configured scope is a resource group). func (amc *UCPApplicationsManagementClient) ListEnvironments(ctx context.Context) ([]corerpv20231001.EnvironmentResource, error) { client, err := amc.createEnvironmentClient(amc.RootScope) @@ -481,6 +540,49 @@ func (amc *UCPApplicationsManagementClient) GetEnvironment(ctx context.Context, return response.EnvironmentResource, nil } +// GetRecipePack retrieves a recipe pack by name (in the configured scope) or full resource ID. +func (amc *UCPApplicationsManagementClient) GetRecipePack(ctx context.Context, recipePackNameOrID string) (corerpv20250801.RecipePackResource, error) { + scope, name, err := amc.extractScopeAndName(recipePackNameOrID) + if err != nil { + return corerpv20250801.RecipePackResource{}, err + } + + client, err := amc.createRecipePackClient(scope) + if err != nil { + return corerpv20250801.RecipePackResource{}, err + } + + resp, err := client.Get(ctx, name, &corerpv20250801.RecipePacksClientGetOptions{}) + if err != nil { + return corerpv20250801.RecipePackResource{}, err + } + + return resp.RecipePackResource, nil +} + +// DeleteRecipePack deletes a recipe pack by its name (in the configured scope) or resource ID. +func (amc *UCPApplicationsManagementClient) DeleteRecipePack(ctx context.Context, recipePackNameOrID string) (bool, error) { + scope, name, err := amc.extractScopeAndName(recipePackNameOrID) + if err != nil { + return false, err + } + + client, err := amc.createRecipePackClient(scope) + if err != nil { + return false, err + } + + var response *http.Response + ctx = amc.captureResponse(ctx, &response) + + _, err = client.Delete(ctx, name, nil) + if err != nil { + return false, err + } + + return response.StatusCode != 204, nil +} + // GetRecipeMetadata shows recipe details including list of all parameters for a given recipe registered to an environment. func (amc *UCPApplicationsManagementClient) GetRecipeMetadata(ctx context.Context, environmentNameOrID string, recipeMetadata corerpv20231001.RecipeGetMetadata) (corerpv20231001.RecipeGetMetadataResponse, error) { scope, name, err := amc.extractScopeAndName(environmentNameOrID) @@ -943,6 +1045,7 @@ func (amc *UCPApplicationsManagementClient) ListAllResourceTypesNames(ctx contex excludedResourceTypesList := []string{ "microsoft.resources/deployments", // Internal deployment metadata, not a user resource "radius.core/environments", + "radius.core/applications", } resourceProviderSummaries, err := amc.ListResourceProviderSummaries(ctx, planeName) @@ -1106,6 +1209,13 @@ func (amc *UCPApplicationsManagementClient) createApplicationClient(scope string return amc.applicationResourceClientFactory(scope) } +func (amc *UCPApplicationsManagementClient) createRecipePackClient(scope string) (recipePackResourceClient, error) { + if amc.recipePackResourceClientFactory == nil { + return corerpv20250801.NewRecipePacksClient(strings.TrimPrefix(scope, resources.SegmentSeparator), &aztoken.AnonymousCredential{}, amc.ClientOptions) + } + return amc.recipePackResourceClientFactory(scope) +} + func (amc *UCPApplicationsManagementClient) createEnvironmentClient(scope string) (environmentResourceClient, error) { if amc.environmentResourceClientFactory == nil { // Generated client doesn't like the leading '/' in the scope. diff --git a/pkg/cli/clients/management_mocks.go b/pkg/cli/clients/management_mocks.go index 8a71c5fc1c..a235dbf354 100644 --- a/pkg/cli/clients/management_mocks.go +++ b/pkg/cli/clients/management_mocks.go @@ -22,6 +22,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/radius-project/radius/pkg/cli/clients_new/generated" corerpv20231001 "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + corerpv20250801 "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" ucpv20231001 "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" ) @@ -34,7 +35,7 @@ import ( // Because these interfaces are non-exported, they MUST be defined in their own file // and we MUST use -source on mockgen to generate mocks for them. -//go:generate mockgen -typed -source=./management_mocks.go -destination=./mock_management_wrapped_clients.go -package=clients -self_package github.com/radius-project/radius/pkg/cli/clients github.com/radius-project/radius/pkg/cli/clients genericResourceClient,applicationResourceClient,environmentResourceClient,resourceGroupClient,resourceProviderClient,resourceTypeClient,apiVersonClient,locationClient +//go:generate mockgen -typed -source=./management_mocks.go -destination=./mock_management_wrapped_clients.go -package=clients -self_package github.com/radius-project/radius/pkg/cli/clients github.com/radius-project/radius/pkg/cli/clients genericResourceClient,applicationResourceClient,environmentResourceClient,resourceGroupClient,resourceProviderClient,resourceTypeClient,apiVersonClient,locationClient,recipePackResourceClient // genericResourceClient is an interface for mocking the generated SDK client for any resource. type genericResourceClient interface { @@ -97,3 +98,11 @@ type apiVersionClient interface { type locationClient interface { BeginCreateOrUpdate(ctx context.Context, planeName string, resourceProviderName string, locationName string, resource ucpv20231001.LocationResource, options *ucpv20231001.LocationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ucpv20231001.LocationsClientCreateOrUpdateResponse], error) } + +// recipePackResourceClient is an interface for mocking the generated SDK client for recipePack resources. +type recipePackResourceClient interface { + CreateOrUpdate(ctx context.Context, recipePackName string, resource corerpv20250801.RecipePackResource, options *corerpv20250801.RecipePacksClientCreateOrUpdateOptions) (corerpv20250801.RecipePacksClientCreateOrUpdateResponse, error) + Delete(ctx context.Context, recipePackName string, options *corerpv20250801.RecipePacksClientDeleteOptions) (corerpv20250801.RecipePacksClientDeleteResponse, error) + Get(ctx context.Context, recipePackName string, options *corerpv20250801.RecipePacksClientGetOptions) (corerpv20250801.RecipePacksClientGetResponse, error) + NewListByScopePager(options *corerpv20250801.RecipePacksClientListByScopeOptions) *runtime.Pager[corerpv20250801.RecipePacksClientListByScopeResponse] +} diff --git a/pkg/cli/clients/mock_applicationsclient.go b/pkg/cli/clients/mock_applicationsclient.go index 4cd8d72cd9..e90cc45d92 100644 --- a/pkg/cli/clients/mock_applicationsclient.go +++ b/pkg/cli/clients/mock_applicationsclient.go @@ -15,6 +15,7 @@ import ( generated "github.com/radius-project/radius/pkg/cli/clients_new/generated" v20231001preview "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + v20250801preview "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" v20231001preview0 "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" gomock "go.uber.org/mock/gomock" ) @@ -467,6 +468,45 @@ func (c *MockApplicationsManagementClientDeleteEnvironmentCall) DoAndReturn(f fu return c } +// DeleteRecipePack mocks base method. +func (m *MockApplicationsManagementClient) DeleteRecipePack(arg0 context.Context, arg1 string) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteRecipePack", arg0, arg1) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteRecipePack indicates an expected call of DeleteRecipePack. +func (mr *MockApplicationsManagementClientMockRecorder) DeleteRecipePack(arg0, arg1 any) *MockApplicationsManagementClientDeleteRecipePackCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRecipePack", reflect.TypeOf((*MockApplicationsManagementClient)(nil).DeleteRecipePack), arg0, arg1) + return &MockApplicationsManagementClientDeleteRecipePackCall{Call: call} +} + +// MockApplicationsManagementClientDeleteRecipePackCall wrap *gomock.Call +type MockApplicationsManagementClientDeleteRecipePackCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationsManagementClientDeleteRecipePackCall) Return(arg0 bool, arg1 error) *MockApplicationsManagementClientDeleteRecipePackCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationsManagementClientDeleteRecipePackCall) Do(f func(context.Context, string) (bool, error)) *MockApplicationsManagementClientDeleteRecipePackCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationsManagementClientDeleteRecipePackCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockApplicationsManagementClientDeleteRecipePackCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + // DeleteResource mocks base method. func (m *MockApplicationsManagementClient) DeleteResource(arg0 context.Context, arg1, arg2 string) (bool, error) { m.ctrl.T.Helper() @@ -779,6 +819,45 @@ func (c *MockApplicationsManagementClientGetRecipeMetadataCall) DoAndReturn(f fu return c } +// GetRecipePack mocks base method. +func (m *MockApplicationsManagementClient) GetRecipePack(arg0 context.Context, arg1 string) (v20250801preview.RecipePackResource, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRecipePack", arg0, arg1) + ret0, _ := ret[0].(v20250801preview.RecipePackResource) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRecipePack indicates an expected call of GetRecipePack. +func (mr *MockApplicationsManagementClientMockRecorder) GetRecipePack(arg0, arg1 any) *MockApplicationsManagementClientGetRecipePackCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRecipePack", reflect.TypeOf((*MockApplicationsManagementClient)(nil).GetRecipePack), arg0, arg1) + return &MockApplicationsManagementClientGetRecipePackCall{Call: call} +} + +// MockApplicationsManagementClientGetRecipePackCall wrap *gomock.Call +type MockApplicationsManagementClientGetRecipePackCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationsManagementClientGetRecipePackCall) Return(arg0 v20250801preview.RecipePackResource, arg1 error) *MockApplicationsManagementClientGetRecipePackCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationsManagementClientGetRecipePackCall) Do(f func(context.Context, string) (v20250801preview.RecipePackResource, error)) *MockApplicationsManagementClientGetRecipePackCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationsManagementClientGetRecipePackCall) DoAndReturn(f func(context.Context, string) (v20250801preview.RecipePackResource, error)) *MockApplicationsManagementClientGetRecipePackCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + // GetResource mocks base method. func (m *MockApplicationsManagementClient) GetResource(arg0 context.Context, arg1, arg2 string) (generated.GenericResource, error) { m.ctrl.T.Helper() @@ -1091,6 +1170,84 @@ func (c *MockApplicationsManagementClientListEnvironmentsAllCall) DoAndReturn(f return c } +// ListRecipePacks mocks base method. +func (m *MockApplicationsManagementClient) ListRecipePacks(arg0 context.Context) ([]v20250801preview.RecipePackResource, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListRecipePacks", arg0) + ret0, _ := ret[0].([]v20250801preview.RecipePackResource) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListRecipePacks indicates an expected call of ListRecipePacks. +func (mr *MockApplicationsManagementClientMockRecorder) ListRecipePacks(arg0 any) *MockApplicationsManagementClientListRecipePacksCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRecipePacks", reflect.TypeOf((*MockApplicationsManagementClient)(nil).ListRecipePacks), arg0) + return &MockApplicationsManagementClientListRecipePacksCall{Call: call} +} + +// MockApplicationsManagementClientListRecipePacksCall wrap *gomock.Call +type MockApplicationsManagementClientListRecipePacksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationsManagementClientListRecipePacksCall) Return(arg0 []v20250801preview.RecipePackResource, arg1 error) *MockApplicationsManagementClientListRecipePacksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationsManagementClientListRecipePacksCall) Do(f func(context.Context) ([]v20250801preview.RecipePackResource, error)) *MockApplicationsManagementClientListRecipePacksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationsManagementClientListRecipePacksCall) DoAndReturn(f func(context.Context) ([]v20250801preview.RecipePackResource, error)) *MockApplicationsManagementClientListRecipePacksCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListRecipePacksInResourceGroup mocks base method. +func (m *MockApplicationsManagementClient) ListRecipePacksInResourceGroup(arg0 context.Context) ([]v20250801preview.RecipePackResource, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListRecipePacksInResourceGroup", arg0) + ret0, _ := ret[0].([]v20250801preview.RecipePackResource) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListRecipePacksInResourceGroup indicates an expected call of ListRecipePacksInResourceGroup. +func (mr *MockApplicationsManagementClientMockRecorder) ListRecipePacksInResourceGroup(arg0 any) *MockApplicationsManagementClientListRecipePacksInResourceGroupCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRecipePacksInResourceGroup", reflect.TypeOf((*MockApplicationsManagementClient)(nil).ListRecipePacksInResourceGroup), arg0) + return &MockApplicationsManagementClientListRecipePacksInResourceGroupCall{Call: call} +} + +// MockApplicationsManagementClientListRecipePacksInResourceGroupCall wrap *gomock.Call +type MockApplicationsManagementClientListRecipePacksInResourceGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationsManagementClientListRecipePacksInResourceGroupCall) Return(arg0 []v20250801preview.RecipePackResource, arg1 error) *MockApplicationsManagementClientListRecipePacksInResourceGroupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationsManagementClientListRecipePacksInResourceGroupCall) Do(f func(context.Context) ([]v20250801preview.RecipePackResource, error)) *MockApplicationsManagementClientListRecipePacksInResourceGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationsManagementClientListRecipePacksInResourceGroupCall) DoAndReturn(f func(context.Context) ([]v20250801preview.RecipePackResource, error)) *MockApplicationsManagementClientListRecipePacksInResourceGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + // ListResourceGroups mocks base method. func (m *MockApplicationsManagementClient) ListResourceGroups(arg0 context.Context, arg1 string) ([]v20231001preview0.ResourceGroupResource, error) { m.ctrl.T.Helper() diff --git a/pkg/cli/clients/mock_management_wrapped_clients.go b/pkg/cli/clients/mock_management_wrapped_clients.go index 14992544ef..256c8c0c96 100644 --- a/pkg/cli/clients/mock_management_wrapped_clients.go +++ b/pkg/cli/clients/mock_management_wrapped_clients.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -typed -source=./management_mocks.go -destination=./mock_management_wrapped_clients.go -package=clients -self_package github.com/radius-project/radius/pkg/cli/clients github.com/radius-project/radius/pkg/cli/clients genericResourceClient,applicationResourceClient,environmentResourceClient,resourceGroupClient,resourceProviderClient,resourceTypeClient,apiVersonClient,locationClient +// mockgen -typed -source=./management_mocks.go -destination=./mock_management_wrapped_clients.go -package=clients -self_package github.com/radius-project/radius/pkg/cli/clients github.com/radius-project/radius/pkg/cli/clients genericResourceClient,applicationResourceClient,environmentResourceClient,resourceGroupClient,resourceProviderClient,resourceTypeClient,apiVersonClient,locationClient,recipePackResourceClient // // Package clients is a generated GoMock package. @@ -16,6 +16,7 @@ import ( runtime "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" generated "github.com/radius-project/radius/pkg/cli/clients_new/generated" v20231001preview "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + v20250801preview "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" v20231001preview0 "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" gomock "go.uber.org/mock/gomock" ) @@ -1289,3 +1290,181 @@ func (c *MocklocationClientBeginCreateOrUpdateCall) DoAndReturn(f func(context.C c.Call = c.Call.DoAndReturn(f) return c } + +// MockrecipePackResourceClient is a mock of recipePackResourceClient interface. +type MockrecipePackResourceClient struct { + ctrl *gomock.Controller + recorder *MockrecipePackResourceClientMockRecorder +} + +// MockrecipePackResourceClientMockRecorder is the mock recorder for MockrecipePackResourceClient. +type MockrecipePackResourceClientMockRecorder struct { + mock *MockrecipePackResourceClient +} + +// NewMockrecipePackResourceClient creates a new mock instance. +func NewMockrecipePackResourceClient(ctrl *gomock.Controller) *MockrecipePackResourceClient { + mock := &MockrecipePackResourceClient{ctrl: ctrl} + mock.recorder = &MockrecipePackResourceClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockrecipePackResourceClient) EXPECT() *MockrecipePackResourceClientMockRecorder { + return m.recorder +} + +// CreateOrUpdate mocks base method. +func (m *MockrecipePackResourceClient) CreateOrUpdate(ctx context.Context, recipePackName string, resource v20250801preview.RecipePackResource, options *v20250801preview.RecipePacksClientCreateOrUpdateOptions) (v20250801preview.RecipePacksClientCreateOrUpdateResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, recipePackName, resource, options) + ret0, _ := ret[0].(v20250801preview.RecipePacksClientCreateOrUpdateResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate. +func (mr *MockrecipePackResourceClientMockRecorder) CreateOrUpdate(ctx, recipePackName, resource, options any) *MockrecipePackResourceClientCreateOrUpdateCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockrecipePackResourceClient)(nil).CreateOrUpdate), ctx, recipePackName, resource, options) + return &MockrecipePackResourceClientCreateOrUpdateCall{Call: call} +} + +// MockrecipePackResourceClientCreateOrUpdateCall wrap *gomock.Call +type MockrecipePackResourceClientCreateOrUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockrecipePackResourceClientCreateOrUpdateCall) Return(arg0 v20250801preview.RecipePacksClientCreateOrUpdateResponse, arg1 error) *MockrecipePackResourceClientCreateOrUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockrecipePackResourceClientCreateOrUpdateCall) Do(f func(context.Context, string, v20250801preview.RecipePackResource, *v20250801preview.RecipePacksClientCreateOrUpdateOptions) (v20250801preview.RecipePacksClientCreateOrUpdateResponse, error)) *MockrecipePackResourceClientCreateOrUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockrecipePackResourceClientCreateOrUpdateCall) DoAndReturn(f func(context.Context, string, v20250801preview.RecipePackResource, *v20250801preview.RecipePacksClientCreateOrUpdateOptions) (v20250801preview.RecipePacksClientCreateOrUpdateResponse, error)) *MockrecipePackResourceClientCreateOrUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockrecipePackResourceClient) Delete(ctx context.Context, recipePackName string, options *v20250801preview.RecipePacksClientDeleteOptions) (v20250801preview.RecipePacksClientDeleteResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, recipePackName, options) + ret0, _ := ret[0].(v20250801preview.RecipePacksClientDeleteResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockrecipePackResourceClientMockRecorder) Delete(ctx, recipePackName, options any) *MockrecipePackResourceClientDeleteCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockrecipePackResourceClient)(nil).Delete), ctx, recipePackName, options) + return &MockrecipePackResourceClientDeleteCall{Call: call} +} + +// MockrecipePackResourceClientDeleteCall wrap *gomock.Call +type MockrecipePackResourceClientDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockrecipePackResourceClientDeleteCall) Return(arg0 v20250801preview.RecipePacksClientDeleteResponse, arg1 error) *MockrecipePackResourceClientDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockrecipePackResourceClientDeleteCall) Do(f func(context.Context, string, *v20250801preview.RecipePacksClientDeleteOptions) (v20250801preview.RecipePacksClientDeleteResponse, error)) *MockrecipePackResourceClientDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockrecipePackResourceClientDeleteCall) DoAndReturn(f func(context.Context, string, *v20250801preview.RecipePacksClientDeleteOptions) (v20250801preview.RecipePacksClientDeleteResponse, error)) *MockrecipePackResourceClientDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockrecipePackResourceClient) Get(ctx context.Context, recipePackName string, options *v20250801preview.RecipePacksClientGetOptions) (v20250801preview.RecipePacksClientGetResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, recipePackName, options) + ret0, _ := ret[0].(v20250801preview.RecipePacksClientGetResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockrecipePackResourceClientMockRecorder) Get(ctx, recipePackName, options any) *MockrecipePackResourceClientGetCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockrecipePackResourceClient)(nil).Get), ctx, recipePackName, options) + return &MockrecipePackResourceClientGetCall{Call: call} +} + +// MockrecipePackResourceClientGetCall wrap *gomock.Call +type MockrecipePackResourceClientGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockrecipePackResourceClientGetCall) Return(arg0 v20250801preview.RecipePacksClientGetResponse, arg1 error) *MockrecipePackResourceClientGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockrecipePackResourceClientGetCall) Do(f func(context.Context, string, *v20250801preview.RecipePacksClientGetOptions) (v20250801preview.RecipePacksClientGetResponse, error)) *MockrecipePackResourceClientGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockrecipePackResourceClientGetCall) DoAndReturn(f func(context.Context, string, *v20250801preview.RecipePacksClientGetOptions) (v20250801preview.RecipePacksClientGetResponse, error)) *MockrecipePackResourceClientGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// NewListByScopePager mocks base method. +func (m *MockrecipePackResourceClient) NewListByScopePager(options *v20250801preview.RecipePacksClientListByScopeOptions) *runtime.Pager[v20250801preview.RecipePacksClientListByScopeResponse] { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewListByScopePager", options) + ret0, _ := ret[0].(*runtime.Pager[v20250801preview.RecipePacksClientListByScopeResponse]) + return ret0 +} + +// NewListByScopePager indicates an expected call of NewListByScopePager. +func (mr *MockrecipePackResourceClientMockRecorder) NewListByScopePager(options any) *MockrecipePackResourceClientNewListByScopePagerCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewListByScopePager", reflect.TypeOf((*MockrecipePackResourceClient)(nil).NewListByScopePager), options) + return &MockrecipePackResourceClientNewListByScopePagerCall{Call: call} +} + +// MockrecipePackResourceClientNewListByScopePagerCall wrap *gomock.Call +type MockrecipePackResourceClientNewListByScopePagerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockrecipePackResourceClientNewListByScopePagerCall) Return(arg0 *runtime.Pager[v20250801preview.RecipePacksClientListByScopeResponse]) *MockrecipePackResourceClientNewListByScopePagerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockrecipePackResourceClientNewListByScopePagerCall) Do(f func(*v20250801preview.RecipePacksClientListByScopeOptions) *runtime.Pager[v20250801preview.RecipePacksClientListByScopeResponse]) *MockrecipePackResourceClientNewListByScopePagerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockrecipePackResourceClientNewListByScopePagerCall) DoAndReturn(f func(*v20250801preview.RecipePacksClientListByScopeOptions) *runtime.Pager[v20250801preview.RecipePacksClientListByScopeResponse]) *MockrecipePackResourceClientNewListByScopePagerCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/pkg/cli/clients_new/README.md b/pkg/cli/clients_new/README.md index 6bdb0bc3dd..625b772a4d 100644 --- a/pkg/cli/clients_new/README.md +++ b/pkg/cli/clients_new/README.md @@ -1,10 +1,13 @@ -### Prerequisites +# API + +## Prerequisites + 1. Install [NodeJS](https://nodejs.org/) 2. Install [AutoRest](http://aka.ms/autorest) -``` -npm install -g autorest -``` ---- + + ```shell + npm install -g autorest@3.7.2 + ``` ## Configuration @@ -29,8 +32,8 @@ The following configuration generates track2 go models and client. ```yaml $(tag) != '' version: 3.*.* -use: "@autorest/go@4.0.0-preview.44" -module-version: 0.0.1 +use: "@autorest/go@4.0.0-preview.74" +module: "github.com/radius-project/radius/pkg/cli/clients_new/generated" file-prefix: zz_generated_ license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated." azure-arm: true @@ -46,5 +49,6 @@ These settings apply only when `--tag=2023-10-01-preview` is specified on the co output-folder: ./generated ``` -### Adding ResourceTypes: +### Adding ResourceTypes + All resource types are tracked in resourceTypesList in ucp package. Whenever a new core-rp or portable resource type is added this list has to be updated. diff --git a/pkg/cli/clients_new/generated/fake/zz_generated_genericresources_server.go b/pkg/cli/clients_new/generated/fake/zz_generated_genericresources_server.go new file mode 100644 index 0000000000..59c667e4ac --- /dev/null +++ b/pkg/cli/clients_new/generated/fake/zz_generated_genericresources_server.go @@ -0,0 +1,296 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/radius-project/radius/pkg/cli/clients_new/generated" + "net/http" + "net/url" + "regexp" +) + +// GenericResourcesServer is a fake server for instances of the generated.GenericResourcesClient type. +type GenericResourcesServer struct { + // BeginCreateOrUpdate is the fake for method GenericResourcesClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdate func(ctx context.Context, resourceName string, genericResourceParameters generated.GenericResource, options *generated.GenericResourcesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[generated.GenericResourcesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginDelete is the fake for method GenericResourcesClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceName string, options *generated.GenericResourcesClientBeginDeleteOptions) (resp azfake.PollerResponder[generated.GenericResourcesClientDeleteResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method GenericResourcesClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceName string, options *generated.GenericResourcesClientGetOptions) (resp azfake.Responder[generated.GenericResourcesClientGetResponse], errResp azfake.ErrorResponder) + + // NewListByRootScopePager is the fake for method GenericResourcesClient.NewListByRootScopePager + // HTTP status codes to indicate success: http.StatusOK + NewListByRootScopePager func(options *generated.GenericResourcesClientListByRootScopeOptions) (resp azfake.PagerResponder[generated.GenericResourcesClientListByRootScopeResponse]) + + // ListSecrets is the fake for method GenericResourcesClient.ListSecrets + // HTTP status codes to indicate success: http.StatusOK + ListSecrets func(ctx context.Context, resourceName string, options *generated.GenericResourcesClientListSecretsOptions) (resp azfake.Responder[generated.GenericResourcesClientListSecretsResponse], errResp azfake.ErrorResponder) +} + +// NewGenericResourcesServerTransport creates a new instance of GenericResourcesServerTransport with the provided implementation. +// The returned GenericResourcesServerTransport instance is connected to an instance of generated.GenericResourcesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewGenericResourcesServerTransport(srv *GenericResourcesServer) *GenericResourcesServerTransport { + return &GenericResourcesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[generated.GenericResourcesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[generated.GenericResourcesClientDeleteResponse]](), + newListByRootScopePager: newTracker[azfake.PagerResponder[generated.GenericResourcesClientListByRootScopeResponse]](), + } +} + +// GenericResourcesServerTransport connects instances of generated.GenericResourcesClient to instances of GenericResourcesServer. +// Don't use this type directly, use NewGenericResourcesServerTransport instead. +type GenericResourcesServerTransport struct { + srv *GenericResourcesServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[generated.GenericResourcesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[generated.GenericResourcesClientDeleteResponse]] + newListByRootScopePager *tracker[azfake.PagerResponder[generated.GenericResourcesClientListByRootScopeResponse]] +} + +// Do implements the policy.Transporter interface for GenericResourcesServerTransport. +func (g *GenericResourcesServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + return g.dispatchToMethodFake(req, method) +} + +func (g *GenericResourcesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { + resultChan := make(chan result) + defer close(resultChan) + + go func() { + var intercepted bool + var res result + if genericResourcesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = genericResourcesServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "GenericResourcesClient.BeginCreateOrUpdate": + res.resp, res.err = g.dispatchBeginCreateOrUpdate(req) + case "GenericResourcesClient.BeginDelete": + res.resp, res.err = g.dispatchBeginDelete(req) + case "GenericResourcesClient.Get": + res.resp, res.err = g.dispatchGet(req) + case "GenericResourcesClient.NewListByRootScopePager": + res.resp, res.err = g.dispatchNewListByRootScopePager(req) + case "GenericResourcesClient.ListSecrets": + res.resp, res.err = g.dispatchListSecrets(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() + + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } +} + +func (g *GenericResourcesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if g.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := g.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[generated.GenericResource](req) + if err != nil { + return nil, err + } + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.BeginCreateOrUpdate(req.Context(), resourceNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + g.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + g.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + g.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (g *GenericResourcesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if g.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := g.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.BeginDelete(req.Context(), resourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + g.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + g.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + g.beginDelete.remove(req) + } + + return resp, nil +} + +func (g *GenericResourcesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if g.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.Get(req.Context(), resourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).GenericResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (g *GenericResourcesServerTransport) dispatchNewListByRootScopePager(req *http.Request) (*http.Response, error) { + if g.srv.NewListByRootScopePager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByRootScopePager not implemented")} + } + newListByRootScopePager := g.newListByRootScopePager.get(req) + if newListByRootScopePager == nil { + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := g.srv.NewListByRootScopePager(nil) + newListByRootScopePager = &resp + g.newListByRootScopePager.add(req, newListByRootScopePager) + server.PagerResponderInjectNextLinks(newListByRootScopePager, req, func(page *generated.GenericResourcesClientListByRootScopeResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByRootScopePager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + g.newListByRootScopePager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByRootScopePager) { + g.newListByRootScopePager.remove(req) + } + return resp, nil +} + +func (g *GenericResourcesServerTransport) dispatchListSecrets(req *http.Request) (*http.Response, error) { + if g.srv.ListSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSecrets not implemented")} + } + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listSecrets` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.ListSecrets(req.Context(), resourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Value, req) + if err != nil { + return nil, err + } + return resp, nil +} + +// set this to conditionally intercept incoming requests to GenericResourcesServerTransport +var genericResourcesServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/pkg/cli/clients_new/generated/fake/zz_generated_internal.go b/pkg/cli/clients_new/generated/fake/zz_generated_internal.go new file mode 100644 index 0000000000..936b2c6560 --- /dev/null +++ b/pkg/cli/clients_new/generated/fake/zz_generated_internal.go @@ -0,0 +1,65 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "net/http" + "sync" +) + +type result struct { + resp *http.Response + err error +} + +type nonRetriableError struct { + error +} + +func (nonRetriableError) NonRetriable() { + // marker method +} + +func contains[T comparable](s []T, v T) bool { + for _, vv := range s { + if vv == v { + return true + } + } + return false +} + +func newTracker[T any]() *tracker[T] { + return &tracker[T]{ + items: map[string]*T{}, + } +} + +type tracker[T any] struct { + items map[string]*T + mu sync.Mutex +} + +func (p *tracker[T]) get(req *http.Request) *T { + p.mu.Lock() + defer p.mu.Unlock() + if item, ok := p.items[server.SanitizePagerPollerPath(req.URL.Path)]; ok { + return item + } + return nil +} + +func (p *tracker[T]) add(req *http.Request, item *T) { + p.mu.Lock() + defer p.mu.Unlock() + p.items[server.SanitizePagerPollerPath(req.URL.Path)] = item +} + +func (p *tracker[T]) remove(req *http.Request) { + p.mu.Lock() + defer p.mu.Unlock() + delete(p.items, server.SanitizePagerPollerPath(req.URL.Path)) +} diff --git a/pkg/cli/clients_new/generated/fake/zz_generated_server_factory.go b/pkg/cli/clients_new/generated/fake/zz_generated_server_factory.go new file mode 100644 index 0000000000..7251e88a58 --- /dev/null +++ b/pkg/cli/clients_new/generated/fake/zz_generated_server_factory.go @@ -0,0 +1,74 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" + "sync" +) + +// ServerFactory is a fake server for instances of the generated.ClientFactory type. +type ServerFactory struct { + // GenericResourcesServer contains the fakes for client GenericResourcesClient + GenericResourcesServer GenericResourcesServer +} + +// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. +// The returned ServerFactoryTransport instance is connected to an instance of generated.ClientFactory via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { + return &ServerFactoryTransport{ + srv: srv, + } +} + +// ServerFactoryTransport connects instances of generated.ClientFactory to instances of ServerFactory. +// Don't use this type directly, use NewServerFactoryTransport instead. +type ServerFactoryTransport struct { + srv *ServerFactory + trMu sync.Mutex + trGenericResourcesServer *GenericResourcesServerTransport +} + +// Do implements the policy.Transporter interface for ServerFactoryTransport. +func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + client := method[:strings.Index(method, ".")] + var resp *http.Response + var err error + + switch client { + case "GenericResourcesClient": + initServer(s, &s.trGenericResourcesServer, func() *GenericResourcesServerTransport { + return NewGenericResourcesServerTransport(&s.srv.GenericResourcesServer) + }) + resp, err = s.trGenericResourcesServer.Do(req) + default: + err = fmt.Errorf("unhandled client %s", client) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func initServer[T any](s *ServerFactoryTransport, dst **T, src func() *T) { + s.trMu.Lock() + if *dst == nil { + *dst = src() + } + s.trMu.Unlock() +} diff --git a/pkg/cli/clients_new/generated/zz_generated_client_factory.go b/pkg/cli/clients_new/generated/zz_generated_client_factory.go new file mode 100644 index 0000000000..d7f9200f5c --- /dev/null +++ b/pkg/cli/clients_new/generated/zz_generated_client_factory.go @@ -0,0 +1,45 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package generated + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + rootScope string + resourceType string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - rootScope - The scope in which the resource is present. For Azure resource this would be /subscriptions/{subscriptionID}/resourceGroups/{resourcegroupID} +// - resourceType - The azure resource type. For example RedisCache, RabbitMQ and other +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(rootScope string, resourceType string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + rootScope: rootScope, + resourceType: resourceType, + internal: internal, + }, nil +} + +// NewGenericResourcesClient creates a new instance of GenericResourcesClient. +func (c *ClientFactory) NewGenericResourcesClient() *GenericResourcesClient { + return &GenericResourcesClient{ + rootScope: c.rootScope, + resourceType: c.resourceType, + internal: c.internal, + } +} diff --git a/pkg/cli/clients_new/generated/zz_generated_constants.go b/pkg/cli/clients_new/generated/zz_generated_constants.go index aba153cd42..60ff450ba4 100644 --- a/pkg/cli/clients_new/generated/zz_generated_constants.go +++ b/pkg/cli/clients_new/generated/zz_generated_constants.go @@ -1,35 +1,25 @@ -//go:build go1.18 -// +build go1.18 - // Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package generated -const ( - moduleName = "generated" - moduleVersion = "v0.0.1" -) - // CreatedByType - The type of identity that created the resource. type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser, } } - diff --git a/pkg/cli/clients_new/generated/zz_generated_genericresources_client.go b/pkg/cli/clients_new/generated/zz_generated_genericresources_client.go index c52892e5f5..64ba7f81c8 100644 --- a/pkg/cli/clients_new/generated/zz_generated_genericresources_client.go +++ b/pkg/cli/clients_new/generated/zz_generated_genericresources_client.go @@ -1,10 +1,6 @@ -//go:build go1.18 -// +build go1.18 - // Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package generated @@ -13,8 +9,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,79 +19,82 @@ import ( // GenericResourcesClient contains the methods for the GenericResources group. // Don't use this type directly, use NewGenericResourcesClient() instead. type GenericResourcesClient struct { - host string - rootScope string + internal *arm.Client + rootScope string resourceType string - pl runtime.Pipeline } // NewGenericResourcesClient creates a new instance of GenericResourcesClient with the specified values. -// rootScope - The scope in which the resource is present. For Azure resource this would be /subscriptions/{subscriptionID}/resourceGroups/{resourcegroupID} -// resourceType - The azure resource type. For example RedisCache, RabbitMQ and other -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - rootScope - The scope in which the resource is present. For Azure resource this would be /subscriptions/{subscriptionID}/resourceGroups/{resourcegroupID} +// - resourceType - The azure resource type. For example RedisCache, RabbitMQ and other +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewGenericResourcesClient(rootScope string, resourceType string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GenericResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } client := &GenericResourcesClient{ - rootScope: rootScope, + rootScope: rootScope, resourceType: resourceType, - host: ep, -pl: pl, + internal: cl, } return client, nil } // BeginCreateOrUpdate - Creates or updates a Generic resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2023-10-01-preview -// resourceName - The name of the generic resource -// genericResourceParameters - generic resource create parameters -// options - GenericResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the GenericResourcesClient.BeginCreateOrUpdate -// method. +// - resourceName - The name of the generic resource +// - genericResourceParameters - generic resource create parameters +// - options - GenericResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the GenericResourcesClient.BeginCreateOrUpdate +// method. func (client *GenericResourcesClient) BeginCreateOrUpdate(ctx context.Context, resourceName string, genericResourceParameters GenericResource, options *GenericResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GenericResourcesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceName, genericResourceParameters, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GenericResourcesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenericResourcesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenericResourcesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenericResourcesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates or updates a Generic resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2023-10-01-preview func (client *GenericResourcesClient) createOrUpdate(ctx context.Context, resourceName string, genericResourceParameters GenericResource, options *GenericResourcesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "GenericResourcesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceName, genericResourceParameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GenericResourcesClient) createOrUpdateCreateRequest(ctx context.Context, resourceName string, genericResourceParameters GenericResource, options *GenericResourcesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *GenericResourcesClient) createOrUpdateCreateRequest(ctx context.Context, resourceName string, genericResourceParameters GenericResource, _ *GenericResourcesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/{resourceType}/{resourceName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) urlPath = strings.ReplaceAll(urlPath, "{resourceType}", client.resourceType) @@ -105,7 +102,7 @@ func (client *GenericResourcesClient) createOrUpdateCreateRequest(ctx context.Co return nil, errors.New("parameter resourceName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -113,49 +110,64 @@ func (client *GenericResourcesClient) createOrUpdateCreateRequest(ctx context.Co reqQP.Set("api-version", "2023-10-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, genericResourceParameters) + if err := runtime.MarshalAsJSON(req, genericResourceParameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing Generic resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2023-10-01-preview -// resourceName - The name of the generic resource -// options - GenericResourcesClientBeginDeleteOptions contains the optional parameters for the GenericResourcesClient.BeginDelete -// method. +// - resourceName - The name of the generic resource +// - options - GenericResourcesClientBeginDeleteOptions contains the optional parameters for the GenericResourcesClient.BeginDelete +// method. func (client *GenericResourcesClient) BeginDelete(ctx context.Context, resourceName string, options *GenericResourcesClientBeginDeleteOptions) (*runtime.Poller[GenericResourcesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceName, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GenericResourcesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenericResourcesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenericResourcesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenericResourcesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing Generic resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2023-10-01-preview func (client *GenericResourcesClient) deleteOperation(ctx context.Context, resourceName string, options *GenericResourcesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "GenericResourcesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceName, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. -func (client *GenericResourcesClient) deleteCreateRequest(ctx context.Context, resourceName string, options *GenericResourcesClientBeginDeleteOptions) (*policy.Request, error) { +func (client *GenericResourcesClient) deleteCreateRequest(ctx context.Context, resourceName string, _ *GenericResourcesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/{resourceType}/{resourceName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) urlPath = strings.ReplaceAll(urlPath, "{resourceType}", client.resourceType) @@ -163,7 +175,7 @@ func (client *GenericResourcesClient) deleteCreateRequest(ctx context.Context, r return nil, errors.New("parameter resourceName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -176,26 +188,34 @@ func (client *GenericResourcesClient) deleteCreateRequest(ctx context.Context, r // Get - Retrieves information about a generic resource with the name given of the type given within the root scope // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2023-10-01-preview -// resourceName - The name of the generic resource -// options - GenericResourcesClientGetOptions contains the optional parameters for the GenericResourcesClient.Get method. +// - resourceName - The name of the generic resource +// - options - GenericResourcesClientGetOptions contains the optional parameters for the GenericResourcesClient.Get method. func (client *GenericResourcesClient) Get(ctx context.Context, resourceName string, options *GenericResourcesClientGetOptions) (GenericResourcesClientGetResponse, error) { + var err error + const operationName = "GenericResourcesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceName, options) if err != nil { return GenericResourcesClientGetResponse{}, err } - resp, err := client.pl.Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GenericResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GenericResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GenericResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *GenericResourcesClient) getCreateRequest(ctx context.Context, resourceName string, options *GenericResourcesClientGetOptions) (*policy.Request, error) { +func (client *GenericResourcesClient) getCreateRequest(ctx context.Context, resourceName string, _ *GenericResourcesClientGetOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/{resourceType}/{resourceName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) urlPath = strings.ReplaceAll(urlPath, "{resourceType}", client.resourceType) @@ -203,7 +223,7 @@ func (client *GenericResourcesClient) getCreateRequest(ctx context.Context, reso return nil, errors.New("parameter resourceName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -224,43 +244,39 @@ func (client *GenericResourcesClient) getHandleResponse(resp *http.Response) (Ge } // NewListByRootScopePager - Lists information about all resources of the given resource type in the given root scope +// // Generated from API version 2023-10-01-preview -// options - GenericResourcesClientListByRootScopeOptions contains the optional parameters for the GenericResourcesClient.ListByRootScope -// method. -func (client *GenericResourcesClient) NewListByRootScopePager(options *GenericResourcesClientListByRootScopeOptions) (*runtime.Pager[GenericResourcesClientListByRootScopeResponse]) { +// - options - GenericResourcesClientListByRootScopeOptions contains the optional parameters for the GenericResourcesClient.NewListByRootScopePager +// method. +func (client *GenericResourcesClient) NewListByRootScopePager(options *GenericResourcesClientListByRootScopeOptions) *runtime.Pager[GenericResourcesClientListByRootScopeResponse] { return runtime.NewPager(runtime.PagingHandler[GenericResourcesClientListByRootScopeResponse]{ More: func(page GenericResourcesClientListByRootScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GenericResourcesClientListByRootScopeResponse) (GenericResourcesClientListByRootScopeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByRootScopeCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GenericResourcesClientListByRootScopeResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GenericResourcesClient.NewListByRootScopePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.pl.Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByRootScopeCreateRequest(ctx, options) + }, nil) if err != nil { return GenericResourcesClientListByRootScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GenericResourcesClientListByRootScopeResponse{}, runtime.NewResponseError(resp) - } return client.listByRootScopeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByRootScopeCreateRequest creates the ListByRootScope request. -func (client *GenericResourcesClient) listByRootScopeCreateRequest(ctx context.Context, options *GenericResourcesClientListByRootScopeOptions) (*policy.Request, error) { +func (client *GenericResourcesClient) listByRootScopeCreateRequest(ctx context.Context, _ *GenericResourcesClientListByRootScopeOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/{resourceType}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) urlPath = strings.ReplaceAll(urlPath, "{resourceType}", client.resourceType) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -282,27 +298,35 @@ func (client *GenericResourcesClient) listByRootScopeHandleResponse(resp *http.R // ListSecrets - Lists secrets for a resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2023-10-01-preview -// resourceName - The name of the generic resource -// options - GenericResourcesClientListSecretsOptions contains the optional parameters for the GenericResourcesClient.ListSecrets -// method. +// - resourceName - The name of the generic resource +// - options - GenericResourcesClientListSecretsOptions contains the optional parameters for the GenericResourcesClient.ListSecrets +// method. func (client *GenericResourcesClient) ListSecrets(ctx context.Context, resourceName string, options *GenericResourcesClientListSecretsOptions) (GenericResourcesClientListSecretsResponse, error) { + var err error + const operationName = "GenericResourcesClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceName, options) if err != nil { return GenericResourcesClientListSecretsResponse{}, err } - resp, err := client.pl.Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GenericResourcesClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GenericResourcesClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GenericResourcesClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *GenericResourcesClient) listSecretsCreateRequest(ctx context.Context, resourceName string, options *GenericResourcesClientListSecretsOptions) (*policy.Request, error) { +func (client *GenericResourcesClient) listSecretsCreateRequest(ctx context.Context, resourceName string, _ *GenericResourcesClientListSecretsOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/{resourceType}/{resourceName}/listSecrets" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) urlPath = strings.ReplaceAll(urlPath, "{resourceType}", client.resourceType) @@ -310,7 +334,7 @@ func (client *GenericResourcesClient) listSecretsCreateRequest(ctx context.Conte return nil, errors.New("parameter resourceName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -329,4 +353,3 @@ func (client *GenericResourcesClient) listSecretsHandleResponse(resp *http.Respo } return result, nil } - diff --git a/pkg/cli/clients_new/generated/zz_generated_models.go b/pkg/cli/clients_new/generated/zz_generated_models.go index 06a5af68f8..79d6fdc5b9 100644 --- a/pkg/cli/clients_new/generated/zz_generated_models.go +++ b/pkg/cli/clients_new/generated/zz_generated_models.go @@ -1,10 +1,6 @@ -//go:build go1.18 -// +build go1.18 - // Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package generated @@ -13,148 +9,118 @@ import "time" // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. - Info map[string]interface{} `json:"info,omitempty" azure:"ro"` + Info map[string]any // READ-ONLY; The additional info type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` + AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` + Code *string // READ-ONLY; The error details. - Details []*ErrorDetail `json:"details,omitempty" azure:"ro"` + Details []*ErrorDetail // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; The error target. - Target *string `json:"target,omitempty" azure:"ro"` + Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { // The error object. - Error *ErrorDetail `json:"error,omitempty"` + Error *ErrorDetail } // GenericResource - Generic resource type GenericResource struct { // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Any object - Properties map[string]interface{} `json:"properties,omitempty"` + Properties map[string]any // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GenericResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the GenericResourcesClient.BeginCreateOrUpdate -// method. -type GenericResourcesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GenericResourcesClientBeginDeleteOptions contains the optional parameters for the GenericResourcesClient.BeginDelete method. -type GenericResourcesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GenericResourcesClientGetOptions contains the optional parameters for the GenericResourcesClient.Get method. -type GenericResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// GenericResourcesClientListByRootScopeOptions contains the optional parameters for the GenericResourcesClient.ListByRootScope -// method. -type GenericResourcesClientListByRootScopeOptions struct { - // placeholder for future optional parameters -} - -// GenericResourcesClientListSecretsOptions contains the optional parameters for the GenericResourcesClient.ListSecrets method. -type GenericResourcesClientListSecretsOptions struct { - // placeholder for future optional parameters + Type *string } // GenericResourcesList - Object that includes an array of GenericResources and a possible link for next set type GenericResourcesList struct { // The link used to fetch the next page of resource list. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // List of GenericResources resources - Value []*GenericResource `json:"value,omitempty"` + Value []*GenericResource } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType } // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` + Location *string // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } - diff --git a/pkg/cli/clients_new/generated/zz_generated_models_serde.go b/pkg/cli/clients_new/generated/zz_generated_models_serde.go index 1523a93507..1c14b583d5 100644 --- a/pkg/cli/clients_new/generated/zz_generated_models_serde.go +++ b/pkg/cli/clients_new/generated/zz_generated_models_serde.go @@ -1,10 +1,6 @@ -//go:build go1.18 -// +build go1.18 - // Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package generated @@ -17,7 +13,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "info", e.Info) populate(objectMap, "type", e.Type) return json.Marshal(objectMap) @@ -33,11 +29,11 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) - delete(rawMsg, key) + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -48,7 +44,7 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorDetail. func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "additionalInfo", e.AdditionalInfo) populate(objectMap, "code", e.Code) populate(objectMap, "details", e.Details) @@ -67,20 +63,20 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) - delete(rawMsg, key) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) - delete(rawMsg, key) + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -91,7 +87,7 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorResponse. func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } @@ -106,8 +102,8 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) - delete(rawMsg, key) + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -118,7 +114,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GenericResource. func (g GenericResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", g.ID) populate(objectMap, "location", g.Location) populate(objectMap, "name", g.Name) @@ -139,26 +135,26 @@ func (g *GenericResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &g.Location) - delete(rawMsg, key) + err = unpopulate(val, "Location", &g.Location) + delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) - delete(rawMsg, key) + err = unpopulate(val, "SystemData", &g.SystemData) + delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &g.Tags) - delete(rawMsg, key) + err = unpopulate(val, "Tags", &g.Tags) + delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", g, err) @@ -169,7 +165,7 @@ func (g *GenericResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GenericResourcesList. func (g GenericResourcesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -185,11 +181,11 @@ func (g *GenericResourcesList) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", g, err) @@ -200,7 +196,7 @@ func (g *GenericResourcesList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) populate(objectMap, "type", r.Type) @@ -217,14 +213,14 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", r, err) @@ -235,11 +231,11 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -255,23 +251,23 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -282,7 +278,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) @@ -301,20 +297,20 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) - delete(rawMsg, key) + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", t, err) @@ -323,7 +319,7 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -333,8 +329,8 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { return nil } if err := json.Unmarshal(data, v); err != nil { @@ -342,4 +338,3 @@ func unpopulate(data json.RawMessage, fn string, v interface{}) error { } return nil } - diff --git a/pkg/cli/clients_new/generated/zz_generated_options.go b/pkg/cli/clients_new/generated/zz_generated_options.go new file mode 100644 index 0000000000..828a569131 --- /dev/null +++ b/pkg/cli/clients_new/generated/zz_generated_options.go @@ -0,0 +1,34 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package generated + +// GenericResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the GenericResourcesClient.BeginCreateOrUpdate +// method. +type GenericResourcesClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// GenericResourcesClientBeginDeleteOptions contains the optional parameters for the GenericResourcesClient.BeginDelete method. +type GenericResourcesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// GenericResourcesClientGetOptions contains the optional parameters for the GenericResourcesClient.Get method. +type GenericResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// GenericResourcesClientListByRootScopeOptions contains the optional parameters for the GenericResourcesClient.NewListByRootScopePager +// method. +type GenericResourcesClientListByRootScopeOptions struct { + // placeholder for future optional parameters +} + +// GenericResourcesClientListSecretsOptions contains the optional parameters for the GenericResourcesClient.ListSecrets method. +type GenericResourcesClientListSecretsOptions struct { + // placeholder for future optional parameters +} diff --git a/pkg/cli/clients_new/generated/zz_generated_response_types.go b/pkg/cli/clients_new/generated/zz_generated_responses.go similarity index 74% rename from pkg/cli/clients_new/generated/zz_generated_response_types.go rename to pkg/cli/clients_new/generated/zz_generated_responses.go index 28bb86059f..18e6e45590 100644 --- a/pkg/cli/clients_new/generated/zz_generated_response_types.go +++ b/pkg/cli/clients_new/generated/zz_generated_responses.go @@ -1,30 +1,29 @@ -//go:build go1.18 -// +build go1.18 - // Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package generated -// GenericResourcesClientCreateOrUpdateResponse contains the response from method GenericResourcesClient.CreateOrUpdate. +// GenericResourcesClientCreateOrUpdateResponse contains the response from method GenericResourcesClient.BeginCreateOrUpdate. type GenericResourcesClientCreateOrUpdateResponse struct { + // Generic resource GenericResource } -// GenericResourcesClientDeleteResponse contains the response from method GenericResourcesClient.Delete. +// GenericResourcesClientDeleteResponse contains the response from method GenericResourcesClient.BeginDelete. type GenericResourcesClientDeleteResponse struct { // placeholder for future response values } // GenericResourcesClientGetResponse contains the response from method GenericResourcesClient.Get. type GenericResourcesClientGetResponse struct { + // Generic resource GenericResource } -// GenericResourcesClientListByRootScopeResponse contains the response from method GenericResourcesClient.ListByRootScope. +// GenericResourcesClientListByRootScopeResponse contains the response from method GenericResourcesClient.NewListByRootScopePager. type GenericResourcesClientListByRootScopeResponse struct { + // Object that includes an array of GenericResources and a possible link for next set GenericResourcesList } @@ -33,4 +32,3 @@ type GenericResourcesClientListSecretsResponse struct { // Response to a list secrets request Value map[string]*string } - diff --git a/pkg/cli/clients_new/generated/zz_generated_time_rfc3339.go b/pkg/cli/clients_new/generated/zz_generated_time_rfc3339.go index d74e253cdf..1be5e2441e 100644 --- a/pkg/cli/clients_new/generated/zz_generated_time_rfc3339.go +++ b/pkg/cli/clients_new/generated/zz_generated_time_rfc3339.go @@ -1,15 +1,9 @@ -//go:build go1.18 -// +build go1.18 - // Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package generated - - import ( "encoding/json" "fmt" @@ -20,53 +14,77 @@ import ( "time" ) - +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` ) -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -75,14 +93,14 @@ func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/pkg/cli/clients_new/generated/zz_generated_version.go b/pkg/cli/clients_new/generated/zz_generated_version.go new file mode 100644 index 0000000000..108e8da7ca --- /dev/null +++ b/pkg/cli/clients_new/generated/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package generated + +const ( + moduleName = "github.com/radius-project/radius/pkg/cli/clients_new/generated" + moduleVersion = "v0.1.0" +) diff --git a/pkg/cli/clivalidation.go b/pkg/cli/clivalidation.go index 5f85d2d798..f49de4d353 100644 --- a/pkg/cli/clivalidation.go +++ b/pkg/cli/clivalidation.go @@ -616,6 +616,16 @@ func RequireRecipeNameArgs(cmd *cobra.Command, args []string) (string, error) { return args[0], nil } +// RequireRecipePackNameArgs checks if the provided arguments contain at least one string, and if not, returns an error. If the +// +// arguments contain a string, it is returned. +func RequireRecipePackNameArgs(cmd *cobra.Command, args []string) (string, error) { + if len(args) < 1 { + return "", errors.New("no recipe pack name provided") + } + return args[0], nil +} + // GetResourceType retrieves the resource type flag from the given command and returns it, or an error if the flag is not set. func GetResourceType(cmd *cobra.Command) (string, error) { resourceType, err := cmd.Flags().GetString(ResourceTypeFlag) diff --git a/pkg/cli/cmd/commonflags/flags.go b/pkg/cli/cmd/commonflags/flags.go index d461cef6db..487039e814 100644 --- a/pkg/cli/cmd/commonflags/flags.go +++ b/pkg/cli/cmd/commonflags/flags.go @@ -45,6 +45,11 @@ func AddOutputFlag(cmd *cobra.Command) { cmd.Flags().StringP("output", "o", output.DefaultFormat, description) } +func AddOutputFlagWithPlainText(cmd *cobra.Command) { + description := fmt.Sprintf("output format (supported formats are %s)", strings.Join([]string{output.FormatPlainText, output.FormatJson}, ", ")) + cmd.Flags().StringP("output", "o", output.FormatPlainText, description) +} + // AddWorkspaceFlag adds a flag to the given command that allows the user to specify a workspace name. func AddWorkspaceFlag(cmd *cobra.Command) { cmd.Flags().StringP("workspace", "w", "", "The workspace name") diff --git a/pkg/cli/cmd/credential/show/show_test.go b/pkg/cli/cmd/credential/show/show_test.go index 6b19dde06b..1a5eb016de 100644 --- a/pkg/cli/cmd/credential/show/show_test.go +++ b/pkg/cli/cmd/credential/show/show_test.go @@ -151,6 +151,55 @@ func Test_Run(t *testing.T) { } require.Equal(t, expected, outputSink.Writes) }) + + t.Run("Azure WorkloadIdentity - Exists", func(t *testing.T) { + ctrl := gomock.NewController(t) + + provider := cli_credential.ProviderCredentialConfiguration{ + CloudProviderStatus: cli_credential.CloudProviderStatus{ + Name: "azure", + Enabled: true, + }, + AzureCredentials: &cli_credential.AzureCredentialProperties{ + Kind: to.Ptr("WorkloadIdentity"), + }, + } + + client := cli_credential.NewMockCredentialManagementClient(ctrl) + client.EXPECT(). + Get(gomock.Any(), "azure"). + Return(provider, nil). + Times(1) + + outputSink := &output.MockOutput{} + + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{CredentialManagementClient: client}, + Output: outputSink, + Workspace: &workspaces.Workspace{Connection: connection}, + Kind: "azure", + Format: "table", + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + credentialFormatOutput := credentialFormatAzureWorkloadIdentity() + + expected := []any{ + output.LogOutput{ + Format: "Showing credential for cloud provider %q for Radius installation %q...", + Params: []any{"azure", "Kubernetes (context=my-context)"}, + }, + output.FormattedOutput{ + Format: "table", + Obj: provider, + Options: credentialFormatOutput, + }, + } + require.Equal(t, expected, outputSink.Writes) + }) + t.Run("Not Found", func(t *testing.T) { ctrl := gomock.NewController(t) diff --git a/pkg/cli/cmd/recipepack/delete/delete.go b/pkg/cli/cmd/recipepack/delete/delete.go new file mode 100644 index 0000000000..7a79d4492c --- /dev/null +++ b/pkg/cli/cmd/recipepack/delete/delete.go @@ -0,0 +1,159 @@ +/* +Copyright 2023 The Radius Authors. + +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 delete + +import ( + "context" + "fmt" + + "github.com/spf13/cobra" + + "github.com/radius-project/radius/pkg/cli" + "github.com/radius-project/radius/pkg/cli/clients" + "github.com/radius-project/radius/pkg/cli/cmd/commonflags" + "github.com/radius-project/radius/pkg/cli/connections" + "github.com/radius-project/radius/pkg/cli/framework" + "github.com/radius-project/radius/pkg/cli/output" + "github.com/radius-project/radius/pkg/cli/prompt" + "github.com/radius-project/radius/pkg/cli/workspaces" +) + +const ( + deleteConfirmationMsg = "Are you sure you want to delete recipe pack '%s'?" + msgDeletingRecipePack = "Deleting recipe pack %s...\n" + msgRecipePackDeleted = "Recipe pack %s deleted." + msgRecipePackNotFound = "Recipe pack %s does not exist or has already been deleted." + msgRecipePackNotDeleted = "Recipe pack %q NOT deleted" +) + +// NewCommand creates a new Cobra command for deleting a recipe pack. +func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) { + runner := NewRunner(factory) + + cmd := &cobra.Command{ + Use: "delete", + Short: "Delete recipe pack", + Long: "Delete a recipe pack from the current workspace scope.", + Args: cobra.ExactArgs(1), + Example: ` +# Delete specified recipe pack +rad recipe-pack delete my-recipe-pack + +# Delete recipe pack in a specified resource group +rad recipe-pack delete my-recipe-pack --group my-group + +# Delete recipe pack and bypass confirmation prompt +rad recipe-pack delete my-recipe-pack --yes +`, + RunE: framework.RunCommand(runner), + } + + commonflags.AddWorkspaceFlag(cmd) + commonflags.AddResourceGroupFlag(cmd) + commonflags.AddConfirmationFlag(cmd) + + return cmd, runner +} + +// Runner executes the recipe pack delete command. +type Runner struct { + ConfigHolder *framework.ConfigHolder + ConnectionFactory connections.Factory + Workspace *workspaces.Workspace + Output output.Interface + InputPrompter prompt.Interface + + RecipePackName string + Confirm bool +} + +// NewRunner creates a new instance of the recipe pack delete runner. +func NewRunner(factory framework.Factory) *Runner { + return &Runner{ + ConfigHolder: factory.GetConfigHolder(), + ConnectionFactory: factory.GetConnectionFactory(), + Output: factory.GetOutput(), + InputPrompter: factory.GetPrompter(), + } +} + +// Validate ensures command arguments and flags are correct before execution. +func (r *Runner) Validate(cmd *cobra.Command, args []string) error { + workspace, err := cli.RequireWorkspace(cmd, r.ConfigHolder.Config, r.ConfigHolder.DirectoryConfig) + if err != nil { + return err + } + r.Workspace = workspace + + scope, err := cli.RequireScope(cmd, *r.Workspace) + if err != nil { + return err + } + r.Workspace.Scope = scope + + recipePackName, err := cli.RequireRecipePackNameArgs(cmd, args) + if err != nil { + return err + } + r.RecipePackName = recipePackName + + r.Confirm, err = cmd.Flags().GetBool("yes") + if err != nil { + return err + } + + return nil +} + +// Run performs the delete operation for the recipe pack. +func (r *Runner) Run(ctx context.Context) error { + client, err := r.ConnectionFactory.CreateApplicationsManagementClient(ctx, *r.Workspace) + if err != nil { + return err + } + + if !r.Confirm { + confirmed, err := prompt.YesOrNoPrompt(fmt.Sprintf(deleteConfirmationMsg, r.RecipePackName), prompt.ConfirmNo, r.InputPrompter) + if err != nil { + return err + } + + if !confirmed { + r.Output.LogInfo(msgRecipePackNotDeleted, r.RecipePackName) + return nil + } + } + + r.Output.LogInfo(msgDeletingRecipePack, r.RecipePackName) + + deleted, err := client.DeleteRecipePack(ctx, r.RecipePackName) + if err != nil { + if clients.Is404Error(err) { + r.Output.LogInfo(msgRecipePackNotFound, r.RecipePackName) + return nil + } + return fmt.Errorf("failed to delete resource group %s: %w", r.RecipePackName, err) + } + + if deleted { + r.Output.LogInfo(msgRecipePackDeleted, r.RecipePackName) + } else { + r.Output.LogInfo(msgRecipePackNotFound, r.RecipePackName) + } + + return nil +} diff --git a/pkg/cli/cmd/recipepack/delete/delete_test.go b/pkg/cli/cmd/recipepack/delete/delete_test.go new file mode 100644 index 0000000000..c22a2afc84 --- /dev/null +++ b/pkg/cli/cmd/recipepack/delete/delete_test.go @@ -0,0 +1,203 @@ +/* +Copyright 2023 The Radius Authors. + +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 delete + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + v1 "github.com/radius-project/radius/pkg/armrpc/api/v1" + "github.com/radius-project/radius/pkg/cli/clients" + "github.com/radius-project/radius/pkg/cli/connections" + "github.com/radius-project/radius/pkg/cli/framework" + "github.com/radius-project/radius/pkg/cli/output" + "github.com/radius-project/radius/pkg/cli/prompt" + "github.com/radius-project/radius/pkg/cli/workspaces" + "github.com/radius-project/radius/test/radcli" +) + +func Test_CommandValidation(t *testing.T) { + radcli.SharedCommandValidation(t, NewCommand) +} + +func Test_Validate(t *testing.T) { + configWithWorkspace := radcli.LoadConfigWithWorkspace(t) + + testcases := []radcli.ValidateInput{ + { + Name: "Missing recipe pack name", + Input: []string{}, + ExpectedValid: false, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "Valid with workspace flag", + Input: []string{"my-pack", "-w", radcli.TestWorkspaceName}, + ExpectedValid: true, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "Valid with group fallback", + Input: []string{"--group", "test-group", "my-pack"}, + ExpectedValid: true, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: radcli.LoadEmptyConfig(t), + }, + }, + } + + radcli.SharedValidateValidation(t, NewCommand, testcases) +} + +func Test_Run(t *testing.T) { + t.Parallel() + + cases := []struct { + name string + confirm bool + promptChoice string + expectDelete bool + deleteReturn bool + deleteErr error + workspaceScope string + expectedLogs []output.LogOutput + expectedErrMsg string + }{ + { + name: "confirm flag bypasses prompt", + confirm: true, + expectDelete: true, + deleteReturn: true, + workspaceScope: "/planes/radius/local/resourceGroups/test-group", + expectedLogs: []output.LogOutput{ + {Format: msgDeletingRecipePack, Params: []any{"sample-pack"}}, + {Format: msgRecipePackDeleted, Params: []any{"sample-pack"}}, + }, + }, + { + name: "prompt confirms deletion", + confirm: false, + promptChoice: prompt.ConfirmYes, + expectDelete: true, + deleteReturn: true, + workspaceScope: "/planes/radius/local/resourceGroups/test-group", + expectedLogs: []output.LogOutput{ + {Format: msgDeletingRecipePack, Params: []any{"sample-pack"}}, + {Format: msgRecipePackDeleted, Params: []any{"sample-pack"}}, + }, + }, + { + name: "prompt declines deletion", + confirm: false, + promptChoice: prompt.ConfirmNo, + expectDelete: false, + workspaceScope: "/planes/radius/local/resourceGroups/test-group", + expectedLogs: []output.LogOutput{ + {Format: msgRecipePackNotDeleted, Params: []any{"sample-pack"}}, + }, + }, + { + name: "delete returns not found", + confirm: true, + expectDelete: true, + deleteReturn: false, + workspaceScope: "/planes/radius/local", + expectedLogs: []output.LogOutput{ + {Format: msgDeletingRecipePack, Params: []any{"sample-pack"}}, + {Format: msgRecipePackNotFound, Params: []any{"sample-pack"}}, + }, + }, + { + name: "delete returns error", + confirm: true, + expectDelete: true, + deleteReturn: false, + deleteErr: fmt.Errorf("error"), + workspaceScope: "/planes/radius/local", + expectedErrMsg: "failed to delete resource group sample-pack: error", + expectedLogs: []output.LogOutput{ + {Format: msgDeletingRecipePack, Params: []any{"sample-pack"}}, + }, + }, + { + name: "delete returns 404", + confirm: true, + expectDelete: true, + deleteReturn: false, + deleteErr: &azcore.ResponseError{StatusCode: 404, ErrorCode: v1.CodeNotFound}, + workspaceScope: "/planes/radius/local", + expectedLogs: []output.LogOutput{ + {Format: msgDeletingRecipePack, Params: []any{"sample-pack"}}, + {Format: msgRecipePackNotFound, Params: []any{"sample-pack"}}, + }, + }, + } + + for _, tc := range cases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + promptMock := prompt.NewMockInterface(ctrl) + if !tc.confirm { + promptMock.EXPECT().GetListInput([]string{prompt.ConfirmNo, prompt.ConfirmYes}, fmt.Sprintf(deleteConfirmationMsg, "sample-pack")).Return(tc.promptChoice, nil) + } + + appMgmtClient := clients.NewMockApplicationsManagementClient(ctrl) + if tc.expectDelete { + appMgmtClient.EXPECT().DeleteRecipePack(gomock.Any(), "sample-pack").Return(tc.deleteReturn, tc.deleteErr) + } + + outputSink := &output.MockOutput{} + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appMgmtClient}, + Workspace: &workspaces.Workspace{Name: "test", Scope: tc.workspaceScope}, + Output: outputSink, + InputPrompter: promptMock, + RecipePackName: "sample-pack", + Confirm: tc.confirm, + } + + err := runner.Run(context.Background()) + if tc.expectedErrMsg != "" { + require.Error(t, err) + require.EqualError(t, err, tc.expectedErrMsg) + } else { + require.NoError(t, err) + } + + expected := make([]any, len(tc.expectedLogs)) + for i, log := range tc.expectedLogs { + expected[i] = log + } + require.Equal(t, expected, outputSink.Writes) + }) + } +} diff --git a/pkg/cli/cmd/recipepack/list/list.go b/pkg/cli/cmd/recipepack/list/list.go new file mode 100644 index 0000000000..bec791125e --- /dev/null +++ b/pkg/cli/cmd/recipepack/list/list.go @@ -0,0 +1,132 @@ +/* +Copyright 2023 The Radius Authors. + +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 list + +import ( + "context" + + "github.com/radius-project/radius/pkg/cli" + "github.com/radius-project/radius/pkg/cli/cmd/commonflags" + "github.com/radius-project/radius/pkg/cli/connections" + "github.com/radius-project/radius/pkg/cli/framework" + "github.com/radius-project/radius/pkg/cli/objectformats" + "github.com/radius-project/radius/pkg/cli/output" + "github.com/radius-project/radius/pkg/cli/workspaces" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + "github.com/spf13/cobra" +) + +// NewCommand creates an instance of the command and runner for the `rad recipe-pack list` command. +// + +// NewCommand creates a new Cobra command and a Runner object, configures the command with flags and arguments, and +// returns the command and the runner. +func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) { + runner := NewRunner(factory) + + cmd := &cobra.Command{ + Use: "list", + Short: "List recipe packs", + Long: "Lists all recipe packs in all scopes", + Example: `rad recipe-packs list`, + RunE: framework.RunCommand(runner), + Args: cobra.ExactArgs(0), + } + + commonflags.AddOutputFlag(cmd) + commonflags.AddWorkspaceFlag(cmd) + commonflags.AddResourceGroupFlag(cmd) + + return cmd, runner +} + +// Runner is the runner implementation for the `rad recipe list` command. +type Runner struct { + ConfigHolder *framework.ConfigHolder + ConnectionFactory connections.Factory + Output output.Interface + Workspace *workspaces.Workspace + Format string + Group string +} + +// NewRunner creates a new instance of the `rad recipe list` runner. +func NewRunner(factory framework.Factory) *Runner { + return &Runner{ + ConfigHolder: factory.GetConfigHolder(), + ConnectionFactory: factory.GetConnectionFactory(), + Output: factory.GetOutput(), + } +} + +// Validate runs validation for the `rad recipe-pack list` command. +// + +// Validate checks the command line arguments for a workspace, environment name, and output format, and sets the corresponding +// fields in the Runner struct if they are valid. If any of the arguments are invalid, an error is returned. +func (r *Runner) Validate(cmd *cobra.Command, args []string) error { + // Validate command line args + workspace, err := cli.RequireWorkspace(cmd, r.ConfigHolder.Config, r.ConfigHolder.DirectoryConfig) + if err != nil { + return err + } + r.Workspace = workspace + + r.Group, err = cmd.Flags().GetString("group") + if err != nil { + return err + } + + // Allow '--group' to override scope + scope, err := cli.RequireScope(cmd, *r.Workspace) + if err != nil { + return err + } + r.Workspace.Scope = scope + + format, err := cli.RequireOutput(cmd) + if err != nil { + return err + } + r.Format = format + + return nil +} + +// Run runs the `rad recipe-pack list` command. +// +// Run retrieves recipe packs from the given workspace and writes them to the output in the specified format. +// It returns an error if the connection to the workspace fails or if there is an error writing to the output. +func (r *Runner) Run(ctx context.Context) error { + client, err := r.ConnectionFactory.CreateApplicationsManagementClient(ctx, *r.Workspace) + if err != nil { + return err + } + + var recipePacks []v20250801preview.RecipePackResource + if r.Group != "" { + recipePacks, err = client.ListRecipePacksInResourceGroup(ctx) + } else { + recipePacks, err = client.ListRecipePacks(ctx) + } + + if err != nil { + return err + } + + return r.Output.WriteFormatted(r.Format, recipePacks, objectformats.GetRecipePackTableFormat()) +} diff --git a/pkg/cli/cmd/recipepack/list/list_test.go b/pkg/cli/cmd/recipepack/list/list_test.go new file mode 100644 index 0000000000..22690ce7ba --- /dev/null +++ b/pkg/cli/cmd/recipepack/list/list_test.go @@ -0,0 +1,130 @@ +/* +Copyright 2023 The Radius Authors. + +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 list + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/radius-project/radius/pkg/cli/clients" + "github.com/radius-project/radius/pkg/cli/connections" + "github.com/radius-project/radius/pkg/cli/framework" + "github.com/radius-project/radius/pkg/cli/objectformats" + "github.com/radius-project/radius/pkg/cli/output" + "github.com/radius-project/radius/pkg/cli/workspaces" + corerpv20250801 "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + "github.com/radius-project/radius/pkg/to" + "github.com/radius-project/radius/test/radcli" +) + +func Test_CommandValidation(t *testing.T) { + radcli.SharedCommandValidation(t, NewCommand) +} + +func Test_Validate(t *testing.T) { + configWithWorkspace := radcli.LoadConfigWithWorkspace(t) + + testcases := []radcli.ValidateInput{ + { + Name: "List Command with incorrect args", + Input: []string{"too-many"}, + ExpectedValid: false, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "List Command with workspace flag pointing to missing workspace", + Input: []string{"-w", "doesnotexist"}, + ExpectedValid: false, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "List Command with valid workspace specified", + Input: []string{"-w", radcli.TestWorkspaceName}, + ExpectedValid: true, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "List Command with fallback workspace", + Input: []string{"--group", "test-group"}, + ExpectedValid: true, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: radcli.LoadEmptyConfig(t), + }, + }, + } + + radcli.SharedValidateValidation(t, NewCommand, testcases) +} + +func Test_Run(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + recipePacks := []corerpv20250801.RecipePackResource{ + {Name: to.Ptr("pack-a")}, + {Name: to.Ptr("pack-b")}, + } + + appMgmtClient := clients.NewMockApplicationsManagementClient(ctrl) + appMgmtClient.EXPECT(). + ListRecipePacks(gomock.Any()). + Return(recipePacks, nil). + Times(1) + + workspace := &workspaces.Workspace{ + Connection: map[string]any{ + "kind": "kubernetes", + "context": "kind-kind", + }, + Name: "kind-kind", + Scope: "/planes/radius/local/resourceGroups/test-group", + } + + outputSink := &output.MockOutput{} + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appMgmtClient}, + Workspace: workspace, + Format: "table", + Output: outputSink, + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + expected := []any{ + output.FormattedOutput{ + Format: "table", + Obj: recipePacks, + Options: objectformats.GetRecipePackTableFormat(), + }, + } + + require.Equal(t, expected, outputSink.Writes) +} diff --git a/pkg/cli/cmd/recipepack/show/display.go b/pkg/cli/cmd/recipepack/show/display.go new file mode 100644 index 0000000000..5f6d949d64 --- /dev/null +++ b/pkg/cli/cmd/recipepack/show/display.go @@ -0,0 +1,116 @@ +/* +Copyright 2023 The Radius Authors. + +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 show + +import ( + "encoding/json" + "fmt" + "sort" + "strings" + + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + "sigs.k8s.io/yaml" +) + +func (r *Runner) display(recipePack v20250801preview.RecipePackResource) error { + if recipePack.Properties == nil || recipePack.Properties.Recipes == nil || len(recipePack.Properties.Recipes) == 0 { + r.Output.LogInfo("\nRECIPES: none") + return nil + } + + r.Output.LogInfo("\nRECIPES:") + + resourceTypes := make([]string, 0, len(recipePack.Properties.Recipes)) + for resourceType := range recipePack.Properties.Recipes { + resourceTypes = append(resourceTypes, resourceType) + } + sort.Strings(resourceTypes) + + for idx, resourceType := range resourceTypes { + definition := recipePack.Properties.Recipes[resourceType] + if definition == nil { + continue + } + + kind := "unknown" + if definition.RecipeKind != nil { + kind = string(*definition.RecipeKind) + } + + location := "" + if definition.RecipeLocation != nil { + location = *definition.RecipeLocation + } + + r.Output.LogInfo("%s", resourceType) + r.Output.LogInfo(" Kind: %s", kind) + r.Output.LogInfo(" Location: %s", location) + + if len(definition.Parameters) > 0 { + formatted, err := formatRecipeParameters(definition.Parameters) + if err != nil { + return fmt.Errorf("format recipe parameters: %w", err) + } + if formatted != "" { + r.Output.LogInfo(" Parameters:") + r.Output.LogInfo("%s", indentLines(formatted, " ")) + } + } + + if idx < len(resourceTypes)-1 { + r.Output.LogInfo("") + } + } + + return nil +} + +// formatRecipeParameters renders the parameters map without JSON braces/quotes. +func formatRecipeParameters(params map[string]any) (string, error) { + raw, err := json.Marshal(params) + if err != nil { + return "", err + } + + var normalized map[string]any + if err := json.Unmarshal(raw, &normalized); err != nil { + return "", err + } + if len(normalized) == 0 { + return "", nil + } + + out, err := yaml.Marshal(normalized) + if err != nil { + return "", err + } + + return strings.TrimSpace(string(out)), nil +} + +// indentLines prefixes each line with the provided indent string. +func indentLines(text, indent string) string { + if text == "" { + return "" + } + + lines := strings.Split(text, "\n") + for i, line := range lines { + lines[i] = indent + line + } + return strings.Join(lines, "\n") +} diff --git a/pkg/cli/cmd/recipepack/show/show.go b/pkg/cli/cmd/recipepack/show/show.go new file mode 100644 index 0000000000..5c498a26cf --- /dev/null +++ b/pkg/cli/cmd/recipepack/show/show.go @@ -0,0 +1,150 @@ +/* +Copyright 2023 The Radius Authors. + +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 show + +import ( + "context" + + "github.com/radius-project/radius/pkg/cli" + "github.com/radius-project/radius/pkg/cli/clients" + "github.com/radius-project/radius/pkg/cli/clierrors" + "github.com/radius-project/radius/pkg/cli/cmd/commonflags" + "github.com/radius-project/radius/pkg/cli/connections" + "github.com/radius-project/radius/pkg/cli/framework" + "github.com/radius-project/radius/pkg/cli/objectformats" + "github.com/radius-project/radius/pkg/cli/output" + "github.com/radius-project/radius/pkg/cli/workspaces" + "github.com/spf13/cobra" +) + +// NewCommand creates a new Cobra command and a Runner object to show recipe pack details, with flags for workspace, +// resource group and output. +func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) { + runner := NewRunner(factory) + + cmd := &cobra.Command{ + Use: "show", + Short: "Show recipe pack details", + Long: `Show recipe pack details`, + Args: cobra.ExactArgs(1), + Example: ` + +# Show specified recipe pack +rad recipe-show show my-recipe-pack + +# Show specified recipe pack in a specified resource group +rad recipe-show show my-recipe-pack --group my-group +`, + RunE: framework.RunCommand(runner), + } + + commonflags.AddOutputFlagWithPlainText(cmd) + commonflags.AddResourceGroupFlag(cmd) + commonflags.AddWorkspaceFlag(cmd) + + return cmd, runner +} + +// Runner is the runner implementation for the `rad recipe-pack show` command. +type Runner struct { + ConfigHolder *framework.ConfigHolder + ConnectionFactory connections.Factory + Workspace *workspaces.Workspace + Output output.Interface + Format string + RecipePackName string +} + +// NewRunner creates a new instance of the `rad recipe-pack show` runner. +func NewRunner(factory framework.Factory) *Runner { + return &Runner{ + ConnectionFactory: factory.GetConnectionFactory(), + ConfigHolder: factory.GetConfigHolder(), + Output: factory.GetOutput(), + } +} + +// Validate runs validation for the `rad recipe-pack show` command. +// +// Validate checks the request object for a workspace, scope, recipe pack name, and output format, and sets the +// corresponding fields in the Runner struct if they are found. If any of these fields are not found, an error is returned. +func (r *Runner) Validate(cmd *cobra.Command, args []string) error { + workspace, err := cli.RequireWorkspace(cmd, r.ConfigHolder.Config, r.ConfigHolder.DirectoryConfig) + if err != nil { + return err + } + r.Workspace = workspace + + // Allow '--group' to override scope + scope, err := cli.RequireScope(cmd, *r.Workspace) + if err != nil { + return err + } + r.Workspace.Scope = scope + + recipePackName, err := cli.RequireRecipePackNameArgs(cmd, args) + if err != nil { + return err + } + r.RecipePackName = recipePackName + + format, err := cli.RequireOutput(cmd) + if err != nil { + return err + } + + r.Format = format + + return nil +} + +// Run runs the `rad recipe-pack show` command. +// + +// Run attempts to retrieve recipe pack details from an ApplicationsManagementClient and write the details to an +// output in a specified format, returning an error if any of these operations fail. +func (r *Runner) Run(ctx context.Context) error { + client, err := r.ConnectionFactory.CreateApplicationsManagementClient(ctx, *r.Workspace) + if err != nil { + return err + } + + recipePack, err := client.GetRecipePack(ctx, r.RecipePackName) + if clients.Is404Error(err) { + return clierrors.Message("The recipe pack %q was not found or has been deleted.", r.RecipePackName) + } else if err != nil { + return err + } + + if r.Format != "json" { + err = r.Output.WriteFormatted(output.FormatTable, recipePack, objectformats.GetRecipePackTableFormat()) + if err != nil { + return err + } + err = r.display(recipePack) + if err != nil { + return err + } + } else { + err = r.Output.WriteFormatted(r.Format, recipePack, objectformats.GetRecipePackTableFormat()) + if err != nil { + return err + } + } + + return nil +} diff --git a/pkg/cli/cmd/recipepack/show/show_test.go b/pkg/cli/cmd/recipepack/show/show_test.go new file mode 100644 index 0000000000..c992be240c --- /dev/null +++ b/pkg/cli/cmd/recipepack/show/show_test.go @@ -0,0 +1,140 @@ +/* +Copyright 2023 The Radius Authors. + +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 show + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/radius-project/radius/pkg/cli/clients" + "github.com/radius-project/radius/pkg/cli/connections" + "github.com/radius-project/radius/pkg/cli/framework" + "github.com/radius-project/radius/pkg/cli/objectformats" + "github.com/radius-project/radius/pkg/cli/output" + "github.com/radius-project/radius/pkg/cli/workspaces" + corerpv20250801preview "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + "github.com/radius-project/radius/pkg/to" + "github.com/radius-project/radius/test/radcli" +) + +func Test_CommandValidation(t *testing.T) { + radcli.SharedCommandValidation(t, NewCommand) +} + +func Test_Validate(t *testing.T) { + configWithWorkspace := radcli.LoadConfigWithWorkspace(t) + + testcases := []radcli.ValidateInput{ + { + Name: "missing recipe pack name", + Input: []string{}, + ExpectedValid: false, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "invalid workspace reference", + Input: []string{"my-pack", "-w", "doesnotexist"}, + ExpectedValid: false, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "valid with workspace flag", + Input: []string{"my-pack", "-w", radcli.TestWorkspaceName}, + ExpectedValid: true, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "valid with fallback workspace", + Input: []string{"my-pack", "--group", "test-group"}, + ExpectedValid: true, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: radcli.LoadEmptyConfig(t), + }, + }, + } + + radcli.SharedValidateValidation(t, NewCommand, testcases) +} + +func Test_Run(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + recipePack := corerpv20250801preview.RecipePackResource{ + Name: to.Ptr("sample-pack"), + Properties: &corerpv20250801preview.RecipePackProperties{ + Recipes: map[string]*corerpv20250801preview.RecipeDefinition{ + "Radius.Core/example": { + RecipeKind: to.Ptr(corerpv20250801preview.RecipeKindTerraform), + RecipeLocation: to.Ptr("https://github.com/radius-project/example"), + Parameters: map[string]any{ + "foo": "bar", + }, + }, + }, + }, + } + + appMgmtClient := clients.NewMockApplicationsManagementClient(ctrl) + appMgmtClient.EXPECT(). + GetRecipePack(gomock.Any(), "sample-pack"). + Return(recipePack, nil). + Times(1) + + workspace := &workspaces.Workspace{ + Connection: map[string]any{ + "kind": "kubernetes", + "context": "kind-kind", + }, + Name: "kind-kind", + Scope: "/planes/radius/local/resourceGroups/test-group", + } + + outputSink := &output.MockOutput{} + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appMgmtClient}, + Workspace: workspace, + Output: outputSink, + RecipePackName: "sample-pack", + Format: "json", + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + expected := []any{ + output.FormattedOutput{ + Format: "json", + Obj: recipePack, + Options: objectformats.GetRecipePackTableFormat(), + }, + } + + require.Equal(t, expected, outputSink.Writes) +} diff --git a/pkg/cli/cmd/workspace/show/show.go b/pkg/cli/cmd/workspace/show/show.go index ce245732a7..804d334c6e 100644 --- a/pkg/cli/cmd/workspace/show/show.go +++ b/pkg/cli/cmd/workspace/show/show.go @@ -82,10 +82,6 @@ func (r *Runner) Validate(cmd *cobra.Command, args []string) error { return err } - if !workspace.IsNamedWorkspace() { - return workspaces.ErrEditableWorkspaceRequired - } - format, err := cli.RequireOutput(cmd) if err != nil { return err @@ -99,10 +95,10 @@ func (r *Runner) Validate(cmd *cobra.Command, args []string) error { // Run runs the `rad workspace show` command. func (r *Runner) Run(ctx context.Context) error { - err := r.Output.WriteFormatted(r.Format, r.Workspace, common.WorkspaceFormat()) - if err != nil { - return err + if !r.Workspace.IsNamedWorkspace() { + r.Output.LogInfo("There is no workspace currently set. Use `rad workspace switch` or `rad workspace create kubernetes` to set a current workspace.") + return nil } - return nil + return r.Output.WriteFormatted(r.Format, r.Workspace, common.WorkspaceFormat()) } diff --git a/pkg/cli/cmd/workspace/show/show_test.go b/pkg/cli/cmd/workspace/show/show_test.go index e0d9a97c0d..2c2f81cf02 100644 --- a/pkg/cli/cmd/workspace/show/show_test.go +++ b/pkg/cli/cmd/workspace/show/show_test.go @@ -45,7 +45,7 @@ func Test_Validate(t *testing.T) { { Name: "show fallback workspace", Input: []string{}, - ExpectedValid: false, + ExpectedValid: true, ConfigHolder: framework.ConfigHolder{Config: radcli.LoadEmptyConfig(t)}, }, { @@ -90,6 +90,7 @@ func Test_Run(t *testing.T) { ConfigHolder: &framework.ConfigHolder{}, Output: outputSink, Workspace: &workspaces.Workspace{ + Source: workspaces.SourceUserConfig, Name: "test-workspace", Environment: "test-environment", Connection: map[string]any{}, @@ -103,6 +104,7 @@ func Test_Run(t *testing.T) { output.FormattedOutput{ Format: "", Obj: &workspaces.Workspace{ + Source: workspaces.SourceUserConfig, Name: "test-workspace", Environment: "test-environment", Connection: map[string]any{}, @@ -127,10 +129,8 @@ func Test_Run(t *testing.T) { require.NoError(t, err) expected := []any{ - output.FormattedOutput{ - Format: "", - Obj: runner.Workspace, - Options: common.WorkspaceFormat(), + output.LogOutput{ + Format: "There is no workspace currently set. Use `rad workspace switch` or `rad workspace create kubernetes` to set a current workspace.", }, } diff --git a/pkg/cli/credential/azure_credential_management.go b/pkg/cli/credential/azure_credential_management.go index 2c121019d4..5e51964bc7 100644 --- a/pkg/cli/credential/azure_credential_management.go +++ b/pkg/cli/credential/azure_credential_management.go @@ -138,6 +138,7 @@ func (cpm *AzureCredentialManagementClient) Get(ctx context.Context, credentialN Enabled: true, }, AzureCredentials: &AzureCredentialProperties{ + Kind: (*string)(azureServicePrincipal.Kind), ServicePrincipal: &AzureServicePrincipalCredentialProperties{ ClientID: azureServicePrincipal.ClientID, Kind: (*string)(azureServicePrincipal.Kind), @@ -159,6 +160,7 @@ func (cpm *AzureCredentialManagementClient) Get(ctx context.Context, credentialN Enabled: true, }, AzureCredentials: &AzureCredentialProperties{ + Kind: (*string)(azureWorkloadIdentity.Kind), WorkloadIdentity: &AzureWorkloadIdentityCredentialProperties{ ClientID: azureWorkloadIdentity.ClientID, Kind: (*string)(azureWorkloadIdentity.Kind), diff --git a/pkg/cli/objectformats/objectformats.go b/pkg/cli/objectformats/objectformats.go index 6735457982..8727ed195d 100644 --- a/pkg/cli/objectformats/objectformats.go +++ b/pkg/cli/objectformats/objectformats.go @@ -46,6 +46,60 @@ func GetResourceTableFormat() output.FormatterOptions { } } +func GetRecipePackTableFormat() output.FormatterOptions { + return output.FormatterOptions{ + Columns: []output.Column{ + { + Heading: "RECIPE PACK", + JSONPath: "{ .Name }", + }, + { + Heading: "GROUP", + JSONPath: "{ .ID }", + Transformer: &ResourceIDToResourceGroupNameTransformer{}, + }, + }, + } +} + +func GetRecipeFormat() output.FormatterOptions { + return output.FormatterOptions{ + Columns: []output.Column{ + { + Heading: "RESOURCE TYPE", + JSONPath: "{ .ResourceType }", + }, + { + Heading: "RECIPE KIND", + JSONPath: "{ .RecipeKind }", + }, + { + Heading: "RECIPE LOCATION", + JSONPath: "{ .RecipeLocation }", + }, + }, + } +} + +func GetRecipeFormatWithoutHeadings() output.FormatterOptions { + return output.FormatterOptions{ + Columns: []output.Column{ + { + Heading: "", + JSONPath: "{ .ResourceType }", + }, + { + Heading: "", + JSONPath: "{ .RecipeKind }", + }, + { + Heading: "", + JSONPath: "{ .RecipeLocation }", + }, + }, + } +} + // GetGenericResourceTableFormat returns the fields to output from a generic resource object. // This function should be used with the Go type GenericResource. // The difference between this function and the GetResourceTableFormat function above is that diff --git a/pkg/cli/output/formats.go b/pkg/cli/output/formats.go index 7d4fbe5aee..07b7ca12fe 100644 --- a/pkg/cli/output/formats.go +++ b/pkg/cli/output/formats.go @@ -17,9 +17,10 @@ limitations under the License. package output const ( - FormatJson = "json" - FormatTable = "table" - DefaultFormat = FormatTable + FormatJson = "json" + FormatTable = "table" + FormatPlainText = "plain-text" + DefaultFormat = FormatTable ) // SupportedFormats returns a slice of strings containing the supported formats for a request. diff --git a/pkg/components/database/filter.go b/pkg/components/database/filter.go index 7a99ada2e6..efe5e5ae30 100644 --- a/pkg/components/database/filter.go +++ b/pkg/components/database/filter.go @@ -48,6 +48,11 @@ func (o Object) MatchesFilters(filters []QueryFilter) (bool, error) { fields := strings.Split(filter.Field, ".") for i, field := range fields { value = value.MapIndex(reflect.ValueOf(field)) + if !value.IsValid() { + // Field doesn't exist, no match + return false, nil + } + if i < len(fields)-1 { // Need to go further into the nested fields value = reflect.ValueOf(value.Interface()) diff --git a/pkg/components/database/filter_test.go b/pkg/components/database/filter_test.go index 0c80924193..b09989f802 100644 --- a/pkg/components/database/filter_test.go +++ b/pkg/components/database/filter_test.go @@ -113,6 +113,12 @@ func Test_MatchesFilters(t *testing.T) { Filters: []QueryFilter{{Field: "properties.value", Value: "warm"}}, ExpectedMatch: false, }, + { + Description: "field_does_not_exist", + Obj: &Object{Data: map[string]any{"value": "cool"}}, + Filters: []QueryFilter{{Field: "value", Value: "hot"}}, + ExpectedMatch: false, + }, } for _, testcase := range cases { diff --git a/pkg/controller/api/radapp.io/v1alpha3/deploymentresource_types.go b/pkg/controller/api/radapp.io/v1alpha3/deploymentresource_types.go index ddc8cff33c..114fa226b8 100644 --- a/pkg/controller/api/radapp.io/v1alpha3/deploymentresource_types.go +++ b/pkg/controller/api/radapp.io/v1alpha3/deploymentresource_types.go @@ -32,6 +32,7 @@ type DeploymentResourceStatus struct { Id string `json:"id,omitempty"` // ObservedGeneration is the most recent generation observed for this DeploymentResource. + // +kubebuilder:validation:Format="" ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // Operation tracks the status of an in-progress provisioning operation. diff --git a/pkg/controller/api/radapp.io/v1alpha3/deploymenttemplate_types.go b/pkg/controller/api/radapp.io/v1alpha3/deploymenttemplate_types.go index df99020a58..cba57005a5 100644 --- a/pkg/controller/api/radapp.io/v1alpha3/deploymenttemplate_types.go +++ b/pkg/controller/api/radapp.io/v1alpha3/deploymenttemplate_types.go @@ -38,6 +38,7 @@ type DeploymentTemplateSpec struct { // DeploymentTemplateStatus defines the observed state of a DeploymentTemplate resource. type DeploymentTemplateStatus struct { // ObservedGeneration is the most recent generation observed for this DeploymentTemplate. + // +kubebuilder:validation:Format="" ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // StatusHash is a hash of the DeploymentTemplate's state (template, parameters, and provider config). diff --git a/pkg/controller/api/radapp.io/v1alpha3/recipe_types.go b/pkg/controller/api/radapp.io/v1alpha3/recipe_types.go index 2f39fc3be6..b6a7eace4c 100644 --- a/pkg/controller/api/radapp.io/v1alpha3/recipe_types.go +++ b/pkg/controller/api/radapp.io/v1alpha3/recipe_types.go @@ -67,6 +67,7 @@ type RecipeStatus struct { // ObservedGeneration is the most recent generation observed for this Recipe. It corresponds to the // Recipe's generation, which is updated on mutation by the API Server. // +kubebuilder:validation:Optional + // +kubebuilder:validation:Format="" ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // Application is the resource ID of the application. diff --git a/pkg/corerp/api/README.md b/pkg/corerp/api/README.md index b0fdb75f4d..52eeb94d54 100644 --- a/pkg/corerp/api/README.md +++ b/pkg/corerp/api/README.md @@ -3,20 +3,25 @@ This directory includes API version specific models from open api specs. The models in this directory is used for serializing/deserializing request and response. [datamodels](../datamodel/) has the converters to convert between version specific models and datamodels. datamodels will be used for internal controller and datastorage. ## Generate new models + ### Prerequisites + 1. Install [NodeJS](https://nodejs.org/) 2. Install [AutoRest](http://aka.ms/autorest) -``` -npm install -g autorest -``` + + ```shell + npm install -g autorest@3.7.2 + ``` ### Add new api-version 1. Add api version tags and openapi file below in this README.md 2. Run autorest. -```bash -autorest README.md --tag=core-2023-10-01-preview -``` + + ```shell + autorest README.md --tag=core-2023-10-01-preview + ``` + 3. Create or modify the corresponding datamodels in [datamodel](../datamodel/) 4. Add the converter between versioned model and datamodel in [converter](../datamodel/converter/) @@ -55,9 +60,8 @@ The following configuration generates track2 go models and client. ```yaml $(tag) != '' version: 3.*.* -use: "@autorest/go@4.0.0-preview.69" +use: "@autorest/go@4.0.0-preview.74" module: "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" -module-version: 0.0.1 file-prefix: zz_generated_ license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated." azure-arm: true diff --git a/pkg/corerp/api/v20231001preview/zz_generated_applications_client.go b/pkg/corerp/api/v20231001preview/zz_generated_applications_client.go index b5576d1536..3ff2b29354 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_applications_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_applications_client.go @@ -19,7 +19,7 @@ import ( // ApplicationsClient contains the methods for the Applications group. // Don't use this type directly, use NewApplicationsClient() instead. type ApplicationsClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewApplicationsClient(rootScope string, credential azcore.TokenCredential, } client := &ApplicationsClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -86,9 +86,9 @@ func (client *ApplicationsClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -242,9 +242,9 @@ func (client *ApplicationsClient) getGraphCreateRequest(ctx context.Context, app req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // getGraphHandleResponse handles the GetGraph response. @@ -261,7 +261,7 @@ func (client *ApplicationsClient) getGraphHandleResponse(resp *http.Response) (A // Generated from API version 2023-10-01-preview // - options - ApplicationsClientListByScopeOptions contains the optional parameters for the ApplicationsClient.NewListByScopePager // method. -func (client *ApplicationsClient) NewListByScopePager(options *ApplicationsClientListByScopeOptions) (*runtime.Pager[ApplicationsClientListByScopeResponse]) { +func (client *ApplicationsClient) NewListByScopePager(options *ApplicationsClientListByScopeOptions) *runtime.Pager[ApplicationsClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationsClientListByScopeResponse]{ More: func(page ApplicationsClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -278,7 +278,7 @@ func (client *ApplicationsClient) NewListByScopePager(options *ApplicationsClien return ApplicationsClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -351,9 +351,9 @@ func (client *ApplicationsClient) updateCreateRequest(ctx context.Context, appli req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -364,4 +364,3 @@ func (client *ApplicationsClient) updateHandleResponse(resp *http.Response) (App } return result, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_client_factory.go b/pkg/corerp/api/v20231001preview/zz_generated_client_factory.go index 1b0e4adc79..9f7d4dd240 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_client_factory.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_client_factory.go @@ -13,7 +13,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { rootScope string - internal *arm.Client + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -30,7 +30,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio } return &ClientFactory{ rootScope: rootScope, - internal: internal, + internal: internal, }, nil } @@ -38,7 +38,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient { return &ApplicationsClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -46,7 +46,7 @@ func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient { func (c *ClientFactory) NewContainersClient() *ContainersClient { return &ContainersClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -54,7 +54,7 @@ func (c *ClientFactory) NewContainersClient() *ContainersClient { func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { return &EnvironmentsClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -62,7 +62,7 @@ func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { func (c *ClientFactory) NewExtendersClient() *ExtendersClient { return &ExtendersClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -70,7 +70,7 @@ func (c *ClientFactory) NewExtendersClient() *ExtendersClient { func (c *ClientFactory) NewGatewaysClient() *GatewaysClient { return &GatewaysClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -85,7 +85,7 @@ func (c *ClientFactory) NewOperationsClient() *OperationsClient { func (c *ClientFactory) NewSecretStoresClient() *SecretStoresClient { return &SecretStoresClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -93,7 +93,6 @@ func (c *ClientFactory) NewSecretStoresClient() *SecretStoresClient { func (c *ClientFactory) NewVolumesClient() *VolumesClient { return &VolumesClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_constants.go b/pkg/corerp/api/v20231001preview/zz_generated_constants.go index 50a707b247..95d311e2c1 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_constants.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_constants.go @@ -4,11 +4,6 @@ package v20231001preview -const ( - moduleName = "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" - moduleVersion = "v0.0.1" -) - // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -18,7 +13,7 @@ const ( // PossibleActionTypeValues returns the possible values for the ActionType const type. func PossibleActionTypeValues() []ActionType { - return []ActionType{ + return []ActionType{ ActionTypeInternal, } } @@ -27,15 +22,15 @@ func PossibleActionTypeValues() []ActionType { type CertificateFormats string const ( -// CertificateFormatsPem - PEM Certificate format + // CertificateFormatsPem - PEM Certificate format CertificateFormatsPem CertificateFormats = "pem" -// CertificateFormatsPfx - PFX Certificate format + // CertificateFormatsPfx - PFX Certificate format CertificateFormatsPfx CertificateFormats = "pfx" ) // PossibleCertificateFormatsValues returns the possible values for the CertificateFormats const type. func PossibleCertificateFormatsValues() []CertificateFormats { - return []CertificateFormats{ + return []CertificateFormats{ CertificateFormatsPem, CertificateFormatsPfx, } @@ -45,17 +40,17 @@ func PossibleCertificateFormatsValues() []CertificateFormats { type CertificateTypes string const ( -// CertificateTypesCertificate - Certificate type + // CertificateTypesCertificate - Certificate type CertificateTypesCertificate CertificateTypes = "certificate" -// CertificateTypesPrivatekey - Private Key type + // CertificateTypesPrivatekey - Private Key type CertificateTypesPrivatekey CertificateTypes = "privatekey" -// CertificateTypesPublickey - Public Key type + // CertificateTypesPublickey - Public Key type CertificateTypesPublickey CertificateTypes = "publickey" ) // PossibleCertificateTypesValues returns the possible values for the CertificateTypes const type. func PossibleCertificateTypesValues() []CertificateTypes { - return []CertificateTypes{ + return []CertificateTypes{ CertificateTypesCertificate, CertificateTypesPrivatekey, CertificateTypesPublickey, @@ -68,15 +63,15 @@ func PossibleCertificateTypesValues() []CertificateTypes { type ContainerResourceProvisioning string const ( -// ContainerResourceProvisioningInternal - The resource lifecycle will be managed internally by Radius + // ContainerResourceProvisioningInternal - The resource lifecycle will be managed internally by Radius ContainerResourceProvisioningInternal ContainerResourceProvisioning = "internal" -// ContainerResourceProvisioningManual - The resource lifecycle will be managed by the user + // ContainerResourceProvisioningManual - The resource lifecycle will be managed by the user ContainerResourceProvisioningManual ContainerResourceProvisioning = "manual" ) // PossibleContainerResourceProvisioningValues returns the possible values for the ContainerResourceProvisioning const type. func PossibleContainerResourceProvisioningValues() []ContainerResourceProvisioning { - return []ContainerResourceProvisioning{ + return []ContainerResourceProvisioning{ ContainerResourceProvisioningInternal, ContainerResourceProvisioningManual, } @@ -86,15 +81,15 @@ func PossibleContainerResourceProvisioningValues() []ContainerResourceProvisioni type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, @@ -106,15 +101,15 @@ func PossibleCreatedByTypeValues() []CreatedByType { type DaprSidecarExtensionProtocol string const ( -// DaprSidecarExtensionProtocolGrpc - gRPC protocol + // DaprSidecarExtensionProtocolGrpc - gRPC protocol DaprSidecarExtensionProtocolGrpc DaprSidecarExtensionProtocol = "grpc" -// DaprSidecarExtensionProtocolHTTP - HTTP protocol + // DaprSidecarExtensionProtocolHTTP - HTTP protocol DaprSidecarExtensionProtocolHTTP DaprSidecarExtensionProtocol = "http" ) // PossibleDaprSidecarExtensionProtocolValues returns the possible values for the DaprSidecarExtensionProtocol const type. func PossibleDaprSidecarExtensionProtocolValues() []DaprSidecarExtensionProtocol { - return []DaprSidecarExtensionProtocol{ + return []DaprSidecarExtensionProtocol{ DaprSidecarExtensionProtocolGrpc, DaprSidecarExtensionProtocolHTTP, } @@ -124,16 +119,16 @@ func PossibleDaprSidecarExtensionProtocolValues() []DaprSidecarExtensionProtocol type Direction string const ( -// DirectionInbound - The resource defining this connection accepts inbound connections from the resource specified by this -// id. + // DirectionInbound - The resource defining this connection accepts inbound connections from the resource specified by this + // id. DirectionInbound Direction = "Inbound" -// DirectionOutbound - The resource defining this connection makes an outbound connection resource specified by this id. + // DirectionOutbound - The resource defining this connection makes an outbound connection resource specified by this id. DirectionOutbound Direction = "Outbound" ) // PossibleDirectionValues returns the possible values for the Direction const type. func PossibleDirectionValues() []Direction { - return []Direction{ + return []Direction{ DirectionInbound, DirectionOutbound, } @@ -143,14 +138,14 @@ func PossibleDirectionValues() []Direction { type IAMKind string const ( -// IAMKindAzure - Azure Active Directory - IAMKindAzure IAMKind = "azure" + // IAMKindAzure - Azure Active Directory + IAMKindAzure IAMKind = "azure" IAMKindString IAMKind = "string" ) // PossibleIAMKindValues returns the possible values for the IAMKind const type. func PossibleIAMKindValues() []IAMKind { - return []IAMKind{ + return []IAMKind{ IAMKindAzure, IAMKindString, } @@ -160,21 +155,21 @@ func PossibleIAMKindValues() []IAMKind { type IdentitySettingKind string const ( -// IdentitySettingKindAzureComWorkload - azure ad workload identity + // IdentitySettingKindAzureComWorkload - azure ad workload identity IdentitySettingKindAzureComWorkload IdentitySettingKind = "azure.com.workload" -// IdentitySettingKindSystemAssigned - System assigned managed identity + // IdentitySettingKindSystemAssigned - System assigned managed identity IdentitySettingKindSystemAssigned IdentitySettingKind = "systemAssigned" -// IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity + // IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity IdentitySettingKindSystemAssignedUserAssigned IdentitySettingKind = "systemAssignedUserAssigned" -// IdentitySettingKindUndefined - undefined identity + // IdentitySettingKindUndefined - undefined identity IdentitySettingKindUndefined IdentitySettingKind = "undefined" -// IdentitySettingKindUserAssigned - User assigned managed identity + // IdentitySettingKindUserAssigned - User assigned managed identity IdentitySettingKindUserAssigned IdentitySettingKind = "userAssigned" ) // PossibleIdentitySettingKindValues returns the possible values for the IdentitySettingKind const type. func PossibleIdentitySettingKindValues() []IdentitySettingKind { - return []IdentitySettingKind{ + return []IdentitySettingKind{ IdentitySettingKindAzureComWorkload, IdentitySettingKindSystemAssigned, IdentitySettingKindSystemAssignedUserAssigned, @@ -187,17 +182,17 @@ func PossibleIdentitySettingKindValues() []IdentitySettingKind { type ImagePullPolicy string const ( -// ImagePullPolicyAlways - Always + // ImagePullPolicyAlways - Always ImagePullPolicyAlways ImagePullPolicy = "Always" -// ImagePullPolicyIfNotPresent - IfNotPresent + // ImagePullPolicyIfNotPresent - IfNotPresent ImagePullPolicyIfNotPresent ImagePullPolicy = "IfNotPresent" -// ImagePullPolicyNever - Never + // ImagePullPolicyNever - Never ImagePullPolicyNever ImagePullPolicy = "Never" ) // PossibleImagePullPolicyValues returns the possible values for the ImagePullPolicy const type. func PossibleImagePullPolicyValues() []ImagePullPolicy { - return []ImagePullPolicy{ + return []ImagePullPolicy{ ImagePullPolicyAlways, ImagePullPolicyIfNotPresent, ImagePullPolicyNever, @@ -208,15 +203,15 @@ func PossibleImagePullPolicyValues() []ImagePullPolicy { type ManagedStore string const ( -// ManagedStoreDisk - Disk store + // ManagedStoreDisk - Disk store ManagedStoreDisk ManagedStore = "disk" -// ManagedStoreMemory - Memory store + // ManagedStoreMemory - Memory store ManagedStoreMemory ManagedStore = "memory" ) // PossibleManagedStoreValues returns the possible values for the ManagedStore const type. func PossibleManagedStoreValues() []ManagedStore { - return []ManagedStore{ + return []ManagedStore{ ManagedStoreDisk, ManagedStoreMemory, } @@ -227,14 +222,14 @@ func PossibleManagedStoreValues() []ManagedStore { type Origin string const ( - OriginSystem Origin = "system" - OriginUser Origin = "user" + OriginSystem Origin = "system" + OriginUser Origin = "user" OriginUserSystem Origin = "user,system" ) // PossibleOriginValues returns the possible values for the Origin const type. func PossibleOriginValues() []Origin { - return []Origin{ + return []Origin{ OriginSystem, OriginUser, OriginUserSystem, @@ -245,15 +240,15 @@ func PossibleOriginValues() []Origin { type PortProtocol string const ( -// PortProtocolTCP - TCP protocol + // PortProtocolTCP - TCP protocol PortProtocolTCP PortProtocol = "TCP" -// PortProtocolUDP - UDP protocol + // PortProtocolUDP - UDP protocol PortProtocolUDP PortProtocol = "UDP" ) // PossiblePortProtocolValues returns the possible values for the PortProtocol const type. func PossiblePortProtocolValues() []PortProtocol { - return []PortProtocol{ + return []PortProtocol{ PortProtocolTCP, PortProtocolUDP, } @@ -263,27 +258,27 @@ func PossiblePortProtocolValues() []PortProtocol { type ProvisioningState string const ( -// ProvisioningStateAccepted - The resource create request has been accepted + // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" -// ProvisioningStateCanceled - The resource provisioning has been canceled + // ProvisioningStateCanceled - The resource provisioning has been canceled ProvisioningStateCanceled ProvisioningState = "Canceled" -// ProvisioningStateCreating - The resource is being created + // ProvisioningStateCreating - The resource is being created ProvisioningStateCreating ProvisioningState = "Creating" -// ProvisioningStateDeleting - The resource is being deleted + // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" -// ProvisioningStateFailed - The resource provisioning has failed + // ProvisioningStateFailed - The resource provisioning has failed ProvisioningStateFailed ProvisioningState = "Failed" -// ProvisioningStateProvisioning - The resource is being provisioned + // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" -// ProvisioningStateSucceeded - The resource has been successfully provisioned + // ProvisioningStateSucceeded - The resource has been successfully provisioned ProvisioningStateSucceeded ProvisioningState = "Succeeded" -// ProvisioningStateUpdating - The resource is being updated + // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ + return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, @@ -301,15 +296,15 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceProvisioning string const ( -// ResourceProvisioningManual - The resource lifecycle will be managed by the user + // ResourceProvisioningManual - The resource lifecycle will be managed by the user ResourceProvisioningManual ResourceProvisioning = "manual" -// ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius + // ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius ResourceProvisioningRecipe ResourceProvisioning = "recipe" ) // PossibleResourceProvisioningValues returns the possible values for the ResourceProvisioning const type. func PossibleResourceProvisioningValues() []ResourceProvisioning { - return []ResourceProvisioning{ + return []ResourceProvisioning{ ResourceProvisioningManual, ResourceProvisioningRecipe, } @@ -319,17 +314,17 @@ func PossibleResourceProvisioningValues() []ResourceProvisioning { type RestartPolicy string const ( -// RestartPolicyAlways - Always + // RestartPolicyAlways - Always RestartPolicyAlways RestartPolicy = "Always" -// RestartPolicyNever - Never + // RestartPolicyNever - Never RestartPolicyNever RestartPolicy = "Never" -// RestartPolicyOnFailure - OnFailure + // RestartPolicyOnFailure - OnFailure RestartPolicyOnFailure RestartPolicy = "OnFailure" ) // PossibleRestartPolicyValues returns the possible values for the RestartPolicy const type. func PossibleRestartPolicyValues() []RestartPolicy { - return []RestartPolicy{ + return []RestartPolicy{ RestartPolicyAlways, RestartPolicyNever, RestartPolicyOnFailure, @@ -340,24 +335,24 @@ func PossibleRestartPolicyValues() []RestartPolicy { type SecretStoreDataType string const ( -// SecretStoreDataTypeAwsIRSA - awsIRSA type is used to represent authentication using AWS IRSA (IAM Roles for Service accounts) -// and the secretstore resource is expected to have the key 'roleARN'. + // SecretStoreDataTypeAwsIRSA - awsIRSA type is used to represent authentication using AWS IRSA (IAM Roles for Service accounts) + // and the secretstore resource is expected to have the key 'roleARN'. SecretStoreDataTypeAwsIRSA SecretStoreDataType = "awsIRSA" -// SecretStoreDataTypeAzureWorkloadIdentity - azureWorkloadIdentity type is used to represent authentication using azure federated -// identity and the secretstore resource is expected to have the keys 'clientId' and 'tenantId'. + // SecretStoreDataTypeAzureWorkloadIdentity - azureWorkloadIdentity type is used to represent authentication using azure federated + // identity and the secretstore resource is expected to have the keys 'clientId' and 'tenantId'. SecretStoreDataTypeAzureWorkloadIdentity SecretStoreDataType = "azureWorkloadIdentity" -// SecretStoreDataTypeBasicAuthentication - basicAuthentication type is used to represent username and password based authentication -// and the secretstore resource is expected to have the keys 'username' and 'password'. + // SecretStoreDataTypeBasicAuthentication - basicAuthentication type is used to represent username and password based authentication + // and the secretstore resource is expected to have the keys 'username' and 'password'. SecretStoreDataTypeBasicAuthentication SecretStoreDataType = "basicAuthentication" -// SecretStoreDataTypeCertificate - Certificate secret data type + // SecretStoreDataTypeCertificate - Certificate secret data type SecretStoreDataTypeCertificate SecretStoreDataType = "certificate" -// SecretStoreDataTypeGeneric - Generic secret data type + // SecretStoreDataTypeGeneric - Generic secret data type SecretStoreDataTypeGeneric SecretStoreDataType = "generic" ) // PossibleSecretStoreDataTypeValues returns the possible values for the SecretStoreDataType const type. func PossibleSecretStoreDataTypeValues() []SecretStoreDataType { - return []SecretStoreDataType{ + return []SecretStoreDataType{ SecretStoreDataTypeAwsIRSA, SecretStoreDataTypeAzureWorkloadIdentity, SecretStoreDataTypeBasicAuthentication, @@ -370,15 +365,15 @@ func PossibleSecretStoreDataTypeValues() []SecretStoreDataType { type SecretValueEncoding string const ( -// SecretValueEncodingBase64 - The base64-encoded secret value + // SecretValueEncodingBase64 - The base64-encoded secret value SecretValueEncodingBase64 SecretValueEncoding = "base64" -// SecretValueEncodingRaw - The raw secret value + // SecretValueEncodingRaw - The raw secret value SecretValueEncodingRaw SecretValueEncoding = "raw" ) // PossibleSecretValueEncodingValues returns the possible values for the SecretValueEncoding const type. func PossibleSecretValueEncodingValues() []SecretValueEncoding { - return []SecretValueEncoding{ + return []SecretValueEncoding{ SecretValueEncodingBase64, SecretValueEncodingRaw, } @@ -388,15 +383,15 @@ func PossibleSecretValueEncodingValues() []SecretValueEncoding { type TLSMinVersion string const ( -// TLSMinVersionTls12 - TLS Version 1.2 + // TLSMinVersionTls12 - TLS Version 1.2 TLSMinVersionTls12 TLSMinVersion = "1.2" -// TLSMinVersionTls13 - TLS Version 1.3 + // TLSMinVersionTls13 - TLS Version 1.3 TLSMinVersionTls13 TLSMinVersion = "1.3" ) // PossibleTLSMinVersionValues returns the possible values for the TLSMinVersion const type. func PossibleTLSMinVersionValues() []TLSMinVersion { - return []TLSMinVersion{ + return []TLSMinVersion{ TLSMinVersionTls12, TLSMinVersionTls13, } @@ -406,15 +401,15 @@ func PossibleTLSMinVersionValues() []TLSMinVersion { type VolumePermission string const ( -// VolumePermissionRead - Read only + // VolumePermissionRead - Read only VolumePermissionRead VolumePermission = "read" -// VolumePermissionWrite - Read and write + // VolumePermissionWrite - Read and write VolumePermissionWrite VolumePermission = "write" ) // PossibleVolumePermissionValues returns the possible values for the VolumePermission const type. func PossibleVolumePermissionValues() []VolumePermission { - return []VolumePermission{ + return []VolumePermission{ VolumePermissionRead, VolumePermissionWrite, } @@ -424,20 +419,19 @@ func PossibleVolumePermissionValues() []VolumePermission { type VolumeSecretEncodings string const ( -// VolumeSecretEncodingsBase64 - Base64 encoding + // VolumeSecretEncodingsBase64 - Base64 encoding VolumeSecretEncodingsBase64 VolumeSecretEncodings = "base64" -// VolumeSecretEncodingsHex - Hex encoding + // VolumeSecretEncodingsHex - Hex encoding VolumeSecretEncodingsHex VolumeSecretEncodings = "hex" -// VolumeSecretEncodingsUTF8 - UTF-8 encoding + // VolumeSecretEncodingsUTF8 - UTF-8 encoding VolumeSecretEncodingsUTF8 VolumeSecretEncodings = "utf-8" ) // PossibleVolumeSecretEncodingsValues returns the possible values for the VolumeSecretEncodings const type. func PossibleVolumeSecretEncodingsValues() []VolumeSecretEncodings { - return []VolumeSecretEncodings{ + return []VolumeSecretEncodings{ VolumeSecretEncodingsBase64, VolumeSecretEncodingsHex, VolumeSecretEncodingsUTF8, } } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_containers_client.go b/pkg/corerp/api/v20231001preview/zz_generated_containers_client.go index 995dd97b12..d6315c27ef 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_containers_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_containers_client.go @@ -19,7 +19,7 @@ import ( // ContainersClient contains the methods for the Containers group. // Don't use this type directly, use NewContainersClient() instead. type ContainersClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewContainersClient(rootScope string, credential azcore.TokenCredential, op } client := &ContainersClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *ContainersClient) BeginCreateOrUpdate(ctx context.Context, contain } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *ContainersClient) createOrUpdateCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a ContainerResource @@ -126,7 +126,7 @@ func (client *ContainersClient) BeginDelete(ctx context.Context, containerName s } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -237,7 +237,7 @@ func (client *ContainersClient) getHandleResponse(resp *http.Response) (Containe // Generated from API version 2023-10-01-preview // - options - ContainersClientListByScopeOptions contains the optional parameters for the ContainersClient.NewListByScopePager // method. -func (client *ContainersClient) NewListByScopePager(options *ContainersClientListByScopeOptions) (*runtime.Pager[ContainersClientListByScopeResponse]) { +func (client *ContainersClient) NewListByScopePager(options *ContainersClientListByScopeOptions) *runtime.Pager[ContainersClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[ContainersClientListByScopeResponse]{ More: func(page ContainersClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -254,7 +254,7 @@ func (client *ContainersClient) NewListByScopePager(options *ContainersClientLis return ContainersClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -298,7 +298,7 @@ func (client *ContainersClient) BeginUpdate(ctx context.Context, containerName s } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainersClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -348,8 +348,7 @@ func (client *ContainersClient) updateCreateRequest(ctx context.Context, contain req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_environments_client.go b/pkg/corerp/api/v20231001preview/zz_generated_environments_client.go index 1ece6ce078..1bcd1b3025 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_environments_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_environments_client.go @@ -19,7 +19,7 @@ import ( // EnvironmentsClient contains the methods for the Environments group. // Don't use this type directly, use NewEnvironmentsClient() instead. type EnvironmentsClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewEnvironmentsClient(rootScope string, credential azcore.TokenCredential, } client := &EnvironmentsClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -86,9 +86,9 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -243,9 +243,9 @@ func (client *EnvironmentsClient) getMetadataCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // getMetadataHandleResponse handles the GetMetadata response. @@ -262,7 +262,7 @@ func (client *EnvironmentsClient) getMetadataHandleResponse(resp *http.Response) // Generated from API version 2023-10-01-preview // - options - EnvironmentsClientListByScopeOptions contains the optional parameters for the EnvironmentsClient.NewListByScopePager // method. -func (client *EnvironmentsClient) NewListByScopePager(options *EnvironmentsClientListByScopeOptions) (*runtime.Pager[EnvironmentsClientListByScopeResponse]) { +func (client *EnvironmentsClient) NewListByScopePager(options *EnvironmentsClientListByScopeOptions) *runtime.Pager[EnvironmentsClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListByScopeResponse]{ More: func(page EnvironmentsClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -279,7 +279,7 @@ func (client *EnvironmentsClient) NewListByScopePager(options *EnvironmentsClien return EnvironmentsClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -352,9 +352,9 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, envir req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -365,4 +365,3 @@ func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (Env } return result, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_extenders_client.go b/pkg/corerp/api/v20231001preview/zz_generated_extenders_client.go index 5df08b896c..61efa995f5 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_extenders_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_extenders_client.go @@ -19,7 +19,7 @@ import ( // ExtendersClient contains the methods for the Extenders group. // Don't use this type directly, use NewExtendersClient() instead. type ExtendersClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewExtendersClient(rootScope string, credential azcore.TokenCredential, opt } client := &ExtendersClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *ExtendersClient) BeginCreateOrUpdate(ctx context.Context, extender } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtendersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *ExtendersClient) createOrUpdateCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a ExtenderResource @@ -126,7 +126,7 @@ func (client *ExtendersClient) BeginDelete(ctx context.Context, extenderName str } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtendersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -237,7 +237,7 @@ func (client *ExtendersClient) getHandleResponse(resp *http.Response) (Extenders // Generated from API version 2023-10-01-preview // - options - ExtendersClientListByScopeOptions contains the optional parameters for the ExtendersClient.NewListByScopePager // method. -func (client *ExtendersClient) NewListByScopePager(options *ExtendersClientListByScopeOptions) (*runtime.Pager[ExtendersClientListByScopeResponse]) { +func (client *ExtendersClient) NewListByScopePager(options *ExtendersClientListByScopeOptions) *runtime.Pager[ExtendersClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[ExtendersClientListByScopeResponse]{ More: func(page ExtendersClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -254,7 +254,7 @@ func (client *ExtendersClient) NewListByScopePager(options *ExtendersClientListB return ExtendersClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -327,9 +327,9 @@ func (client *ExtendersClient) listSecretsCreateRequest(ctx context.Context, ext req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // listSecretsHandleResponse handles the ListSecrets response. @@ -356,7 +356,7 @@ func (client *ExtendersClient) BeginUpdate(ctx context.Context, extenderName str } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtendersClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -406,8 +406,7 @@ func (client *ExtendersClient) updateCreateRequest(ctx context.Context, extender req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_gateways_client.go b/pkg/corerp/api/v20231001preview/zz_generated_gateways_client.go index d9eacc3e56..17b8df6cca 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_gateways_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_gateways_client.go @@ -19,7 +19,7 @@ import ( // GatewaysClient contains the methods for the Gateways group. // Don't use this type directly, use NewGatewaysClient() instead. type GatewaysClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewGatewaysClient(rootScope string, credential azcore.TokenCredential, opti } client := &GatewaysClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -56,7 +56,7 @@ func (client *GatewaysClient) BeginCreate(ctx context.Context, gatewayName strin } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewaysClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -106,9 +106,9 @@ func (client *GatewaysClient) createCreateRequest(ctx context.Context, gatewayNa req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginCreateOrUpdate - Update a GatewayResource @@ -127,7 +127,7 @@ func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, gatewayNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -177,9 +177,9 @@ func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, g req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a GatewayResource @@ -196,7 +196,7 @@ func (client *GatewaysClient) BeginDelete(ctx context.Context, gatewayName strin } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -307,7 +307,7 @@ func (client *GatewaysClient) getHandleResponse(resp *http.Response) (GatewaysCl // Generated from API version 2023-10-01-preview // - options - GatewaysClientListByScopeOptions contains the optional parameters for the GatewaysClient.NewListByScopePager // method. -func (client *GatewaysClient) NewListByScopePager(options *GatewaysClientListByScopeOptions) (*runtime.Pager[GatewaysClientListByScopeResponse]) { +func (client *GatewaysClient) NewListByScopePager(options *GatewaysClientListByScopeOptions) *runtime.Pager[GatewaysClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[GatewaysClientListByScopeResponse]{ More: func(page GatewaysClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -324,7 +324,7 @@ func (client *GatewaysClient) NewListByScopePager(options *GatewaysClientListByS return GatewaysClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -352,4 +352,3 @@ func (client *GatewaysClient) listByScopeHandleResponse(resp *http.Response) (Ga } return result, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_interfaces.go b/pkg/corerp/api/v20231001preview/zz_generated_interfaces.go index 2043dbb6c7..564041bfda 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_interfaces.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_interfaces.go @@ -58,4 +58,3 @@ type VolumePropertiesClassification interface { // GetVolumeProperties returns the VolumeProperties content of the underlying type. GetVolumeProperties() *VolumeProperties } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_models.go b/pkg/corerp/api/v20231001preview/zz_generated_models.go index 2b2706c27b..3e27cfd4f4 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_models.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_models.go @@ -8,161 +8,161 @@ import "time" // ACIRuntimeProperties - The runtime configuration properties for Kubernetes type ACIRuntimeProperties struct { -// The ID of the gateway that is providing L7 traffic for the container + // The ID of the gateway that is providing L7 traffic for the container GatewayID *string } // ApplicationGraphConnection - Describes the connection between two resources. type ApplicationGraphConnection struct { -// REQUIRED; The direction of the connection. 'Outbound' indicates this connection specifies the ID of the destination and -// 'Inbound' indicates indicates this connection specifies the ID of the source. + // REQUIRED; The direction of the connection. 'Outbound' indicates this connection specifies the ID of the destination and + // 'Inbound' indicates indicates this connection specifies the ID of the source. Direction *Direction -// REQUIRED; The resource ID + // REQUIRED; The resource ID ID *string } // ApplicationGraphOutputResource - Describes an output resource that comprises an application graph resource. type ApplicationGraphOutputResource struct { -// REQUIRED; The resource ID. + // REQUIRED; The resource ID. ID *string -// REQUIRED; The resource name. + // REQUIRED; The resource name. Name *string -// REQUIRED; The resource type. + // REQUIRED; The resource type. Type *string } // ApplicationGraphResource - Describes a resource in the application graph. type ApplicationGraphResource struct { -// REQUIRED; The connections between resources in the application graph. + // REQUIRED; The connections between resources in the application graph. Connections []*ApplicationGraphConnection -// REQUIRED; The resource ID. + // REQUIRED; The resource ID. ID *string -// REQUIRED; The resource name. + // REQUIRED; The resource name. Name *string -// REQUIRED; The resources that comprise this resource. + // REQUIRED; The resources that comprise this resource. OutputResources []*ApplicationGraphOutputResource -// REQUIRED; provisioningState of this resource. + // REQUIRED; provisioningState of this resource. ProvisioningState *string -// REQUIRED; The resource type. + // REQUIRED; The resource type. Type *string } // ApplicationGraphResponse - Describes the application architecture and its dependencies. type ApplicationGraphResponse struct { -// REQUIRED; The resources in the application graph. + // REQUIRED; The resources in the application graph. Resources []*ApplicationGraphResource } // ApplicationProperties - Application properties type ApplicationProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the application is linked to + // REQUIRED; Fully qualified resource ID for the environment that the application is linked to Environment *string -// The application extension. + // The application extension. Extensions []ExtensionClassification -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // ApplicationResource - Radius Application resource type ApplicationResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *ApplicationProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ApplicationResourceListResult - The response of a ApplicationResource list operation. type ApplicationResourceListResult struct { -// REQUIRED; The ApplicationResource items on this page + // REQUIRED; The ApplicationResource items on this page Value []*ApplicationResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ApplicationResourceUpdate - Radius Application resource type ApplicationResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // AuthConfig - Authentication information used to access private Terraform module sources. Supported module sources: Git. type AuthConfig struct { -// Authentication information used to access private Terraform modules from Git repository sources. + // Authentication information used to access private Terraform modules from Git repository sources. Git *GitAuthConfig } // AzureContainerInstanceCompute - The Azure container instance compute configuration type AzureContainerInstanceCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource group to use for the environment. + // The resource group to use for the environment. ResourceGroup *string -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type AzureContainerInstanceCompute. func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: a.Identity, - Kind: a.Kind, + Identity: a.Identity, + Kind: a.Kind, ResourceID: a.ResourceID, } } // AzureContainerInstanceExtension - Azure container instance resource group extension of a environment/application resource. type AzureContainerInstanceExtension struct { -// REQUIRED; Discriminator property for Extension. + // REQUIRED; Discriminator property for Extension. Kind *string -// REQUIRED; The resource group of the application environment. + // REQUIRED; The resource group of the application environment. ResourceGroup *string } @@ -175,92 +175,92 @@ func (a *AzureContainerInstanceExtension) GetExtension() *Extension { // AzureKeyVaultVolumeProperties - Represents Azure Key Vault Volume properties type AzureKeyVaultVolumeProperties struct { -// REQUIRED; Fully qualified resource ID for the application + // REQUIRED; Fully qualified resource ID for the application Application *string -// REQUIRED; Discriminator property for VolumeProperties. + // REQUIRED; Discriminator property for VolumeProperties. Kind *string -// REQUIRED; The ID of the keyvault to use for this volume resource + // REQUIRED; The ID of the keyvault to use for this volume resource Resource *string -// The KeyVault certificates that this volume exposes + // The KeyVault certificates that this volume exposes Certificates map[string]*CertificateObjectProperties -// Fully qualified resource ID for the environment that the application is linked to + // Fully qualified resource ID for the environment that the application is linked to Environment *string -// The KeyVault keys that this volume exposes + // The KeyVault keys that this volume exposes Keys map[string]*KeyObjectProperties -// The KeyVault secrets that this volume exposes + // The KeyVault secrets that this volume exposes Secrets map[string]*SecretObjectProperties -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // GetVolumeProperties implements the VolumePropertiesClassification interface for type AzureKeyVaultVolumeProperties. func (a *AzureKeyVaultVolumeProperties) GetVolumeProperties() *VolumeProperties { return &VolumeProperties{ - Application: a.Application, - Environment: a.Environment, - Kind: a.Kind, + Application: a.Application, + Environment: a.Environment, + Kind: a.Kind, ProvisioningState: a.ProvisioningState, - Status: a.Status, + Status: a.Status, } } // AzureResourceManagerCommonTypesTrackedResourceUpdate - The resource model definition for an Azure Resource Manager tracked // top level resource which has 'tags' and a 'location' type AzureResourceManagerCommonTypesTrackedResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // BicepConfigProperties - Configuration for Bicep Recipes. Controls how Bicep plans and applies templates as part of Recipe // deployment. type BicepConfigProperties struct { -// Authentication information used to access private bicep registries, which is a map of registry hostname to secret config -// that contains credential information. + // Authentication information used to access private bicep registries, which is a map of registry hostname to secret config + // that contains credential information. Authentication map[string]*RegistrySecretConfig } // BicepRecipeProperties - Represents Bicep recipe properties. type BicepRecipeProperties struct { -// REQUIRED; Discriminator property for RecipeProperties. + // REQUIRED; Discriminator property for RecipeProperties. TemplateKind *string -// REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. + // REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. TemplatePath *string -// Key/value parameters to pass to the recipe template at deployment. + // Key/value parameters to pass to the recipe template at deployment. Parameters map[string]any -// Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, -// for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS). + // Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, + // for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS). PlainHTTP *bool } // GetRecipeProperties implements the RecipePropertiesClassification interface for type BicepRecipeProperties. func (b *BicepRecipeProperties) GetRecipeProperties() *RecipeProperties { return &RecipeProperties{ - Parameters: b.Parameters, + Parameters: b.Parameters, TemplateKind: b.TemplateKind, TemplatePath: b.TemplatePath, } @@ -268,192 +268,192 @@ func (b *BicepRecipeProperties) GetRecipeProperties() *RecipeProperties { // CertificateObjectProperties - Represents certificate object properties type CertificateObjectProperties struct { -// REQUIRED; The name of the certificate + // REQUIRED; The name of the certificate Name *string -// File name when written to disk + // File name when written to disk Alias *string -// Certificate object type to be downloaded - the certificate itself, private key or public key of the certificate + // Certificate object type to be downloaded - the certificate itself, private key or public key of the certificate CertType *CertificateTypes -// Encoding format. Default utf-8 + // Encoding format. Default utf-8 Encoding *VolumeSecretEncodings -// Certificate format. Default pem + // Certificate format. Default pem Format *CertificateFormats -// Certificate version + // Certificate version Version *string } // ConnectionProperties - Connection Properties type ConnectionProperties struct { -// REQUIRED; The source of the connection + // REQUIRED; The source of the connection Source *string -// default environment variable override + // default environment variable override DisableDefaultEnvVars *bool -// iam properties + // iam properties Iam *IamProperties } // Container - Definition of a container type Container struct { -// REQUIRED; The registry and image to download and run in your container + // REQUIRED; The registry and image to download and run in your container Image *string -// Arguments to the entrypoint. Overrides the container image's CMD + // Arguments to the entrypoint. Overrides the container image's CMD Args []*string -// Entrypoint array. Overrides the container image's ENTRYPOINT + // Entrypoint array. Overrides the container image's ENTRYPOINT Command []*string -// environment + // environment Env map[string]*EnvironmentVariable -// The pull policy for the container image + // The pull policy for the container image ImagePullPolicy *ImagePullPolicy -// liveness probe properties + // liveness probe properties LivenessProbe HealthProbePropertiesClassification -// container ports + // container ports Ports map[string]*ContainerPortProperties -// readiness probe properties + // readiness probe properties ReadinessProbe HealthProbePropertiesClassification -// container volumes + // container volumes Volumes map[string]VolumeClassification -// Working directory for the container + // Working directory for the container WorkingDir *string } // ContainerPortProperties - Specifies a listening port for the container type ContainerPortProperties struct { -// REQUIRED; The listening port number + // REQUIRED; The listening port number ContainerPort *int32 -// Specifies the port that will be exposed by this container. Must be set when value different from containerPort is desired + // Specifies the port that will be exposed by this container. Must be set when value different from containerPort is desired Port *int32 -// Protocol in use by the port + // Protocol in use by the port Protocol *PortProtocol -// Specifies the URL scheme of the communication protocol. Consumers can use the scheme to construct a URL. The value defaults -// to 'http' or 'https' depending on the port value + // Specifies the URL scheme of the communication protocol. Consumers can use the scheme to construct a URL. The value defaults + // to 'http' or 'https' depending on the port value Scheme *string } // ContainerProperties - Container properties type ContainerProperties struct { -// REQUIRED; Fully qualified resource ID for the application + // REQUIRED; Fully qualified resource ID for the application Application *string -// REQUIRED; Definition of a container. + // REQUIRED; Definition of a container. Container *Container -// Specifies a connection to another resource. + // Specifies a connection to another resource. Connections map[string]*ConnectionProperties -// Fully qualified resource ID for the environment that the application is linked to + // Fully qualified resource ID for the environment that the application is linked to Environment *string -// Extensions spec of the resource + // Extensions spec of the resource Extensions []ExtensionClassification -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// Specifies how the underlying container resource is provisioned and managed. + // Specifies how the underlying container resource is provisioned and managed. ResourceProvisioning *ContainerResourceProvisioning -// A collection of references to resources associated with the container + // A collection of references to resources associated with the container Resources []*ResourceReference -// The restart policy for the underlying container + // The restart policy for the underlying container RestartPolicy *RestartPolicy -// Specifies Runtime-specific functionality + // Specifies Runtime-specific functionality Runtimes *RuntimesProperties -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // ContainerResource - Concrete tracked resource types can be created by aliasing this type using a specific property type. type ContainerResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *ContainerProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ContainerResourceListResult - The response of a ContainerResource list operation. type ContainerResourceListResult struct { -// REQUIRED; The ContainerResource items on this page + // REQUIRED; The ContainerResource items on this page Value []*ContainerResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ContainerResourceUpdate - Concrete tracked resource types can be created by aliasing this type using a specific property // type. type ContainerResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprSidecarExtension - Specifies the resource should have a Dapr sidecar injected type DaprSidecarExtension struct { -// REQUIRED; The Dapr appId. Specifies the identifier used by Dapr for service invocation. + // REQUIRED; The Dapr appId. Specifies the identifier used by Dapr for service invocation. AppID *string -// REQUIRED; Discriminator property for Extension. + // REQUIRED; Discriminator property for Extension. Kind *string -// The Dapr appPort. Specifies the internal listening port for the application to handle requests from the Dapr sidecar. + // The Dapr appPort. Specifies the internal listening port for the application to handle requests from the Dapr sidecar. AppPort *int32 -// Specifies the Dapr configuration to use for the resource. + // Specifies the Dapr configuration to use for the resource. Config *string -// Specifies the Dapr app-protocol to use for the resource. + // Specifies the Dapr app-protocol to use for the resource. Protocol *DaprSidecarExtensionProtocol } @@ -466,13 +466,13 @@ func (d *DaprSidecarExtension) GetExtension() *Extension { // EnvironmentCompute - Represents backing compute resource type EnvironmentCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } @@ -481,261 +481,261 @@ func (e *EnvironmentCompute) GetEnvironmentCompute() *EnvironmentCompute { retur // EnvironmentProperties - Environment properties type EnvironmentProperties struct { -// REQUIRED; The compute resource used by application environment. + // REQUIRED; The compute resource used by application environment. Compute EnvironmentComputeClassification -// The environment extension. + // The environment extension. Extensions []ExtensionClassification -// Cloud providers configuration for the environment. + // Cloud providers configuration for the environment. Providers *Providers -// Configuration for Recipes. Defines how each type of Recipe should be configured and run. + // Configuration for Recipes. Defines how each type of Recipe should be configured and run. RecipeConfig *RecipeConfigProperties -// Specifies Recipes linked to the Environment. + // Specifies Recipes linked to the Environment. Recipes map[string]map[string]RecipePropertiesClassification -// Simulated environment. + // Simulated environment. Simulated *bool -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // EnvironmentResource - The environment resource type EnvironmentResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *EnvironmentProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentResourceListResult - The response of a EnvironmentResource list operation. type EnvironmentResourceListResult struct { -// REQUIRED; The EnvironmentResource items on this page + // REQUIRED; The EnvironmentResource items on this page Value []*EnvironmentResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // EnvironmentResourceUpdate - The environment resource type EnvironmentResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentVariable - Environment variables type type EnvironmentVariable struct { -// The value of the environment variable + // The value of the environment variable Value *string -// The reference to the variable + // The reference to the variable ValueFrom *EnvironmentVariableReference } // EnvironmentVariableReference - The reference to the variable type EnvironmentVariableReference struct { -// REQUIRED; The secret reference + // REQUIRED; The secret reference SecretRef *SecretReference } // EphemeralVolume - Specifies an ephemeral volume for a container type EphemeralVolume struct { -// REQUIRED; Discriminator property for Volume. + // REQUIRED; Discriminator property for Volume. Kind *string -// REQUIRED; Backing store for the ephemeral volume + // REQUIRED; Backing store for the ephemeral volume ManagedStore *ManagedStore -// The path where the volume is mounted + // The path where the volume is mounted MountPath *string } // GetVolume implements the VolumeClassification interface for type EphemeralVolume. func (e *EphemeralVolume) GetVolume() *Volume { return &Volume{ - Kind: e.Kind, + Kind: e.Kind, MountPath: e.MountPath, } } // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { -// READ-ONLY; The additional info. + // READ-ONLY; The additional info. Info map[string]any -// READ-ONLY; The additional info type. + // READ-ONLY; The additional info type. Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { -// READ-ONLY; The error additional info. + // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo -// READ-ONLY; The error code. + // READ-ONLY; The error code. Code *string -// READ-ONLY; The error details. + // READ-ONLY; The error details. Details []*ErrorDetail -// READ-ONLY; The error message. + // READ-ONLY; The error message. Message *string -// READ-ONLY; The error target. + // READ-ONLY; The error target. Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { -// The error object. + // The error object. Error *ErrorDetail } // ExecHealthProbeProperties - Specifies the properties for readiness/liveness probe using an executable type ExecHealthProbeProperties struct { -// REQUIRED; Command to execute to probe readiness/liveness + // REQUIRED; Command to execute to probe readiness/liveness Command *string -// REQUIRED; Discriminator property for HealthProbeProperties. + // REQUIRED; Discriminator property for HealthProbeProperties. Kind *string -// Threshold number of times the probe fails after which a failure would be reported + // Threshold number of times the probe fails after which a failure would be reported FailureThreshold *float32 -// Initial delay in seconds before probing for readiness/liveness + // Initial delay in seconds before probing for readiness/liveness InitialDelaySeconds *float32 -// Interval for the readiness/liveness probe in seconds + // Interval for the readiness/liveness probe in seconds PeriodSeconds *float32 -// Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds + // Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds TimeoutSeconds *float32 } // GetHealthProbeProperties implements the HealthProbePropertiesClassification interface for type ExecHealthProbeProperties. func (e *ExecHealthProbeProperties) GetHealthProbeProperties() *HealthProbeProperties { return &HealthProbeProperties{ - FailureThreshold: e.FailureThreshold, + FailureThreshold: e.FailureThreshold, InitialDelaySeconds: e.InitialDelaySeconds, - Kind: e.Kind, - PeriodSeconds: e.PeriodSeconds, - TimeoutSeconds: e.TimeoutSeconds, + Kind: e.Kind, + PeriodSeconds: e.PeriodSeconds, + TimeoutSeconds: e.TimeoutSeconds, } } // ExtenderProperties - ExtenderResource portable resource properties type ExtenderProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// OPTIONAL; Contains additional key/value pairs not defined in the schema. + // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The recipe used to automatically deploy underlying infrastructure for the extender portable resource + // The recipe used to automatically deploy underlying infrastructure for the extender portable resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// The secrets for referenced resource + // The secrets for referenced resource Secrets map[string]any -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // ExtenderResource portable resource type ExtenderResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *ExtenderProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ExtenderResourceListResult - The response of a ExtenderResource list operation. type ExtenderResourceListResult struct { -// REQUIRED; The ExtenderResource items on this page + // REQUIRED; The ExtenderResource items on this page Value []*ExtenderResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ExtenderResourceUpdate - ExtenderResource portable resource type ExtenderResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // Extension of a environment/application resource. type Extension struct { -// REQUIRED; Discriminator property for Extension. + // REQUIRED; Discriminator property for Extension. Kind *string } @@ -744,196 +744,196 @@ func (e *Extension) GetExtension() *Extension { return e } // GatewayHostname - Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io. type GatewayHostname struct { -// Specify a fully-qualified domain name: myapp.mydomain.com. Mutually exclusive with 'prefix' and will take priority if both -// are defined. + // Specify a fully-qualified domain name: myapp.mydomain.com. Mutually exclusive with 'prefix' and will take priority if both + // are defined. FullyQualifiedHostname *string -// Specify a prefix for the hostname: myhostname.myapp.PUBLICHOSTNAMEORIP.nip.io. Mutually exclusive with 'fullyQualifiedHostname' -// and will be overridden if both are defined. + // Specify a prefix for the hostname: myhostname.myapp.PUBLICHOSTNAMEORIP.nip.io. Mutually exclusive with 'fullyQualifiedHostname' + // and will be overridden if both are defined. Prefix *string } // GatewayProperties - Gateway properties type GatewayProperties struct { -// REQUIRED; Fully qualified resource ID for the application + // REQUIRED; Fully qualified resource ID for the application Application *string -// REQUIRED; Routes attached to this Gateway + // REQUIRED; Routes attached to this Gateway Routes []*GatewayRoute -// Fully qualified resource ID for the environment that the application is linked to + // Fully qualified resource ID for the environment that the application is linked to Environment *string -// Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io. + // Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io. Hostname *GatewayHostname -// Sets Gateway to not be exposed externally (no public IP address associated). Defaults to false (exposed to internet). + // Sets Gateway to not be exposed externally (no public IP address associated). Defaults to false (exposed to internet). Internal *bool -// TLS configuration for the Gateway. + // TLS configuration for the Gateway. TLS *GatewayTLS -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus -// READ-ONLY; URL of the gateway resource. Readonly + // READ-ONLY; URL of the gateway resource. Readonly URL *string } // GatewayResource - Concrete tracked resource types can be created by aliasing this type using a specific property type. type GatewayResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *GatewayProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // GatewayResourceListResult - The response of a GatewayResource list operation. type GatewayResourceListResult struct { -// REQUIRED; The GatewayResource items on this page + // REQUIRED; The GatewayResource items on this page Value []*GatewayResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // GatewayResourceUpdate - Concrete tracked resource types can be created by aliasing this type using a specific property // type. type GatewayResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // GatewayRoute - Route attached to Gateway type GatewayRoute struct { -// The URL or id of the service to route to. Ex - 'http://myservice'. + // The URL or id of the service to route to. Ex - 'http://myservice'. Destination *string -// Enables websocket support for the route. Defaults to false. + // Enables websocket support for the route. Defaults to false. EnableWebsockets *bool -// The path to match the incoming request path on. Ex - /myservice. + // The path to match the incoming request path on. Ex - /myservice. Path *string -// Optionally update the prefix when sending the request to the service. Ex - replacePrefix: '/' and path: '/myservice' will -// transform '/myservice/myroute' to '/myroute' + // Optionally update the prefix when sending the request to the service. Ex - replacePrefix: '/' and path: '/myservice' will + // transform '/myservice/myroute' to '/myroute' ReplacePrefix *string -// The timeout policy for the route. + // The timeout policy for the route. TimeoutPolicy *GatewayRouteTimeoutPolicy } // GatewayRouteTimeoutPolicy - Gateway route timeout policy type GatewayRouteTimeoutPolicy struct { -// The backend request timeout in duration for the route. Cannot be greater than the request timeout. + // The backend request timeout in duration for the route. Cannot be greater than the request timeout. BackendRequest *string -// The request timeout in duration for the route. Defaults to 15 seconds. + // The request timeout in duration for the route. Defaults to 15 seconds. Request *string } // GatewayTLS - TLS configuration definition for Gateway resource. type GatewayTLS struct { -// The resource id for the secret containing the TLS certificate and key for the gateway. + // The resource id for the secret containing the TLS certificate and key for the gateway. CertificateFrom *string -// TLS minimum protocol version (defaults to 1.2). + // TLS minimum protocol version (defaults to 1.2). MinimumProtocolVersion *TLSMinVersion -// If true, gateway lets the https traffic sslPassthrough to the backend servers for decryption. + // If true, gateway lets the https traffic sslPassthrough to the backend servers for decryption. SSLPassthrough *bool } // GitAuthConfig - Authentication information used to access private Terraform modules from Git repository sources. type GitAuthConfig struct { -// Personal Access Token (PAT) configuration used to authenticate to Git platforms. + // Personal Access Token (PAT) configuration used to authenticate to Git platforms. Pat map[string]*SecretConfig } // HTTPGetHealthProbeProperties - Specifies the properties for readiness/liveness probe using HTTP Get type HTTPGetHealthProbeProperties struct { -// REQUIRED; The listening port number + // REQUIRED; The listening port number ContainerPort *int32 -// REQUIRED; Discriminator property for HealthProbeProperties. + // REQUIRED; Discriminator property for HealthProbeProperties. Kind *string -// REQUIRED; The route to make the HTTP request on + // REQUIRED; The route to make the HTTP request on Path *string -// Threshold number of times the probe fails after which a failure would be reported + // Threshold number of times the probe fails after which a failure would be reported FailureThreshold *float32 -// Custom HTTP headers to add to the get request + // Custom HTTP headers to add to the get request Headers map[string]*string -// Initial delay in seconds before probing for readiness/liveness + // Initial delay in seconds before probing for readiness/liveness InitialDelaySeconds *float32 -// Interval for the readiness/liveness probe in seconds + // Interval for the readiness/liveness probe in seconds PeriodSeconds *float32 -// Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds + // Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds TimeoutSeconds *float32 } // GetHealthProbeProperties implements the HealthProbePropertiesClassification interface for type HTTPGetHealthProbeProperties. func (h *HTTPGetHealthProbeProperties) GetHealthProbeProperties() *HealthProbeProperties { return &HealthProbeProperties{ - FailureThreshold: h.FailureThreshold, + FailureThreshold: h.FailureThreshold, InitialDelaySeconds: h.InitialDelaySeconds, - Kind: h.Kind, - PeriodSeconds: h.PeriodSeconds, - TimeoutSeconds: h.TimeoutSeconds, + Kind: h.Kind, + PeriodSeconds: h.PeriodSeconds, + TimeoutSeconds: h.TimeoutSeconds, } } // HealthProbeProperties - Properties for readiness/liveness probe type HealthProbeProperties struct { -// REQUIRED; Discriminator property for HealthProbeProperties. + // REQUIRED; Discriminator property for HealthProbeProperties. Kind *string -// Threshold number of times the probe fails after which a failure would be reported + // Threshold number of times the probe fails after which a failure would be reported FailureThreshold *float32 -// Initial delay in seconds before probing for readiness/liveness + // Initial delay in seconds before probing for readiness/liveness InitialDelaySeconds *float32 -// Interval for the readiness/liveness probe in seconds + // Interval for the readiness/liveness probe in seconds PeriodSeconds *float32 -// Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds + // Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds TimeoutSeconds *float32 } @@ -942,73 +942,73 @@ func (h *HealthProbeProperties) GetHealthProbeProperties() *HealthProbePropertie // IamProperties - IAM properties type IamProperties struct { -// REQUIRED; The kind of IAM provider to configure + // REQUIRED; The kind of IAM provider to configure Kind *IAMKind -// RBAC permissions to be assigned on the source resource + // RBAC permissions to be assigned on the source resource Roles []*string } // IdentitySettings is the external identity setting. type IdentitySettings struct { -// REQUIRED; kind of identity setting + // REQUIRED; kind of identity setting Kind *IdentitySettingKind -// The list of user assigned managed identities + // The list of user assigned managed identities ManagedIdentity []*string -// The URI for your compute platform's OIDC issuer + // The URI for your compute platform's OIDC issuer OidcIssuer *string -// The resource ID of the provisioned identity + // The resource ID of the provisioned identity Resource *string } // KeyObjectProperties - Represents key object properties type KeyObjectProperties struct { -// REQUIRED; The name of the key + // REQUIRED; The name of the key Name *string -// File name when written to disk + // File name when written to disk Alias *string -// Key version + // Key version Version *string } // KubernetesCompute - The Kubernetes compute configuration type KubernetesCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// REQUIRED; The namespace to use for the environment. + // REQUIRED; The namespace to use for the environment. Namespace *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type KubernetesCompute. func (k *KubernetesCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: k.Identity, - Kind: k.Kind, + Identity: k.Identity, + Kind: k.Kind, ResourceID: k.ResourceID, } } // KubernetesMetadataExtension - Kubernetes metadata extension of a environment/application resource. type KubernetesMetadataExtension struct { -// REQUIRED; Discriminator property for Extension. + // REQUIRED; Discriminator property for Extension. Kind *string -// Annotations to be applied to the Kubernetes resources output by the resource + // Annotations to be applied to the Kubernetes resources output by the resource Annotations map[string]*string -// Labels to be applied to the Kubernetes resources output by the resource + // Labels to be applied to the Kubernetes resources output by the resource Labels map[string]*string } @@ -1021,10 +1021,10 @@ func (k *KubernetesMetadataExtension) GetExtension() *Extension { // KubernetesNamespaceExtension - Kubernetes namespace extension of a environment/application resource. type KubernetesNamespaceExtension struct { -// REQUIRED; Discriminator property for Extension. + // REQUIRED; Discriminator property for Extension. Kind *string -// REQUIRED; The namespace of the application environment. + // REQUIRED; The namespace of the application environment. Namespace *string } @@ -1037,20 +1037,20 @@ func (k *KubernetesNamespaceExtension) GetExtension() *Extension { // KubernetesRuntimeProperties - The runtime configuration properties for Kubernetes type KubernetesRuntimeProperties struct { -// The serialized YAML manifest which represents the base Kubernetes resources to deploy, such as Deployment, Service, ServiceAccount, -// Secrets, and ConfigMaps. + // The serialized YAML manifest which represents the base Kubernetes resources to deploy, such as Deployment, Service, ServiceAccount, + // Secrets, and ConfigMaps. Base *string -// A strategic merge patch that will be applied to the PodSpec object when this container is being deployed. + // A strategic merge patch that will be applied to the PodSpec object when this container is being deployed. Pod map[string]any } // ManualScalingExtension - ManualScaling Extension type ManualScalingExtension struct { -// REQUIRED; Discriminator property for Extension. + // REQUIRED; Discriminator property for Extension. Kind *string -// REQUIRED; Replica count. + // REQUIRED; Replica count. Replicas *int32 } @@ -1063,86 +1063,86 @@ func (m *ManualScalingExtension) GetExtension() *Extension { // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { -// Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay -// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType -// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane -// operations. + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. IsDataAction *bool -// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", -// "Microsoft.Compute/virtualMachines/capture/action" + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" Name *string -// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default -// value is "user,system" + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" Origin *Origin } // OperationDisplay - Localized display information for this particular operation. type OperationDisplay struct { -// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string -// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual -// Machine", "Restart Virtual Machine". + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". Operation *string -// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft -// Compute". + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". Provider *string -// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job -// Schedule Collections". + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". Resource *string } // OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to // get the next set of results. type OperationListResult struct { -// READ-ONLY; URL to get the next set of operation list results (if there are any). + // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string -// READ-ONLY; List of operations supported by the resource provider + // READ-ONLY; List of operations supported by the resource provider Value []*Operation } // OutputResource - Properties of an output resource. type OutputResource struct { -// The UCP resource ID of the underlying resource. + // The UCP resource ID of the underlying resource. ID *string -// The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency -// relationship. LocalIDs do not have any particular format or meaning beyond -// being compared to determine dependency relationships. + // The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency + // relationship. LocalIDs do not have any particular format or meaning beyond + // being compared to determine dependency relationships. LocalID *string -// Determines whether Radius manages the lifecycle of the underlying resource. + // Determines whether Radius manages the lifecycle of the underlying resource. RadiusManaged *bool } // PersistentVolume - Specifies a persistent volume for a container type PersistentVolume struct { -// REQUIRED; Discriminator property for Volume. + // REQUIRED; Discriminator property for Volume. Kind *string -// REQUIRED; The source of the volume + // REQUIRED; The source of the volume Source *string -// The path where the volume is mounted + // The path where the volume is mounted MountPath *string -// Container read/write access to the volume + // Container read/write access to the volume Permission *VolumePermission } // GetVolume implements the VolumeClassification interface for type PersistentVolume. func (p *PersistentVolume) GetVolume() *Volume { return &Volume{ - Kind: p.Kind, + Kind: p.Kind, MountPath: p.MountPath, } } @@ -1150,99 +1150,99 @@ func (p *PersistentVolume) GetVolume() *Volume { // ProviderConfigProperties - This configuration holds the necessary information to authenticate and interact with a provider // for the recipe execution. type ProviderConfigProperties struct { -// OPTIONAL; Contains additional key/value pairs not defined in the schema. + // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any -// Sensitive data in provider configuration can be stored as secrets. The secrets are stored in Applications.Core/SecretStores -// resource. + // Sensitive data in provider configuration can be stored as secrets. The secrets are stored in Applications.Core/SecretStores + // resource. Secrets map[string]*SecretReference } // Providers - The Cloud providers configuration. type Providers struct { -// The AWS cloud provider configuration. + // The AWS cloud provider configuration. Aws *ProvidersAws -// The Azure cloud provider configuration. + // The Azure cloud provider configuration. Azure *ProvidersAzure } // ProvidersAws - The AWS cloud provider definition. type ProvidersAws struct { -// REQUIRED; Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'. + // REQUIRED; Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'. Scope *string } // ProvidersAzure - The Azure cloud provider definition. type ProvidersAzure struct { -// REQUIRED; Target scope for Azure resources to be deployed into. For example: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup'. + // REQUIRED; Target scope for Azure resources to be deployed into. For example: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup'. Scope *string } // Recipe - The recipe used to automatically deploy underlying infrastructure for a portable resource type Recipe struct { -// REQUIRED; The name of the recipe within the environment to use + // REQUIRED; The name of the recipe within the environment to use Name *string -// Key/value parameters to pass into the recipe at deployment + // Key/value parameters to pass into the recipe at deployment Parameters map[string]any } // RecipeConfigProperties - Configuration for Recipes. Defines how each type of Recipe should be configured and run. type RecipeConfigProperties struct { -// Configuration for Bicep Recipes. Controls how Bicep plans and applies templates as part of Recipe deployment. + // Configuration for Bicep Recipes. Controls how Bicep plans and applies templates as part of Recipe deployment. Bicep *BicepConfigProperties -// Environment variables injected during recipe execution for the recipes in the environment, currently supported for Terraform -// recipes. + // Environment variables injected during recipe execution for the recipes in the environment, currently supported for Terraform + // recipes. Env map[string]*string -// Environment variables containing sensitive information can be stored as secrets. The secrets are stored in Applications.Core/SecretStores -// resource. + // Environment variables containing sensitive information can be stored as secrets. The secrets are stored in Applications.Core/SecretStores + // resource. EnvSecrets map[string]*SecretReference -// Configuration for Terraform Recipes. Controls how Terraform plans and applies templates as part of Recipe deployment. + // Configuration for Terraform Recipes. Controls how Terraform plans and applies templates as part of Recipe deployment. Terraform *TerraformConfigProperties } // RecipeGetMetadata - Represents the request body of the getmetadata action. type RecipeGetMetadata struct { -// REQUIRED; The name of the recipe registered to the environment. + // REQUIRED; The name of the recipe registered to the environment. Name *string -// REQUIRED; Type of the resource this recipe can be consumed by. For example: 'Applications.Datastores/mongoDatabases'. + // REQUIRED; Type of the resource this recipe can be consumed by. For example: 'Applications.Datastores/mongoDatabases'. ResourceType *string } // RecipeGetMetadataResponse - The properties of a Recipe linked to an Environment. type RecipeGetMetadataResponse struct { -// REQUIRED; The key/value parameters to pass to the recipe template at deployment. + // REQUIRED; The key/value parameters to pass to the recipe template at deployment. Parameters map[string]any -// REQUIRED; The format of the template provided by the recipe. Allowed values: bicep, terraform. + // REQUIRED; The format of the template provided by the recipe. Allowed values: bicep, terraform. TemplateKind *string -// REQUIRED; The path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. + // REQUIRED; The path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. TemplatePath *string -// Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, -// for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS). + // Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, + // for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS). PlainHTTP *bool -// The version of the template to deploy. For Terraform recipes using a module registry this is required, but must be omitted -// for other module sources. + // The version of the template to deploy. For Terraform recipes using a module registry this is required, but must be omitted + // for other module sources. TemplateVersion *string } // RecipeProperties - Format of the template provided by the recipe. Allowed values: bicep, terraform. type RecipeProperties struct { -// REQUIRED; Discriminator property for RecipeProperties. + // REQUIRED; Discriminator property for RecipeProperties. TemplateKind *string -// REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. + // REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. TemplatePath *string -// Key/value parameters to pass to the recipe template at deployment. + // Key/value parameters to pass to the recipe template at deployment. Parameters map[string]any } @@ -1251,280 +1251,280 @@ func (r *RecipeProperties) GetRecipeProperties() *RecipeProperties { return r } // RecipeStatus - Recipe status at deployment time for a resource. type RecipeStatus struct { -// REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. + // REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. TemplateKind *string -// REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. + // REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. TemplatePath *string -// TemplateVersion is the version number of the template. + // TemplateVersion is the version number of the template. TemplateVersion *string } // RegistrySecretConfig - Registry Secret Configuration used to authenticate to private bicep registries. type RegistrySecretConfig struct { -// The ID of an Applications.Core/SecretStore resource containing credential information used to authenticate private container -// registry.The keys in the secretstore depends on the type. + // The ID of an Applications.Core/SecretStore resource containing credential information used to authenticate private container + // registry.The keys in the secretstore depends on the type. Secret *string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceReference - Describes a reference to an existing resource type ResourceReference struct { -// REQUIRED; Resource id of an existing resource + // REQUIRED; Resource id of an existing resource ID *string } // ResourceStatus - Status of a resource. type ResourceStatus struct { -// The compute resource associated with the resource. + // The compute resource associated with the resource. Compute EnvironmentComputeClassification -// Properties of an output resource + // Properties of an output resource OutputResources []*OutputResource -// READ-ONLY; The recipe data at the time of deployment + // READ-ONLY; The recipe data at the time of deployment Recipe *RecipeStatus } // RuntimesProperties - The properties for runtime configuration type RuntimesProperties struct { -// The runtime configuration properties for ACI + // The runtime configuration properties for ACI Aci *ACIRuntimeProperties -// The runtime configuration properties for Kubernetes + // The runtime configuration properties for Kubernetes Kubernetes *KubernetesRuntimeProperties } // SecretConfig - Personal Access Token (PAT) configuration used to authenticate to Git platforms. type SecretConfig struct { -// The ID of an Applications.Core/SecretStore resource containing the Git platform personal access token (PAT). The secret -// store must have a secret named 'pat', containing the PAT value. A secret named -// 'username' is optional, containing the username associated with the pat. By default no username is specified. + // The ID of an Applications.Core/SecretStore resource containing the Git platform personal access token (PAT). The secret + // store must have a secret named 'pat', containing the PAT value. A secret named + // 'username' is optional, containing the username associated with the pat. By default no username is specified. Secret *string } // SecretObjectProperties - Represents secret object properties type SecretObjectProperties struct { -// REQUIRED; The name of the secret + // REQUIRED; The name of the secret Name *string -// File name when written to disk + // File name when written to disk Alias *string -// Encoding format. Default utf-8 + // Encoding format. Default utf-8 Encoding *VolumeSecretEncodings -// secret version + // secret version Version *string } // SecretReference - This secret is used within a recipe. Secrets are encrypted, often have fine-grained access control, auditing // and are recommended to be used to hold sensitive data. type SecretReference struct { -// REQUIRED; The key for the secret in the secret store. + // REQUIRED; The key for the secret in the secret store. Key *string -// REQUIRED; The ID of an Applications.Core/SecretStore resource containing sensitive data required for recipe execution. + // REQUIRED; The ID of an Applications.Core/SecretStore resource containing sensitive data required for recipe execution. Source *string } // SecretStoreListSecretsResult - The list of secrets type SecretStoreListSecretsResult struct { -// REQUIRED; An object to represent key-value type secrets + // REQUIRED; An object to represent key-value type secrets Data map[string]*SecretValueProperties -// REQUIRED; The type of secret store data + // REQUIRED; The type of secret store data Type *SecretStoreDataType } // SecretStoreProperties - The properties of SecretStore type SecretStoreProperties struct { -// REQUIRED; An object to represent key-value type secrets + // REQUIRED; An object to represent key-value type secrets Data map[string]*SecretValueProperties -// Fully qualified resource ID for the application + // Fully qualified resource ID for the application Application *string -// Fully qualified resource ID for the environment that the application is linked to + // Fully qualified resource ID for the environment that the application is linked to Environment *string -// The resource id of external secret store. + // The resource id of external secret store. Resource *string -// The type of secret store data + // The type of secret store data Type *SecretStoreDataType -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // SecretStoreResource - Concrete tracked resource types can be created by aliasing this type using a specific property type. type SecretStoreResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *SecretStoreProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // SecretStoreResourceListResult - The response of a SecretStoreResource list operation. type SecretStoreResourceListResult struct { -// REQUIRED; The SecretStoreResource items on this page + // REQUIRED; The SecretStoreResource items on this page Value []*SecretStoreResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // SecretStoreResourceUpdate - Concrete tracked resource types can be created by aliasing this type using a specific property // type. type SecretStoreResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // SecretValueProperties - The properties of SecretValue type SecretValueProperties struct { -// The encoding of value + // The encoding of value Encoding *SecretValueEncoding -// The value of secret. + // The value of secret. Value *string -// The referenced secret in properties.resource + // The referenced secret in properties.resource ValueFrom *ValueFromProperties } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { -// The timestamp of resource creation (UTC). + // The timestamp of resource creation (UTC). CreatedAt *time.Time -// The identity that created the resource. + // The identity that created the resource. CreatedBy *string -// The type of identity that created the resource. + // The type of identity that created the resource. CreatedByType *CreatedByType -// The timestamp of resource last modification (UTC) + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time -// The identity that last modified the resource. + // The identity that last modified the resource. LastModifiedBy *string -// The type of identity that last modified the resource. + // The type of identity that last modified the resource. LastModifiedByType *CreatedByType } // TCPHealthProbeProperties - Specifies the properties for readiness/liveness probe using TCP type TCPHealthProbeProperties struct { -// REQUIRED; The listening port number + // REQUIRED; The listening port number ContainerPort *int32 -// REQUIRED; Discriminator property for HealthProbeProperties. + // REQUIRED; Discriminator property for HealthProbeProperties. Kind *string -// Threshold number of times the probe fails after which a failure would be reported + // Threshold number of times the probe fails after which a failure would be reported FailureThreshold *float32 -// Initial delay in seconds before probing for readiness/liveness + // Initial delay in seconds before probing for readiness/liveness InitialDelaySeconds *float32 -// Interval for the readiness/liveness probe in seconds + // Interval for the readiness/liveness probe in seconds PeriodSeconds *float32 -// Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds + // Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds TimeoutSeconds *float32 } // GetHealthProbeProperties implements the HealthProbePropertiesClassification interface for type TCPHealthProbeProperties. func (t *TCPHealthProbeProperties) GetHealthProbeProperties() *HealthProbeProperties { return &HealthProbeProperties{ - FailureThreshold: t.FailureThreshold, + FailureThreshold: t.FailureThreshold, InitialDelaySeconds: t.InitialDelaySeconds, - Kind: t.Kind, - PeriodSeconds: t.PeriodSeconds, - TimeoutSeconds: t.TimeoutSeconds, + Kind: t.Kind, + PeriodSeconds: t.PeriodSeconds, + TimeoutSeconds: t.TimeoutSeconds, } } // TerraformConfigProperties - Configuration for Terraform Recipes. Controls how Terraform plans and applies templates as // part of Recipe deployment. type TerraformConfigProperties struct { -// Authentication information used to access private Terraform module sources. Supported module sources: Git. + // Authentication information used to access private Terraform module sources. Supported module sources: Git. Authentication *AuthConfig -// Configuration for Terraform Recipe Providers. Controls how Terraform interacts with cloud providers, SaaS providers, and -// other APIs. For more information, please see: -// https://developer.hashicorp.com/terraform/language/providers/configuration. + // Configuration for Terraform Recipe Providers. Controls how Terraform interacts with cloud providers, SaaS providers, and + // other APIs. For more information, please see: + // https://developer.hashicorp.com/terraform/language/providers/configuration. Providers map[string][]*ProviderConfigProperties } // TerraformRecipeProperties - Represents Terraform recipe properties. type TerraformRecipeProperties struct { -// REQUIRED; Discriminator property for RecipeProperties. + // REQUIRED; Discriminator property for RecipeProperties. TemplateKind *string -// REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. + // REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. TemplatePath *string -// Key/value parameters to pass to the recipe template at deployment. + // Key/value parameters to pass to the recipe template at deployment. Parameters map[string]any -// Version of the template to deploy. For Terraform recipes using a module registry this is required, but must be omitted -// for other module sources. + // Version of the template to deploy. For Terraform recipes using a module registry this is required, but must be omitted + // for other module sources. TemplateVersion *string } // GetRecipeProperties implements the RecipePropertiesClassification interface for type TerraformRecipeProperties. func (t *TerraformRecipeProperties) GetRecipeProperties() *RecipeProperties { return &RecipeProperties{ - Parameters: t.Parameters, + Parameters: t.Parameters, TemplateKind: t.TemplateKind, TemplatePath: t.TemplatePath, } @@ -1533,40 +1533,40 @@ func (t *TerraformRecipeProperties) GetRecipeProperties() *RecipeProperties { // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ValueFromProperties - The Secret value source properties type ValueFromProperties struct { -// REQUIRED; The name of the referenced secret. + // REQUIRED; The name of the referenced secret. Name *string -// The version of the referenced secret. + // The version of the referenced secret. Version *string } // Volume - Specifies a volume for a container type Volume struct { -// REQUIRED; Discriminator property for Volume. + // REQUIRED; Discriminator property for Volume. Kind *string -// The path where the volume is mounted + // The path where the volume is mounted MountPath *string } @@ -1575,19 +1575,19 @@ func (v *Volume) GetVolume() *Volume { return v } // VolumeProperties - Volume properties type VolumeProperties struct { -// REQUIRED; Fully qualified resource ID for the application + // REQUIRED; Fully qualified resource ID for the application Application *string -// REQUIRED; Discriminator property for VolumeProperties. + // REQUIRED; Discriminator property for VolumeProperties. Kind *string -// Fully qualified resource ID for the environment that the application is linked to + // Fully qualified resource ID for the environment that the application is linked to Environment *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } @@ -1596,52 +1596,51 @@ func (v *VolumeProperties) GetVolumeProperties() *VolumeProperties { return v } // VolumeResource - Radius Volume resource. type VolumeResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties VolumePropertiesClassification -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // VolumeResourceListResult - The response of a VolumeResource list operation. type VolumeResourceListResult struct { -// REQUIRED; The VolumeResource items on this page + // REQUIRED; The VolumeResource items on this page Value []*VolumeResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // VolumeResourceUpdate - Radius Volume resource. type VolumeResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go b/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go index 67397ff2ec..66f50a761a 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go @@ -28,7 +28,7 @@ func (a *ACIRuntimeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "gatewayID": - err = unpopulate(val, "GatewayID", &a.GatewayID) + err = unpopulate(val, "GatewayID", &a.GatewayID) delete(rawMsg, key) } if err != nil { @@ -56,10 +56,10 @@ func (a *ApplicationGraphConnection) UnmarshalJSON(data []byte) error { var err error switch key { case "direction": - err = unpopulate(val, "Direction", &a.Direction) + err = unpopulate(val, "Direction", &a.Direction) delete(rawMsg, key) case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) } if err != nil { @@ -88,13 +88,13 @@ func (a *ApplicationGraphOutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -126,22 +126,22 @@ func (a *ApplicationGraphResource) UnmarshalJSON(data []byte) error { var err error switch key { case "connections": - err = unpopulate(val, "Connections", &a.Connections) + err = unpopulate(val, "Connections", &a.Connections) delete(rawMsg, key) case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &a.OutputResources) + err = unpopulate(val, "OutputResources", &a.OutputResources) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -168,7 +168,7 @@ func (a *ApplicationGraphResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "resources": - err = unpopulate(val, "Resources", &a.Resources) + err = unpopulate(val, "Resources", &a.Resources) delete(rawMsg, key) } if err != nil { @@ -198,16 +198,16 @@ func (a *ApplicationProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "environment": - err = unpopulate(val, "Environment", &a.Environment) + err = unpopulate(val, "Environment", &a.Environment) delete(rawMsg, key) case "extensions": a.Extensions, err = unmarshalExtensionClassificationArray(val) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &a.Status) + err = unpopulate(val, "Status", &a.Status) delete(rawMsg, key) } if err != nil { @@ -240,25 +240,25 @@ func (a *ApplicationResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -286,10 +286,10 @@ func (a *ApplicationResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -320,19 +320,19 @@ func (a *ApplicationResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -359,7 +359,7 @@ func (a *AuthConfig) UnmarshalJSON(data []byte) error { var err error switch key { case "git": - err = unpopulate(val, "Git", &a.Git) + err = unpopulate(val, "Git", &a.Git) delete(rawMsg, key) } if err != nil { @@ -389,16 +389,16 @@ func (a *AzureContainerInstanceCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &a.Identity) + err = unpopulate(val, "Identity", &a.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) + err = unpopulate(val, "ResourceID", &a.ResourceID) delete(rawMsg, key) } if err != nil { @@ -426,10 +426,10 @@ func (a *AzureContainerInstanceExtension) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) delete(rawMsg, key) } if err != nil { @@ -464,31 +464,31 @@ func (a *AzureKeyVaultVolumeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &a.Application) + err = unpopulate(val, "Application", &a.Application) delete(rawMsg, key) case "certificates": - err = unpopulate(val, "Certificates", &a.Certificates) + err = unpopulate(val, "Certificates", &a.Certificates) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &a.Environment) + err = unpopulate(val, "Environment", &a.Environment) delete(rawMsg, key) case "keys": - err = unpopulate(val, "Keys", &a.Keys) + err = unpopulate(val, "Keys", &a.Keys) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &a.Resource) + err = unpopulate(val, "Resource", &a.Resource) delete(rawMsg, key) case "secrets": - err = unpopulate(val, "Secrets", &a.Secrets) + err = unpopulate(val, "Secrets", &a.Secrets) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &a.Status) + err = unpopulate(val, "Status", &a.Status) delete(rawMsg, key) } if err != nil { @@ -519,19 +519,19 @@ func (a *AzureResourceManagerCommonTypesTrackedResourceUpdate) UnmarshalJSON(dat var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -558,7 +558,7 @@ func (b *BicepConfigProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "authentication": - err = unpopulate(val, "Authentication", &b.Authentication) + err = unpopulate(val, "Authentication", &b.Authentication) delete(rawMsg, key) } if err != nil { @@ -588,16 +588,16 @@ func (b *BicepRecipeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "parameters": - err = unpopulate(val, "Parameters", &b.Parameters) + err = unpopulate(val, "Parameters", &b.Parameters) delete(rawMsg, key) case "plainHttp": - err = unpopulate(val, "PlainHTTP", &b.PlainHTTP) + err = unpopulate(val, "PlainHTTP", &b.PlainHTTP) delete(rawMsg, key) case "templateKind": - err = unpopulate(val, "TemplateKind", &b.TemplateKind) + err = unpopulate(val, "TemplateKind", &b.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &b.TemplatePath) + err = unpopulate(val, "TemplatePath", &b.TemplatePath) delete(rawMsg, key) } if err != nil { @@ -629,22 +629,22 @@ func (c *CertificateObjectProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "alias": - err = unpopulate(val, "Alias", &c.Alias) + err = unpopulate(val, "Alias", &c.Alias) delete(rawMsg, key) case "certType": - err = unpopulate(val, "CertType", &c.CertType) + err = unpopulate(val, "CertType", &c.CertType) delete(rawMsg, key) case "encoding": - err = unpopulate(val, "Encoding", &c.Encoding) + err = unpopulate(val, "Encoding", &c.Encoding) delete(rawMsg, key) case "format": - err = unpopulate(val, "Format", &c.Format) + err = unpopulate(val, "Format", &c.Format) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &c.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &c.Version) + err = unpopulate(val, "Version", &c.Version) delete(rawMsg, key) } if err != nil { @@ -673,13 +673,13 @@ func (c *ConnectionProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "disableDefaultEnvVars": - err = unpopulate(val, "DisableDefaultEnvVars", &c.DisableDefaultEnvVars) + err = unpopulate(val, "DisableDefaultEnvVars", &c.DisableDefaultEnvVars) delete(rawMsg, key) case "iam": - err = unpopulate(val, "Iam", &c.Iam) + err = unpopulate(val, "Iam", &c.Iam) delete(rawMsg, key) case "source": - err = unpopulate(val, "Source", &c.Source) + err = unpopulate(val, "Source", &c.Source) delete(rawMsg, key) } if err != nil { @@ -715,25 +715,25 @@ func (c *Container) UnmarshalJSON(data []byte) error { var err error switch key { case "args": - err = unpopulate(val, "Args", &c.Args) + err = unpopulate(val, "Args", &c.Args) delete(rawMsg, key) case "command": - err = unpopulate(val, "Command", &c.Command) + err = unpopulate(val, "Command", &c.Command) delete(rawMsg, key) case "env": - err = unpopulate(val, "Env", &c.Env) + err = unpopulate(val, "Env", &c.Env) delete(rawMsg, key) case "image": - err = unpopulate(val, "Image", &c.Image) + err = unpopulate(val, "Image", &c.Image) delete(rawMsg, key) case "imagePullPolicy": - err = unpopulate(val, "ImagePullPolicy", &c.ImagePullPolicy) + err = unpopulate(val, "ImagePullPolicy", &c.ImagePullPolicy) delete(rawMsg, key) case "livenessProbe": c.LivenessProbe, err = unmarshalHealthProbePropertiesClassification(val) delete(rawMsg, key) case "ports": - err = unpopulate(val, "Ports", &c.Ports) + err = unpopulate(val, "Ports", &c.Ports) delete(rawMsg, key) case "readinessProbe": c.ReadinessProbe, err = unmarshalHealthProbePropertiesClassification(val) @@ -742,7 +742,7 @@ func (c *Container) UnmarshalJSON(data []byte) error { c.Volumes, err = unmarshalVolumeClassificationMap(val) delete(rawMsg, key) case "workingDir": - err = unpopulate(val, "WorkingDir", &c.WorkingDir) + err = unpopulate(val, "WorkingDir", &c.WorkingDir) delete(rawMsg, key) } if err != nil { @@ -772,16 +772,16 @@ func (c *ContainerPortProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "containerPort": - err = unpopulate(val, "ContainerPort", &c.ContainerPort) + err = unpopulate(val, "ContainerPort", &c.ContainerPort) delete(rawMsg, key) case "port": - err = unpopulate(val, "Port", &c.Port) + err = unpopulate(val, "Port", &c.Port) delete(rawMsg, key) case "protocol": - err = unpopulate(val, "Protocol", &c.Protocol) + err = unpopulate(val, "Protocol", &c.Protocol) delete(rawMsg, key) case "scheme": - err = unpopulate(val, "Scheme", &c.Scheme) + err = unpopulate(val, "Scheme", &c.Scheme) delete(rawMsg, key) } if err != nil { @@ -819,40 +819,40 @@ func (c *ContainerProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &c.Application) + err = unpopulate(val, "Application", &c.Application) delete(rawMsg, key) case "connections": - err = unpopulate(val, "Connections", &c.Connections) + err = unpopulate(val, "Connections", &c.Connections) delete(rawMsg, key) case "container": - err = unpopulate(val, "Container", &c.Container) + err = unpopulate(val, "Container", &c.Container) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &c.Environment) + err = unpopulate(val, "Environment", &c.Environment) delete(rawMsg, key) case "extensions": c.Extensions, err = unmarshalExtensionClassificationArray(val) delete(rawMsg, key) case "identity": - err = unpopulate(val, "Identity", &c.Identity) + err = unpopulate(val, "Identity", &c.Identity) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &c.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &c.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &c.Resources) + err = unpopulate(val, "Resources", &c.Resources) delete(rawMsg, key) case "restartPolicy": - err = unpopulate(val, "RestartPolicy", &c.RestartPolicy) + err = unpopulate(val, "RestartPolicy", &c.RestartPolicy) delete(rawMsg, key) case "runtimes": - err = unpopulate(val, "Runtimes", &c.Runtimes) + err = unpopulate(val, "Runtimes", &c.Runtimes) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &c.Status) + err = unpopulate(val, "Status", &c.Status) delete(rawMsg, key) } if err != nil { @@ -885,25 +885,25 @@ func (c *ContainerResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &c.ID) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &c.Location) + err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &c.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &c.Properties) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &c.Tags) + err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &c.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -931,10 +931,10 @@ func (c *ContainerResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &c.Value) + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { @@ -965,19 +965,19 @@ func (c *ContainerResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &c.ID) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &c.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &c.Tags) + err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &c.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -1008,19 +1008,19 @@ func (d *DaprSidecarExtension) UnmarshalJSON(data []byte) error { var err error switch key { case "appId": - err = unpopulate(val, "AppID", &d.AppID) + err = unpopulate(val, "AppID", &d.AppID) delete(rawMsg, key) case "appPort": - err = unpopulate(val, "AppPort", &d.AppPort) + err = unpopulate(val, "AppPort", &d.AppPort) delete(rawMsg, key) case "config": - err = unpopulate(val, "Config", &d.Config) + err = unpopulate(val, "Config", &d.Config) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &d.Kind) + err = unpopulate(val, "Kind", &d.Kind) delete(rawMsg, key) case "protocol": - err = unpopulate(val, "Protocol", &d.Protocol) + err = unpopulate(val, "Protocol", &d.Protocol) delete(rawMsg, key) } if err != nil { @@ -1049,13 +1049,13 @@ func (e *EnvironmentCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &e.Identity) + err = unpopulate(val, "Identity", &e.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) + err = unpopulate(val, "ResourceID", &e.ResourceID) delete(rawMsg, key) } if err != nil { @@ -1094,13 +1094,13 @@ func (e *EnvironmentProperties) UnmarshalJSON(data []byte) error { e.Extensions, err = unmarshalExtensionClassificationArray(val) delete(rawMsg, key) case "providers": - err = unpopulate(val, "Providers", &e.Providers) + err = unpopulate(val, "Providers", &e.Providers) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) delete(rawMsg, key) case "recipeConfig": - err = unpopulate(val, "RecipeConfig", &e.RecipeConfig) + err = unpopulate(val, "RecipeConfig", &e.RecipeConfig) delete(rawMsg, key) case "recipes": var recipesRaw map[string]json.RawMessage @@ -1117,7 +1117,7 @@ func (e *EnvironmentProperties) UnmarshalJSON(data []byte) error { e.Recipes = recipes delete(rawMsg, key) case "simulated": - err = unpopulate(val, "Simulated", &e.Simulated) + err = unpopulate(val, "Simulated", &e.Simulated) delete(rawMsg, key) } if err != nil { @@ -1150,25 +1150,25 @@ func (e *EnvironmentResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &e.ID) + err = unpopulate(val, "ID", &e.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &e.Location) + err = unpopulate(val, "Location", &e.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &e.Name) + err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &e.Properties) + err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) + err = unpopulate(val, "SystemData", &e.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &e.Tags) + err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -1196,10 +1196,10 @@ func (e *EnvironmentResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) + err = unpopulate(val, "NextLink", &e.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &e.Value) + err = unpopulate(val, "Value", &e.Value) delete(rawMsg, key) } if err != nil { @@ -1230,19 +1230,19 @@ func (e *EnvironmentResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &e.ID) + err = unpopulate(val, "ID", &e.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &e.Name) + err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) + err = unpopulate(val, "SystemData", &e.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &e.Tags) + err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -1270,10 +1270,10 @@ func (e *EnvironmentVariable) UnmarshalJSON(data []byte) error { var err error switch key { case "value": - err = unpopulate(val, "Value", &e.Value) + err = unpopulate(val, "Value", &e.Value) delete(rawMsg, key) case "valueFrom": - err = unpopulate(val, "ValueFrom", &e.ValueFrom) + err = unpopulate(val, "ValueFrom", &e.ValueFrom) delete(rawMsg, key) } if err != nil { @@ -1300,7 +1300,7 @@ func (e *EnvironmentVariableReference) UnmarshalJSON(data []byte) error { var err error switch key { case "secretRef": - err = unpopulate(val, "SecretRef", &e.SecretRef) + err = unpopulate(val, "SecretRef", &e.SecretRef) delete(rawMsg, key) } if err != nil { @@ -1329,13 +1329,13 @@ func (e *EphemeralVolume) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "managedStore": - err = unpopulate(val, "ManagedStore", &e.ManagedStore) + err = unpopulate(val, "ManagedStore", &e.ManagedStore) delete(rawMsg, key) case "mountPath": - err = unpopulate(val, "MountPath", &e.MountPath) + err = unpopulate(val, "MountPath", &e.MountPath) delete(rawMsg, key) } if err != nil { @@ -1363,10 +1363,10 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) + err = unpopulate(val, "Info", &e.Info) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -1397,19 +1397,19 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &e.Details) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &e.Target) delete(rawMsg, key) } if err != nil { @@ -1436,7 +1436,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -1468,22 +1468,22 @@ func (e *ExecHealthProbeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "command": - err = unpopulate(val, "Command", &e.Command) + err = unpopulate(val, "Command", &e.Command) delete(rawMsg, key) case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &e.FailureThreshold) + err = unpopulate(val, "FailureThreshold", &e.FailureThreshold) delete(rawMsg, key) case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &e.InitialDelaySeconds) + err = unpopulate(val, "InitialDelaySeconds", &e.InitialDelaySeconds) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &e.PeriodSeconds) + err = unpopulate(val, "PeriodSeconds", &e.PeriodSeconds) delete(rawMsg, key) case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &e.TimeoutSeconds) + err = unpopulate(val, "TimeoutSeconds", &e.TimeoutSeconds) delete(rawMsg, key) } if err != nil { @@ -1521,25 +1521,25 @@ func (e *ExtenderProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &e.Application) + err = unpopulate(val, "Application", &e.Application) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &e.Environment) + err = unpopulate(val, "Environment", &e.Environment) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &e.Recipe) + err = unpopulate(val, "Recipe", &e.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &e.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &e.ResourceProvisioning) delete(rawMsg, key) case "secrets": - err = unpopulate(val, "Secrets", &e.Secrets) + err = unpopulate(val, "Secrets", &e.Secrets) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &e.Status) + err = unpopulate(val, "Status", &e.Status) delete(rawMsg, key) default: if e.AdditionalProperties == nil { @@ -1582,25 +1582,25 @@ func (e *ExtenderResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &e.ID) + err = unpopulate(val, "ID", &e.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &e.Location) + err = unpopulate(val, "Location", &e.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &e.Name) + err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &e.Properties) + err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) + err = unpopulate(val, "SystemData", &e.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &e.Tags) + err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -1628,10 +1628,10 @@ func (e *ExtenderResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) + err = unpopulate(val, "NextLink", &e.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &e.Value) + err = unpopulate(val, "Value", &e.Value) delete(rawMsg, key) } if err != nil { @@ -1662,19 +1662,19 @@ func (e *ExtenderResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &e.ID) + err = unpopulate(val, "ID", &e.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &e.Name) + err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) + err = unpopulate(val, "SystemData", &e.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &e.Tags) + err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -1701,7 +1701,7 @@ func (e *Extension) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) } if err != nil { @@ -1729,10 +1729,10 @@ func (g *GatewayHostname) UnmarshalJSON(data []byte) error { var err error switch key { case "fullyQualifiedHostname": - err = unpopulate(val, "FullyQualifiedHostname", &g.FullyQualifiedHostname) + err = unpopulate(val, "FullyQualifiedHostname", &g.FullyQualifiedHostname) delete(rawMsg, key) case "prefix": - err = unpopulate(val, "Prefix", &g.Prefix) + err = unpopulate(val, "Prefix", &g.Prefix) delete(rawMsg, key) } if err != nil { @@ -1767,31 +1767,31 @@ func (g *GatewayProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &g.Application) + err = unpopulate(val, "Application", &g.Application) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &g.Environment) + err = unpopulate(val, "Environment", &g.Environment) delete(rawMsg, key) case "hostname": - err = unpopulate(val, "Hostname", &g.Hostname) + err = unpopulate(val, "Hostname", &g.Hostname) delete(rawMsg, key) case "internal": - err = unpopulate(val, "Internal", &g.Internal) + err = unpopulate(val, "Internal", &g.Internal) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) delete(rawMsg, key) case "routes": - err = unpopulate(val, "Routes", &g.Routes) + err = unpopulate(val, "Routes", &g.Routes) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &g.Status) + err = unpopulate(val, "Status", &g.Status) delete(rawMsg, key) case "tls": - err = unpopulate(val, "TLS", &g.TLS) + err = unpopulate(val, "TLS", &g.TLS) delete(rawMsg, key) case "url": - err = unpopulate(val, "URL", &g.URL) + err = unpopulate(val, "URL", &g.URL) delete(rawMsg, key) } if err != nil { @@ -1824,25 +1824,25 @@ func (g *GatewayResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &g.ID) + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &g.Location) + err = unpopulate(val, "Location", &g.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &g.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &g.Tags) + err = unpopulate(val, "Tags", &g.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) } if err != nil { @@ -1870,10 +1870,10 @@ func (g *GatewayResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) + err = unpopulate(val, "NextLink", &g.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) + err = unpopulate(val, "Value", &g.Value) delete(rawMsg, key) } if err != nil { @@ -1904,19 +1904,19 @@ func (g *GatewayResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &g.ID) + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &g.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &g.Tags) + err = unpopulate(val, "Tags", &g.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) } if err != nil { @@ -1947,19 +1947,19 @@ func (g *GatewayRoute) UnmarshalJSON(data []byte) error { var err error switch key { case "destination": - err = unpopulate(val, "Destination", &g.Destination) + err = unpopulate(val, "Destination", &g.Destination) delete(rawMsg, key) case "enableWebsockets": - err = unpopulate(val, "EnableWebsockets", &g.EnableWebsockets) + err = unpopulate(val, "EnableWebsockets", &g.EnableWebsockets) delete(rawMsg, key) case "path": - err = unpopulate(val, "Path", &g.Path) + err = unpopulate(val, "Path", &g.Path) delete(rawMsg, key) case "replacePrefix": - err = unpopulate(val, "ReplacePrefix", &g.ReplacePrefix) + err = unpopulate(val, "ReplacePrefix", &g.ReplacePrefix) delete(rawMsg, key) case "timeoutPolicy": - err = unpopulate(val, "TimeoutPolicy", &g.TimeoutPolicy) + err = unpopulate(val, "TimeoutPolicy", &g.TimeoutPolicy) delete(rawMsg, key) } if err != nil { @@ -1987,10 +1987,10 @@ func (g *GatewayRouteTimeoutPolicy) UnmarshalJSON(data []byte) error { var err error switch key { case "backendRequest": - err = unpopulate(val, "BackendRequest", &g.BackendRequest) + err = unpopulate(val, "BackendRequest", &g.BackendRequest) delete(rawMsg, key) case "request": - err = unpopulate(val, "Request", &g.Request) + err = unpopulate(val, "Request", &g.Request) delete(rawMsg, key) } if err != nil { @@ -2019,13 +2019,13 @@ func (g *GatewayTLS) UnmarshalJSON(data []byte) error { var err error switch key { case "certificateFrom": - err = unpopulate(val, "CertificateFrom", &g.CertificateFrom) + err = unpopulate(val, "CertificateFrom", &g.CertificateFrom) delete(rawMsg, key) case "minimumProtocolVersion": - err = unpopulate(val, "MinimumProtocolVersion", &g.MinimumProtocolVersion) + err = unpopulate(val, "MinimumProtocolVersion", &g.MinimumProtocolVersion) delete(rawMsg, key) case "sslPassthrough": - err = unpopulate(val, "SSLPassthrough", &g.SSLPassthrough) + err = unpopulate(val, "SSLPassthrough", &g.SSLPassthrough) delete(rawMsg, key) } if err != nil { @@ -2052,7 +2052,7 @@ func (g *GitAuthConfig) UnmarshalJSON(data []byte) error { var err error switch key { case "pat": - err = unpopulate(val, "Pat", &g.Pat) + err = unpopulate(val, "Pat", &g.Pat) delete(rawMsg, key) } if err != nil { @@ -2086,28 +2086,28 @@ func (h *HTTPGetHealthProbeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "containerPort": - err = unpopulate(val, "ContainerPort", &h.ContainerPort) + err = unpopulate(val, "ContainerPort", &h.ContainerPort) delete(rawMsg, key) case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &h.FailureThreshold) + err = unpopulate(val, "FailureThreshold", &h.FailureThreshold) delete(rawMsg, key) case "headers": - err = unpopulate(val, "Headers", &h.Headers) + err = unpopulate(val, "Headers", &h.Headers) delete(rawMsg, key) case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &h.InitialDelaySeconds) + err = unpopulate(val, "InitialDelaySeconds", &h.InitialDelaySeconds) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &h.Kind) + err = unpopulate(val, "Kind", &h.Kind) delete(rawMsg, key) case "path": - err = unpopulate(val, "Path", &h.Path) + err = unpopulate(val, "Path", &h.Path) delete(rawMsg, key) case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &h.PeriodSeconds) + err = unpopulate(val, "PeriodSeconds", &h.PeriodSeconds) delete(rawMsg, key) case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &h.TimeoutSeconds) + err = unpopulate(val, "TimeoutSeconds", &h.TimeoutSeconds) delete(rawMsg, key) } if err != nil { @@ -2138,19 +2138,19 @@ func (h *HealthProbeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &h.FailureThreshold) + err = unpopulate(val, "FailureThreshold", &h.FailureThreshold) delete(rawMsg, key) case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &h.InitialDelaySeconds) + err = unpopulate(val, "InitialDelaySeconds", &h.InitialDelaySeconds) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &h.Kind) + err = unpopulate(val, "Kind", &h.Kind) delete(rawMsg, key) case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &h.PeriodSeconds) + err = unpopulate(val, "PeriodSeconds", &h.PeriodSeconds) delete(rawMsg, key) case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &h.TimeoutSeconds) + err = unpopulate(val, "TimeoutSeconds", &h.TimeoutSeconds) delete(rawMsg, key) } if err != nil { @@ -2178,10 +2178,10 @@ func (i *IamProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "roles": - err = unpopulate(val, "Roles", &i.Roles) + err = unpopulate(val, "Roles", &i.Roles) delete(rawMsg, key) } if err != nil { @@ -2211,16 +2211,16 @@ func (i *IdentitySettings) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "managedIdentity": - err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) + err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) delete(rawMsg, key) case "oidcIssuer": - err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) + err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &i.Resource) + err = unpopulate(val, "Resource", &i.Resource) delete(rawMsg, key) } if err != nil { @@ -2249,13 +2249,13 @@ func (k *KeyObjectProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "alias": - err = unpopulate(val, "Alias", &k.Alias) + err = unpopulate(val, "Alias", &k.Alias) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &k.Name) + err = unpopulate(val, "Name", &k.Name) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &k.Version) + err = unpopulate(val, "Version", &k.Version) delete(rawMsg, key) } if err != nil { @@ -2285,16 +2285,16 @@ func (k *KubernetesCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &k.Identity) + err = unpopulate(val, "Identity", &k.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + err = unpopulate(val, "Namespace", &k.Namespace) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) + err = unpopulate(val, "ResourceID", &k.ResourceID) delete(rawMsg, key) } if err != nil { @@ -2323,13 +2323,13 @@ func (k *KubernetesMetadataExtension) UnmarshalJSON(data []byte) error { var err error switch key { case "annotations": - err = unpopulate(val, "Annotations", &k.Annotations) + err = unpopulate(val, "Annotations", &k.Annotations) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "labels": - err = unpopulate(val, "Labels", &k.Labels) + err = unpopulate(val, "Labels", &k.Labels) delete(rawMsg, key) } if err != nil { @@ -2357,10 +2357,10 @@ func (k *KubernetesNamespaceExtension) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + err = unpopulate(val, "Namespace", &k.Namespace) delete(rawMsg, key) } if err != nil { @@ -2388,10 +2388,10 @@ func (k *KubernetesRuntimeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "base": - err = unpopulate(val, "Base", &k.Base) + err = unpopulate(val, "Base", &k.Base) delete(rawMsg, key) case "pod": - err = unpopulate(val, "Pod", &k.Pod) + err = unpopulate(val, "Pod", &k.Pod) delete(rawMsg, key) } if err != nil { @@ -2419,10 +2419,10 @@ func (m *ManualScalingExtension) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &m.Kind) + err = unpopulate(val, "Kind", &m.Kind) delete(rawMsg, key) case "replicas": - err = unpopulate(val, "Replicas", &m.Replicas) + err = unpopulate(val, "Replicas", &m.Replicas) delete(rawMsg, key) } if err != nil { @@ -2453,19 +2453,19 @@ func (o *Operation) UnmarshalJSON(data []byte) error { var err error switch key { case "actionType": - err = unpopulate(val, "ActionType", &o.ActionType) + err = unpopulate(val, "ActionType", &o.ActionType) delete(rawMsg, key) case "display": - err = unpopulate(val, "Display", &o.Display) + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) + err = unpopulate(val, "IsDataAction", &o.IsDataAction) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "origin": - err = unpopulate(val, "Origin", &o.Origin) + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { @@ -2495,16 +2495,16 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { var err error switch key { case "description": - err = unpopulate(val, "Description", &o.Description) + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) case "operation": - err = unpopulate(val, "Operation", &o.Operation) + err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) case "provider": - err = unpopulate(val, "Provider", &o.Provider) + err = unpopulate(val, "Provider", &o.Provider) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &o.Resource) + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { @@ -2532,10 +2532,10 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &o.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { @@ -2564,13 +2564,13 @@ func (o *OutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &o.ID) + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) case "localId": - err = unpopulate(val, "LocalID", &o.LocalID) + err = unpopulate(val, "LocalID", &o.LocalID) delete(rawMsg, key) case "radiusManaged": - err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) + err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) delete(rawMsg, key) } if err != nil { @@ -2600,16 +2600,16 @@ func (p *PersistentVolume) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &p.Kind) + err = unpopulate(val, "Kind", &p.Kind) delete(rawMsg, key) case "mountPath": - err = unpopulate(val, "MountPath", &p.MountPath) + err = unpopulate(val, "MountPath", &p.MountPath) delete(rawMsg, key) case "permission": - err = unpopulate(val, "Permission", &p.Permission) + err = unpopulate(val, "Permission", &p.Permission) delete(rawMsg, key) case "source": - err = unpopulate(val, "Source", &p.Source) + err = unpopulate(val, "Source", &p.Source) delete(rawMsg, key) } if err != nil { @@ -2641,7 +2641,7 @@ func (p *ProviderConfigProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "secrets": - err = unpopulate(val, "Secrets", &p.Secrets) + err = unpopulate(val, "Secrets", &p.Secrets) delete(rawMsg, key) default: if p.AdditionalProperties == nil { @@ -2679,10 +2679,10 @@ func (p *Providers) UnmarshalJSON(data []byte) error { var err error switch key { case "aws": - err = unpopulate(val, "Aws", &p.Aws) + err = unpopulate(val, "Aws", &p.Aws) delete(rawMsg, key) case "azure": - err = unpopulate(val, "Azure", &p.Azure) + err = unpopulate(val, "Azure", &p.Azure) delete(rawMsg, key) } if err != nil { @@ -2709,7 +2709,7 @@ func (p *ProvidersAws) UnmarshalJSON(data []byte) error { var err error switch key { case "scope": - err = unpopulate(val, "Scope", &p.Scope) + err = unpopulate(val, "Scope", &p.Scope) delete(rawMsg, key) } if err != nil { @@ -2736,7 +2736,7 @@ func (p *ProvidersAzure) UnmarshalJSON(data []byte) error { var err error switch key { case "scope": - err = unpopulate(val, "Scope", &p.Scope) + err = unpopulate(val, "Scope", &p.Scope) delete(rawMsg, key) } if err != nil { @@ -2764,10 +2764,10 @@ func (r *Recipe) UnmarshalJSON(data []byte) error { var err error switch key { case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) } if err != nil { @@ -2797,16 +2797,16 @@ func (r *RecipeConfigProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "bicep": - err = unpopulate(val, "Bicep", &r.Bicep) + err = unpopulate(val, "Bicep", &r.Bicep) delete(rawMsg, key) case "env": - err = unpopulate(val, "Env", &r.Env) + err = unpopulate(val, "Env", &r.Env) delete(rawMsg, key) case "envSecrets": - err = unpopulate(val, "EnvSecrets", &r.EnvSecrets) + err = unpopulate(val, "EnvSecrets", &r.EnvSecrets) delete(rawMsg, key) case "terraform": - err = unpopulate(val, "Terraform", &r.Terraform) + err = unpopulate(val, "Terraform", &r.Terraform) delete(rawMsg, key) } if err != nil { @@ -2834,10 +2834,10 @@ func (r *RecipeGetMetadata) UnmarshalJSON(data []byte) error { var err error switch key { case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) + err = unpopulate(val, "ResourceType", &r.ResourceType) delete(rawMsg, key) } if err != nil { @@ -2868,19 +2868,19 @@ func (r *RecipeGetMetadataResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) case "plainHttp": - err = unpopulate(val, "PlainHTTP", &r.PlainHTTP) + err = unpopulate(val, "PlainHTTP", &r.PlainHTTP) delete(rawMsg, key) case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -2909,13 +2909,13 @@ func (r *RecipeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) } if err != nil { @@ -2944,13 +2944,13 @@ func (r *RecipeStatus) UnmarshalJSON(data []byte) error { var err error switch key { case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -2977,7 +2977,7 @@ func (r *RegistrySecretConfig) UnmarshalJSON(data []byte) error { var err error switch key { case "secret": - err = unpopulate(val, "Secret", &r.Secret) + err = unpopulate(val, "Secret", &r.Secret) delete(rawMsg, key) } if err != nil { @@ -3007,16 +3007,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -3043,7 +3043,7 @@ func (r *ResourceReference) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) } if err != nil { @@ -3075,10 +3075,10 @@ func (r *ResourceStatus) UnmarshalJSON(data []byte) error { r.Compute, err = unmarshalEnvironmentComputeClassification(val) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &r.OutputResources) + err = unpopulate(val, "OutputResources", &r.OutputResources) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) } if err != nil { @@ -3106,10 +3106,10 @@ func (r *RuntimesProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "aci": - err = unpopulate(val, "Aci", &r.Aci) + err = unpopulate(val, "Aci", &r.Aci) delete(rawMsg, key) case "kubernetes": - err = unpopulate(val, "Kubernetes", &r.Kubernetes) + err = unpopulate(val, "Kubernetes", &r.Kubernetes) delete(rawMsg, key) } if err != nil { @@ -3136,7 +3136,7 @@ func (s *SecretConfig) UnmarshalJSON(data []byte) error { var err error switch key { case "secret": - err = unpopulate(val, "Secret", &s.Secret) + err = unpopulate(val, "Secret", &s.Secret) delete(rawMsg, key) } if err != nil { @@ -3166,16 +3166,16 @@ func (s *SecretObjectProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "alias": - err = unpopulate(val, "Alias", &s.Alias) + err = unpopulate(val, "Alias", &s.Alias) delete(rawMsg, key) case "encoding": - err = unpopulate(val, "Encoding", &s.Encoding) + err = unpopulate(val, "Encoding", &s.Encoding) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &s.Version) + err = unpopulate(val, "Version", &s.Version) delete(rawMsg, key) } if err != nil { @@ -3203,10 +3203,10 @@ func (s *SecretReference) UnmarshalJSON(data []byte) error { var err error switch key { case "key": - err = unpopulate(val, "Key", &s.Key) + err = unpopulate(val, "Key", &s.Key) delete(rawMsg, key) case "source": - err = unpopulate(val, "Source", &s.Source) + err = unpopulate(val, "Source", &s.Source) delete(rawMsg, key) } if err != nil { @@ -3234,10 +3234,10 @@ func (s *SecretStoreListSecretsResult) UnmarshalJSON(data []byte) error { var err error switch key { case "data": - err = unpopulate(val, "Data", &s.Data) + err = unpopulate(val, "Data", &s.Data) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &s.Type) + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -3270,25 +3270,25 @@ func (s *SecretStoreProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &s.Application) + err = unpopulate(val, "Application", &s.Application) delete(rawMsg, key) case "data": - err = unpopulate(val, "Data", &s.Data) + err = unpopulate(val, "Data", &s.Data) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &s.Environment) + err = unpopulate(val, "Environment", &s.Environment) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &s.Resource) + err = unpopulate(val, "Resource", &s.Resource) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &s.Status) + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &s.Type) + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -3321,25 +3321,25 @@ func (s *SecretStoreResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &s.ID) + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &s.Location) + err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &s.Properties) + err = unpopulate(val, "Properties", &s.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) + err = unpopulate(val, "SystemData", &s.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &s.Tags) + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &s.Type) + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -3367,10 +3367,10 @@ func (s *SecretStoreResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &s.Value) + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -3401,19 +3401,19 @@ func (s *SecretStoreResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &s.ID) + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) + err = unpopulate(val, "SystemData", &s.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &s.Tags) + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &s.Type) + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -3442,13 +3442,13 @@ func (s *SecretValueProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "encoding": - err = unpopulate(val, "Encoding", &s.Encoding) + err = unpopulate(val, "Encoding", &s.Encoding) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &s.Value) + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) case "valueFrom": - err = unpopulate(val, "ValueFrom", &s.ValueFrom) + err = unpopulate(val, "ValueFrom", &s.ValueFrom) delete(rawMsg, key) } if err != nil { @@ -3480,22 +3480,22 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { @@ -3527,22 +3527,22 @@ func (t *TCPHealthProbeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "containerPort": - err = unpopulate(val, "ContainerPort", &t.ContainerPort) + err = unpopulate(val, "ContainerPort", &t.ContainerPort) delete(rawMsg, key) case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &t.FailureThreshold) + err = unpopulate(val, "FailureThreshold", &t.FailureThreshold) delete(rawMsg, key) case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &t.InitialDelaySeconds) + err = unpopulate(val, "InitialDelaySeconds", &t.InitialDelaySeconds) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &t.Kind) + err = unpopulate(val, "Kind", &t.Kind) delete(rawMsg, key) case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &t.PeriodSeconds) + err = unpopulate(val, "PeriodSeconds", &t.PeriodSeconds) delete(rawMsg, key) case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &t.TimeoutSeconds) + err = unpopulate(val, "TimeoutSeconds", &t.TimeoutSeconds) delete(rawMsg, key) } if err != nil { @@ -3570,10 +3570,10 @@ func (t *TerraformConfigProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "authentication": - err = unpopulate(val, "Authentication", &t.Authentication) + err = unpopulate(val, "Authentication", &t.Authentication) delete(rawMsg, key) case "providers": - err = unpopulate(val, "Providers", &t.Providers) + err = unpopulate(val, "Providers", &t.Providers) delete(rawMsg, key) } if err != nil { @@ -3603,16 +3603,16 @@ func (t *TerraformRecipeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "parameters": - err = unpopulate(val, "Parameters", &t.Parameters) + err = unpopulate(val, "Parameters", &t.Parameters) delete(rawMsg, key) case "templateKind": - err = unpopulate(val, "TemplateKind", &t.TemplateKind) + err = unpopulate(val, "TemplateKind", &t.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &t.TemplatePath) + err = unpopulate(val, "TemplatePath", &t.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &t.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &t.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -3644,22 +3644,22 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) + err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) + err = unpopulate(val, "SystemData", &t.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -3687,10 +3687,10 @@ func (v *ValueFromProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "name": - err = unpopulate(val, "Name", &v.Name) + err = unpopulate(val, "Name", &v.Name) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &v.Version) + err = unpopulate(val, "Version", &v.Version) delete(rawMsg, key) } if err != nil { @@ -3718,10 +3718,10 @@ func (v *Volume) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &v.Kind) + err = unpopulate(val, "Kind", &v.Kind) delete(rawMsg, key) case "mountPath": - err = unpopulate(val, "MountPath", &v.MountPath) + err = unpopulate(val, "MountPath", &v.MountPath) delete(rawMsg, key) } if err != nil { @@ -3752,19 +3752,19 @@ func (v *VolumeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &v.Application) + err = unpopulate(val, "Application", &v.Application) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &v.Environment) + err = unpopulate(val, "Environment", &v.Environment) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &v.Kind) + err = unpopulate(val, "Kind", &v.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &v.Status) + err = unpopulate(val, "Status", &v.Status) delete(rawMsg, key) } if err != nil { @@ -3797,25 +3797,25 @@ func (v *VolumeResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &v.ID) + err = unpopulate(val, "ID", &v.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &v.Location) + err = unpopulate(val, "Location", &v.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &v.Name) + err = unpopulate(val, "Name", &v.Name) delete(rawMsg, key) case "properties": v.Properties, err = unmarshalVolumePropertiesClassification(val) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &v.SystemData) + err = unpopulate(val, "SystemData", &v.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &v.Tags) + err = unpopulate(val, "Tags", &v.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &v.Type) + err = unpopulate(val, "Type", &v.Type) delete(rawMsg, key) } if err != nil { @@ -3843,10 +3843,10 @@ func (v *VolumeResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) + err = unpopulate(val, "NextLink", &v.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &v.Value) + err = unpopulate(val, "Value", &v.Value) delete(rawMsg, key) } if err != nil { @@ -3877,19 +3877,19 @@ func (v *VolumeResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &v.ID) + err = unpopulate(val, "ID", &v.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &v.Name) + err = unpopulate(val, "Name", &v.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &v.SystemData) + err = unpopulate(val, "SystemData", &v.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &v.Tags) + err = unpopulate(val, "Tags", &v.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &v.Type) + err = unpopulate(val, "Type", &v.Type) delete(rawMsg, key) } if err != nil { @@ -3918,4 +3918,3 @@ func unpopulate(data json.RawMessage, fn string, v any) error { } return nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_operations_client.go b/pkg/corerp/api/v20231001preview/zz_generated_operations_client.go index f199e24bda..c0523083f3 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_operations_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_operations_client.go @@ -28,7 +28,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return nil, err } client := &OperationsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -37,7 +37,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // // Generated from API version 2023-10-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) (*runtime.Pager[OperationsClientListResponse]) { +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -54,7 +54,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return OperationsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -81,4 +81,3 @@ func (client *OperationsClient) listHandleResponse(resp *http.Response) (Operati } return result, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_options.go b/pkg/corerp/api/v20231001preview/zz_generated_options.go index 3d8e22c67a..ef594492a2 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_options.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_options.go @@ -37,19 +37,19 @@ type ApplicationsClientUpdateOptions struct { // ContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainersClient.BeginCreateOrUpdate // method. type ContainersClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainersClientBeginDeleteOptions contains the optional parameters for the ContainersClient.BeginDelete method. type ContainersClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainersClientBeginUpdateOptions contains the optional parameters for the ContainersClient.BeginUpdate method. type ContainersClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -96,19 +96,19 @@ type EnvironmentsClientUpdateOptions struct { // ExtendersClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendersClient.BeginCreateOrUpdate // method. type ExtendersClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ExtendersClientBeginDeleteOptions contains the optional parameters for the ExtendersClient.BeginDelete method. type ExtendersClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ExtendersClientBeginUpdateOptions contains the optional parameters for the ExtendersClient.BeginUpdate method. type ExtendersClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -129,19 +129,19 @@ type ExtendersClientListSecretsOptions struct { // GatewaysClientBeginCreateOptions contains the optional parameters for the GatewaysClient.BeginCreate method. type GatewaysClientBeginCreateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate method. type GatewaysClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. type GatewaysClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -163,19 +163,19 @@ type OperationsClientListOptions struct { // SecretStoresClientBeginCreateOrUpdateOptions contains the optional parameters for the SecretStoresClient.BeginCreateOrUpdate // method. type SecretStoresClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // SecretStoresClientBeginDeleteOptions contains the optional parameters for the SecretStoresClient.BeginDelete method. type SecretStoresClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // SecretStoresClientBeginUpdateOptions contains the optional parameters for the SecretStoresClient.BeginUpdate method. type SecretStoresClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -196,19 +196,19 @@ type SecretStoresClientListSecretsOptions struct { // VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate method. type VolumesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method. type VolumesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method. type VolumesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -221,4 +221,3 @@ type VolumesClientGetOptions struct { type VolumesClientListByScopeOptions struct { // placeholder for future optional parameters } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_polymorphic_helpers.go b/pkg/corerp/api/v20231001preview/zz_generated_polymorphic_helpers.go index f5efa3e94b..4d0941f101 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_polymorphic_helpers.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_polymorphic_helpers.go @@ -206,4 +206,3 @@ func unmarshalVolumePropertiesClassification(rawMsg json.RawMessage) (VolumeProp } return b, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_responses.go b/pkg/corerp/api/v20231001preview/zz_generated_responses.go index 2d0542c82d..a762745fbb 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_responses.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_responses.go @@ -6,7 +6,7 @@ package v20231001preview // ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate. type ApplicationsClientCreateOrUpdateResponse struct { -// Radius Application resource + // Radius Application resource ApplicationResource } @@ -17,31 +17,31 @@ type ApplicationsClientDeleteResponse struct { // ApplicationsClientGetGraphResponse contains the response from method ApplicationsClient.GetGraph. type ApplicationsClientGetGraphResponse struct { -// Describes the application architecture and its dependencies. + // Describes the application architecture and its dependencies. ApplicationGraphResponse } // ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get. type ApplicationsClientGetResponse struct { -// Radius Application resource + // Radius Application resource ApplicationResource } // ApplicationsClientListByScopeResponse contains the response from method ApplicationsClient.NewListByScopePager. type ApplicationsClientListByScopeResponse struct { -// The response of a ApplicationResource list operation. + // The response of a ApplicationResource list operation. ApplicationResourceListResult } // ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update. type ApplicationsClientUpdateResponse struct { -// Radius Application resource + // Radius Application resource ApplicationResource } // ContainersClientCreateOrUpdateResponse contains the response from method ContainersClient.BeginCreateOrUpdate. type ContainersClientCreateOrUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. ContainerResource } @@ -52,25 +52,25 @@ type ContainersClientDeleteResponse struct { // ContainersClientGetResponse contains the response from method ContainersClient.Get. type ContainersClientGetResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. ContainerResource } // ContainersClientListByScopeResponse contains the response from method ContainersClient.NewListByScopePager. type ContainersClientListByScopeResponse struct { -// The response of a ContainerResource list operation. + // The response of a ContainerResource list operation. ContainerResourceListResult } // ContainersClientUpdateResponse contains the response from method ContainersClient.BeginUpdate. type ContainersClientUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. ContainerResource } // EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.CreateOrUpdate. type EnvironmentsClientCreateOrUpdateResponse struct { -// The environment resource + // The environment resource EnvironmentResource } @@ -81,31 +81,31 @@ type EnvironmentsClientDeleteResponse struct { // EnvironmentsClientGetMetadataResponse contains the response from method EnvironmentsClient.GetMetadata. type EnvironmentsClientGetMetadataResponse struct { -// The properties of a Recipe linked to an Environment. + // The properties of a Recipe linked to an Environment. RecipeGetMetadataResponse } // EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. type EnvironmentsClientGetResponse struct { -// The environment resource + // The environment resource EnvironmentResource } // EnvironmentsClientListByScopeResponse contains the response from method EnvironmentsClient.NewListByScopePager. type EnvironmentsClientListByScopeResponse struct { -// The response of a EnvironmentResource list operation. + // The response of a EnvironmentResource list operation. EnvironmentResourceListResult } // EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. type EnvironmentsClientUpdateResponse struct { -// The environment resource + // The environment resource EnvironmentResource } // ExtendersClientCreateOrUpdateResponse contains the response from method ExtendersClient.BeginCreateOrUpdate. type ExtendersClientCreateOrUpdateResponse struct { -// ExtenderResource portable resource + // ExtenderResource portable resource ExtenderResource } @@ -116,37 +116,37 @@ type ExtendersClientDeleteResponse struct { // ExtendersClientGetResponse contains the response from method ExtendersClient.Get. type ExtendersClientGetResponse struct { -// ExtenderResource portable resource + // ExtenderResource portable resource ExtenderResource } // ExtendersClientListByScopeResponse contains the response from method ExtendersClient.NewListByScopePager. type ExtendersClientListByScopeResponse struct { -// The response of a ExtenderResource list operation. + // The response of a ExtenderResource list operation. ExtenderResourceListResult } // ExtendersClientListSecretsResponse contains the response from method ExtendersClient.ListSecrets. type ExtendersClientListSecretsResponse struct { -// Response for list secrets API call + // Response for list secrets API call Value map[string]any } // ExtendersClientUpdateResponse contains the response from method ExtendersClient.BeginUpdate. type ExtendersClientUpdateResponse struct { -// ExtenderResource portable resource + // ExtenderResource portable resource ExtenderResource } // GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.BeginCreateOrUpdate. type GatewaysClientCreateOrUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. GatewayResource } // GatewaysClientCreateResponse contains the response from method GatewaysClient.BeginCreate. type GatewaysClientCreateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. GatewayResource } @@ -157,25 +157,25 @@ type GatewaysClientDeleteResponse struct { // GatewaysClientGetResponse contains the response from method GatewaysClient.Get. type GatewaysClientGetResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. GatewayResource } // GatewaysClientListByScopeResponse contains the response from method GatewaysClient.NewListByScopePager. type GatewaysClientListByScopeResponse struct { -// The response of a GatewayResource list operation. + // The response of a GatewayResource list operation. GatewayResourceListResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { -// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult } // SecretStoresClientCreateOrUpdateResponse contains the response from method SecretStoresClient.BeginCreateOrUpdate. type SecretStoresClientCreateOrUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. SecretStoreResource } @@ -186,31 +186,31 @@ type SecretStoresClientDeleteResponse struct { // SecretStoresClientGetResponse contains the response from method SecretStoresClient.Get. type SecretStoresClientGetResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. SecretStoreResource } // SecretStoresClientListByScopeResponse contains the response from method SecretStoresClient.NewListByScopePager. type SecretStoresClientListByScopeResponse struct { -// The response of a SecretStoreResource list operation. + // The response of a SecretStoreResource list operation. SecretStoreResourceListResult } // SecretStoresClientListSecretsResponse contains the response from method SecretStoresClient.ListSecrets. type SecretStoresClientListSecretsResponse struct { -// The list of secrets + // The list of secrets SecretStoreListSecretsResult } // SecretStoresClientUpdateResponse contains the response from method SecretStoresClient.BeginUpdate. type SecretStoresClientUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. SecretStoreResource } // VolumesClientCreateOrUpdateResponse contains the response from method VolumesClient.BeginCreateOrUpdate. type VolumesClientCreateOrUpdateResponse struct { -// Radius Volume resource. + // Radius Volume resource. VolumeResource } @@ -221,19 +221,18 @@ type VolumesClientDeleteResponse struct { // VolumesClientGetResponse contains the response from method VolumesClient.Get. type VolumesClientGetResponse struct { -// Radius Volume resource. + // Radius Volume resource. VolumeResource } // VolumesClientListByScopeResponse contains the response from method VolumesClient.NewListByScopePager. type VolumesClientListByScopeResponse struct { -// The response of a VolumeResource list operation. + // The response of a VolumeResource list operation. VolumeResourceListResult } // VolumesClientUpdateResponse contains the response from method VolumesClient.BeginUpdate. type VolumesClientUpdateResponse struct { -// Radius Volume resource. + // Radius Volume resource. VolumeResource } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_secretstores_client.go b/pkg/corerp/api/v20231001preview/zz_generated_secretstores_client.go index 3466bafe5d..98f5bc60fc 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_secretstores_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_secretstores_client.go @@ -19,7 +19,7 @@ import ( // SecretStoresClient contains the methods for the SecretStores group. // Don't use this type directly, use NewSecretStoresClient() instead. type SecretStoresClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewSecretStoresClient(rootScope string, credential azcore.TokenCredential, } client := &SecretStoresClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *SecretStoresClient) BeginCreateOrUpdate(ctx context.Context, secre } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretStoresClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *SecretStoresClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a SecretStoreResource @@ -127,7 +127,7 @@ func (client *SecretStoresClient) BeginDelete(ctx context.Context, secretStoreNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretStoresClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -238,7 +238,7 @@ func (client *SecretStoresClient) getHandleResponse(resp *http.Response) (Secret // Generated from API version 2023-10-01-preview // - options - SecretStoresClientListByScopeOptions contains the optional parameters for the SecretStoresClient.NewListByScopePager // method. -func (client *SecretStoresClient) NewListByScopePager(options *SecretStoresClientListByScopeOptions) (*runtime.Pager[SecretStoresClientListByScopeResponse]) { +func (client *SecretStoresClient) NewListByScopePager(options *SecretStoresClientListByScopeOptions) *runtime.Pager[SecretStoresClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[SecretStoresClientListByScopeResponse]{ More: func(page SecretStoresClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -255,7 +255,7 @@ func (client *SecretStoresClient) NewListByScopePager(options *SecretStoresClien return SecretStoresClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -329,9 +329,9 @@ func (client *SecretStoresClient) listSecretsCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // listSecretsHandleResponse handles the ListSecrets response. @@ -359,7 +359,7 @@ func (client *SecretStoresClient) BeginUpdate(ctx context.Context, secretStoreNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretStoresClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -409,8 +409,7 @@ func (client *SecretStoresClient) updateCreateRequest(ctx context.Context, secre req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/corerp/api/v20231001preview/zz_generated_time_rfc3339.go b/pkg/corerp/api/v20231001preview/zz_generated_time_rfc3339.go index bbe5fcce12..04527d297f 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_time_rfc3339.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_time_rfc3339.go @@ -4,8 +4,6 @@ package v20231001preview - - import ( "encoding/json" "fmt" @@ -16,8 +14,6 @@ import ( "time" ) - - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) @@ -88,7 +84,6 @@ func (t dateTimeRFC3339) String() string { return time.Time(t).Format(time.RFC3339Nano) } - func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return diff --git a/pkg/corerp/api/v20231001preview/zz_generated_version.go b/pkg/corerp/api/v20231001preview/zz_generated_version.go new file mode 100644 index 0000000000..fefd946d1a --- /dev/null +++ b/pkg/corerp/api/v20231001preview/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package v20231001preview + +const ( + moduleName = "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + moduleVersion = "v0.1.0" +) diff --git a/pkg/corerp/api/v20231001preview/zz_generated_volumes_client.go b/pkg/corerp/api/v20231001preview/zz_generated_volumes_client.go index bb86472dbc..e4a2fcad57 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_volumes_client.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_volumes_client.go @@ -19,7 +19,7 @@ import ( // VolumesClient contains the methods for the Volumes group. // Don't use this type directly, use NewVolumesClient() instead. type VolumesClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewVolumesClient(rootScope string, credential azcore.TokenCredential, optio } client := &VolumesClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, volumeName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, vo req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a VolumeResource @@ -126,7 +126,7 @@ func (client *VolumesClient) BeginDelete(ctx context.Context, volumeName string, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -236,7 +236,7 @@ func (client *VolumesClient) getHandleResponse(resp *http.Response) (VolumesClie // // Generated from API version 2023-10-01-preview // - options - VolumesClientListByScopeOptions contains the optional parameters for the VolumesClient.NewListByScopePager method. -func (client *VolumesClient) NewListByScopePager(options *VolumesClientListByScopeOptions) (*runtime.Pager[VolumesClientListByScopeResponse]) { +func (client *VolumesClient) NewListByScopePager(options *VolumesClientListByScopeOptions) *runtime.Pager[VolumesClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[VolumesClientListByScopeResponse]{ More: func(page VolumesClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -253,7 +253,7 @@ func (client *VolumesClient) NewListByScopePager(options *VolumesClientListBySco return VolumesClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -297,7 +297,7 @@ func (client *VolumesClient) BeginUpdate(ctx context.Context, volumeName string, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -347,8 +347,7 @@ func (client *VolumesClient) updateCreateRequest(ctx context.Context, volumeName req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/corerp/api/v20250801preview/recipepack_conversion.go b/pkg/corerp/api/v20250801preview/recipepack_conversion.go index 4a273acc0d..6f0272dcb4 100644 --- a/pkg/corerp/api/v20250801preview/recipepack_conversion.go +++ b/pkg/corerp/api/v20250801preview/recipepack_conversion.go @@ -48,11 +48,6 @@ func (src *RecipePackResource) ConvertTo() (v1.DataModelInterface, error) { converted.Properties.Recipes = toRecipesDataModel(src.Properties.Recipes) } - // Convert Description - if src.Properties.Description != nil { - converted.Properties.Description = to.String(src.Properties.Description) - } - // Convert ReferencedBy if src.Properties.ReferencedBy != nil { converted.Properties.ReferencedBy = to.StringArray(src.Properties.ReferencedBy) @@ -83,11 +78,6 @@ func (dst *RecipePackResource) ConvertFrom(src v1.DataModelInterface) error { dst.Properties.Recipes = fromRecipesDataModel(recipePack.Properties.Recipes) } - // Convert Description - if recipePack.Properties.Description != "" { - dst.Properties.Description = to.Ptr(recipePack.Properties.Description) - } - // Convert ReferencedBy if len(recipePack.Properties.ReferencedBy) > 0 { dst.Properties.ReferencedBy = to.ArrayofStringPtrs(recipePack.Properties.ReferencedBy) diff --git a/pkg/corerp/api/v20250801preview/testdata/recipepackresource.json b/pkg/corerp/api/v20250801preview/testdata/recipepackresource.json index 626da62c55..ec91d1f7b9 100644 --- a/pkg/corerp/api/v20250801preview/testdata/recipepackresource.json +++ b/pkg/corerp/api/v20250801preview/testdata/recipepackresource.json @@ -9,7 +9,6 @@ }, "properties": { "provisioningState": "Succeeded", - "description": "A comprehensive recipe pack for containerized applications", "referencedBy": [ "/planes/radius/local/resourceGroups/app-rg/providers/Radius.Core/environments/prod-env", "/planes/radius/local/resourceGroups/app-rg/providers/Radius.Core/environments/staging-env" diff --git a/pkg/corerp/api/v20250801preview/testdata/recipepackresourcedatamodel.json b/pkg/corerp/api/v20250801preview/testdata/recipepackresourcedatamodel.json index 5c2d4cc7cd..30526b1ad2 100644 --- a/pkg/corerp/api/v20250801preview/testdata/recipepackresourcedatamodel.json +++ b/pkg/corerp/api/v20250801preview/testdata/recipepackresourcedatamodel.json @@ -21,7 +21,6 @@ "asyncProvisioningState": "Succeeded" }, "properties": { - "description": "A comprehensive recipe pack for containerized applications", "referencedBy": [ "/planes/radius/local/resourceGroups/app-rg/providers/Radius.Core/environments/prod-env", "/planes/radius/local/resourceGroups/app-rg/providers/Radius.Core/environments/staging-env" diff --git a/pkg/corerp/api/v20250801preview/version.go b/pkg/corerp/api/v20250801preview/version.go index e45356c7d2..e344c3c7a5 100644 --- a/pkg/corerp/api/v20250801preview/version.go +++ b/pkg/corerp/api/v20250801preview/version.go @@ -17,4 +17,4 @@ limitations under the License. package v20250801preview // Version represents the api version in this package. -const Version = "2025-08-01-preview" \ No newline at end of file +const Version = "2025-08-01-preview" diff --git a/pkg/corerp/api/v20250801preview/zz_generated_applications_client.go b/pkg/corerp/api/v20250801preview/zz_generated_applications_client.go index d1fcd0c3f8..b853c4a53c 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_applications_client.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_applications_client.go @@ -19,7 +19,7 @@ import ( // ApplicationsClient contains the methods for the Applications group. // Don't use this type directly, use NewApplicationsClient() instead. type ApplicationsClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewApplicationsClient(rootScope string, credential azcore.TokenCredential, } client := &ApplicationsClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -86,9 +86,9 @@ func (client *ApplicationsClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -242,9 +242,9 @@ func (client *ApplicationsClient) getGraphCreateRequest(ctx context.Context, app req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // getGraphHandleResponse handles the GetGraph response. @@ -261,7 +261,7 @@ func (client *ApplicationsClient) getGraphHandleResponse(resp *http.Response) (A // Generated from API version 2025-08-01-preview // - options - ApplicationsClientListByScopeOptions contains the optional parameters for the ApplicationsClient.NewListByScopePager // method. -func (client *ApplicationsClient) NewListByScopePager(options *ApplicationsClientListByScopeOptions) (*runtime.Pager[ApplicationsClientListByScopeResponse]) { +func (client *ApplicationsClient) NewListByScopePager(options *ApplicationsClientListByScopeOptions) *runtime.Pager[ApplicationsClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationsClientListByScopeResponse]{ More: func(page ApplicationsClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -278,7 +278,7 @@ func (client *ApplicationsClient) NewListByScopePager(options *ApplicationsClien return ApplicationsClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -351,9 +351,9 @@ func (client *ApplicationsClient) updateCreateRequest(ctx context.Context, appli req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -364,4 +364,3 @@ func (client *ApplicationsClient) updateHandleResponse(resp *http.Response) (App } return result, nil } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_client_factory.go b/pkg/corerp/api/v20250801preview/zz_generated_client_factory.go index 4e84346ea4..34359ee937 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_client_factory.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_client_factory.go @@ -13,7 +13,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { rootScope string - internal *arm.Client + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -30,7 +30,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio } return &ClientFactory{ rootScope: rootScope, - internal: internal, + internal: internal, }, nil } @@ -38,7 +38,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient { return &ApplicationsClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -46,7 +46,7 @@ func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient { func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { return &EnvironmentsClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -61,7 +61,6 @@ func (c *ClientFactory) NewOperationsClient() *OperationsClient { func (c *ClientFactory) NewRecipePacksClient() *RecipePacksClient { return &RecipePacksClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_constants.go b/pkg/corerp/api/v20250801preview/zz_generated_constants.go index cfd1ad1f38..613cf45fe8 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_constants.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_constants.go @@ -4,11 +4,6 @@ package v20250801preview -const ( - moduleName = "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" - moduleVersion = "v0.0.1" -) - // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -18,7 +13,7 @@ const ( // PossibleActionTypeValues returns the possible values for the ActionType const type. func PossibleActionTypeValues() []ActionType { - return []ActionType{ + return []ActionType{ ActionTypeInternal, } } @@ -27,15 +22,15 @@ func PossibleActionTypeValues() []ActionType { type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, @@ -47,16 +42,16 @@ func PossibleCreatedByTypeValues() []CreatedByType { type Direction string const ( -// DirectionInbound - The resource defining this connection accepts inbound connections from the resource specified by this -// id. + // DirectionInbound - The resource defining this connection accepts inbound connections from the resource specified by this + // id. DirectionInbound Direction = "Inbound" -// DirectionOutbound - The resource defining this connection makes an outbound connection resource specified by this id. + // DirectionOutbound - The resource defining this connection makes an outbound connection resource specified by this id. DirectionOutbound Direction = "Outbound" ) // PossibleDirectionValues returns the possible values for the Direction const type. func PossibleDirectionValues() []Direction { - return []Direction{ + return []Direction{ DirectionInbound, DirectionOutbound, } @@ -66,21 +61,21 @@ func PossibleDirectionValues() []Direction { type IdentitySettingKind string const ( -// IdentitySettingKindAzureComWorkload - azure ad workload identity + // IdentitySettingKindAzureComWorkload - azure ad workload identity IdentitySettingKindAzureComWorkload IdentitySettingKind = "azure.com.workload" -// IdentitySettingKindSystemAssigned - System assigned managed identity + // IdentitySettingKindSystemAssigned - System assigned managed identity IdentitySettingKindSystemAssigned IdentitySettingKind = "systemAssigned" -// IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity + // IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity IdentitySettingKindSystemAssignedUserAssigned IdentitySettingKind = "systemAssignedUserAssigned" -// IdentitySettingKindUndefined - undefined identity + // IdentitySettingKindUndefined - undefined identity IdentitySettingKindUndefined IdentitySettingKind = "undefined" -// IdentitySettingKindUserAssigned - User assigned managed identity + // IdentitySettingKindUserAssigned - User assigned managed identity IdentitySettingKindUserAssigned IdentitySettingKind = "userAssigned" ) // PossibleIdentitySettingKindValues returns the possible values for the IdentitySettingKind const type. func PossibleIdentitySettingKindValues() []IdentitySettingKind { - return []IdentitySettingKind{ + return []IdentitySettingKind{ IdentitySettingKindAzureComWorkload, IdentitySettingKindSystemAssigned, IdentitySettingKindSystemAssignedUserAssigned, @@ -94,14 +89,14 @@ func PossibleIdentitySettingKindValues() []IdentitySettingKind { type Origin string const ( - OriginSystem Origin = "system" - OriginUser Origin = "user" + OriginSystem Origin = "system" + OriginUser Origin = "user" OriginUserSystem Origin = "user,system" ) // PossibleOriginValues returns the possible values for the Origin const type. func PossibleOriginValues() []Origin { - return []Origin{ + return []Origin{ OriginSystem, OriginUser, OriginUserSystem, @@ -112,27 +107,27 @@ func PossibleOriginValues() []Origin { type ProvisioningState string const ( -// ProvisioningStateAccepted - The resource create request has been accepted + // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" -// ProvisioningStateCanceled - The resource provisioning has been canceled + // ProvisioningStateCanceled - The resource provisioning has been canceled ProvisioningStateCanceled ProvisioningState = "Canceled" -// ProvisioningStateCreating - The resource is being created + // ProvisioningStateCreating - The resource is being created ProvisioningStateCreating ProvisioningState = "Creating" -// ProvisioningStateDeleting - The resource is being deleted + // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" -// ProvisioningStateFailed - The resource provisioning has failed + // ProvisioningStateFailed - The resource provisioning has failed ProvisioningStateFailed ProvisioningState = "Failed" -// ProvisioningStateProvisioning - The resource is being provisioned + // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" -// ProvisioningStateSucceeded - The resource has been successfully provisioned + // ProvisioningStateSucceeded - The resource has been successfully provisioned ProvisioningStateSucceeded ProvisioningState = "Succeeded" -// ProvisioningStateUpdating - The resource is being updated + // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ + return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, @@ -148,17 +143,16 @@ func PossibleProvisioningStateValues() []ProvisioningState { type RecipeKind string const ( -// RecipeKindBicep - Bicep recipe + // RecipeKindBicep - Bicep recipe RecipeKindBicep RecipeKind = "bicep" -// RecipeKindTerraform - Terraform recipe + // RecipeKindTerraform - Terraform recipe RecipeKindTerraform RecipeKind = "terraform" ) // PossibleRecipeKindValues returns the possible values for the RecipeKind const type. func PossibleRecipeKindValues() []RecipeKind { - return []RecipeKind{ + return []RecipeKind{ RecipeKindBicep, RecipeKindTerraform, } } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_environments_client.go b/pkg/corerp/api/v20250801preview/zz_generated_environments_client.go index 43c317a6d2..bff4bea0e3 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_environments_client.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_environments_client.go @@ -19,7 +19,7 @@ import ( // EnvironmentsClient contains the methods for the Environments group. // Don't use this type directly, use NewEnvironmentsClient() instead. type EnvironmentsClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewEnvironmentsClient(rootScope string, credential azcore.TokenCredential, } client := &EnvironmentsClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -86,9 +86,9 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -203,7 +203,7 @@ func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (Enviro // Generated from API version 2025-08-01-preview // - options - EnvironmentsClientListByScopeOptions contains the optional parameters for the EnvironmentsClient.NewListByScopePager // method. -func (client *EnvironmentsClient) NewListByScopePager(options *EnvironmentsClientListByScopeOptions) (*runtime.Pager[EnvironmentsClientListByScopeResponse]) { +func (client *EnvironmentsClient) NewListByScopePager(options *EnvironmentsClientListByScopeOptions) *runtime.Pager[EnvironmentsClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListByScopeResponse]{ More: func(page EnvironmentsClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -220,7 +220,7 @@ func (client *EnvironmentsClient) NewListByScopePager(options *EnvironmentsClien return EnvironmentsClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -293,9 +293,9 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, envir req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -306,4 +306,3 @@ func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (Env } return result, nil } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_interfaces.go b/pkg/corerp/api/v20250801preview/zz_generated_interfaces.go index ed6605b03b..66fdf68174 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_interfaces.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_interfaces.go @@ -12,4 +12,3 @@ type EnvironmentComputeClassification interface { // GetEnvironmentCompute returns the EnvironmentCompute content of the underlying type. GetEnvironmentCompute() *EnvironmentCompute } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_models.go b/pkg/corerp/api/v20250801preview/zz_generated_models.go index e065e56623..58970ba9aa 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_models.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_models.go @@ -8,136 +8,136 @@ import "time" // ApplicationGraphConnection - Describes the connection between two resources. type ApplicationGraphConnection struct { -// REQUIRED; The direction of the connection. 'Outbound' indicates this connection specifies the ID of the destination and -// 'Inbound' indicates indicates this connection specifies the ID of the source. + // REQUIRED; The direction of the connection. 'Outbound' indicates this connection specifies the ID of the destination and + // 'Inbound' indicates indicates this connection specifies the ID of the source. Direction *Direction -// REQUIRED; The resource ID + // REQUIRED; The resource ID ID *string } // ApplicationGraphOutputResource - Describes an output resource that comprises an application graph resource. type ApplicationGraphOutputResource struct { -// REQUIRED; The resource ID. + // REQUIRED; The resource ID. ID *string -// REQUIRED; The resource name. + // REQUIRED; The resource name. Name *string -// REQUIRED; The resource type. + // REQUIRED; The resource type. Type *string } // ApplicationGraphResource - Describes a resource in the application graph. type ApplicationGraphResource struct { -// REQUIRED; The connections between resources in the application graph. + // REQUIRED; The connections between resources in the application graph. Connections []*ApplicationGraphConnection -// REQUIRED; The resource ID. + // REQUIRED; The resource ID. ID *string -// REQUIRED; The resource name. + // REQUIRED; The resource name. Name *string -// REQUIRED; The resources that comprise this resource. + // REQUIRED; The resources that comprise this resource. OutputResources []*ApplicationGraphOutputResource -// REQUIRED; provisioningState of this resource. + // REQUIRED; provisioningState of this resource. ProvisioningState *string -// REQUIRED; The resource type. + // REQUIRED; The resource type. Type *string } // ApplicationGraphResponse - Describes the application architecture and its dependencies. type ApplicationGraphResponse struct { -// REQUIRED; The resources in the application graph. + // REQUIRED; The resources in the application graph. Resources []*ApplicationGraphResource } // ApplicationProperties - Application properties type ApplicationProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the application is linked to + // REQUIRED; Fully qualified resource ID for the environment that the application is linked to Environment *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // ApplicationResource - Radius Application resource type ApplicationResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *ApplicationProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ApplicationResourceListResult - The response of a ApplicationResource list operation. type ApplicationResourceListResult struct { -// REQUIRED; The ApplicationResource items on this page + // REQUIRED; The ApplicationResource items on this page Value []*ApplicationResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ApplicationResourceUpdate - Radius Application resource type ApplicationResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // AzureContainerInstanceCompute - The Azure container instance compute configuration type AzureContainerInstanceCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource group to use for the environment. + // The resource group to use for the environment. ResourceGroup *string -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type AzureContainerInstanceCompute. func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: a.Identity, - Kind: a.Kind, + Identity: a.Identity, + Kind: a.Kind, ResourceID: a.ResourceID, } } @@ -145,31 +145,31 @@ func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentComp // AzureResourceManagerCommonTypesTrackedResourceUpdate - The resource model definition for an Azure Resource Manager tracked // top level resource which has 'tags' and a 'location' type AzureResourceManagerCommonTypesTrackedResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentCompute - Represents backing compute resource type EnvironmentCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } @@ -178,402 +178,398 @@ func (e *EnvironmentCompute) GetEnvironmentCompute() *EnvironmentCompute { retur // EnvironmentProperties - Environment properties type EnvironmentProperties struct { -// Cloud provider configuration for the environment. + // Cloud provider configuration for the environment. Providers *Providers -// List of Recipe Pack resource IDs linked to this environment. + // List of Recipe Pack resource IDs linked to this environment. RecipePacks []*string -// Simulated environment. + // Simulated environment. Simulated *bool -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // EnvironmentResource - The environment resource type EnvironmentResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *EnvironmentProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentResourceListResult - The response of a EnvironmentResource list operation. type EnvironmentResourceListResult struct { -// REQUIRED; The EnvironmentResource items on this page + // REQUIRED; The EnvironmentResource items on this page Value []*EnvironmentResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // EnvironmentResourceUpdate - The environment resource type EnvironmentResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { -// READ-ONLY; The additional info. + // READ-ONLY; The additional info. Info any -// READ-ONLY; The additional info type. + // READ-ONLY; The additional info type. Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { -// READ-ONLY; The error additional info. + // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo -// READ-ONLY; The error code. + // READ-ONLY; The error code. Code *string -// READ-ONLY; The error details. + // READ-ONLY; The error details. Details []*ErrorDetail -// READ-ONLY; The error message. + // READ-ONLY; The error message. Message *string -// READ-ONLY; The error target. + // READ-ONLY; The error target. Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { -// The error object. + // The error object. Error *ErrorDetail } // IdentitySettings is the external identity setting. type IdentitySettings struct { -// REQUIRED; kind of identity setting + // REQUIRED; kind of identity setting Kind *IdentitySettingKind -// The list of user assigned managed identities + // The list of user assigned managed identities ManagedIdentity []*string -// The URI for your compute platform's OIDC issuer + // The URI for your compute platform's OIDC issuer OidcIssuer *string -// The resource ID of the provisioned identity + // The resource ID of the provisioned identity Resource *string } // KubernetesCompute - The Kubernetes compute configuration type KubernetesCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// REQUIRED; The namespace to use for the environment. + // REQUIRED; The namespace to use for the environment. Namespace *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type KubernetesCompute. func (k *KubernetesCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: k.Identity, - Kind: k.Kind, + Identity: k.Identity, + Kind: k.Kind, ResourceID: k.ResourceID, } } // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { -// Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay -// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType -// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane -// operations. + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. IsDataAction *bool -// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", -// "Microsoft.Compute/virtualMachines/capture/action" + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" Name *string -// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default -// value is "user,system" + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" Origin *Origin } // OperationDisplay - Localized display information for this particular operation. type OperationDisplay struct { -// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string -// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual -// Machine", "Restart Virtual Machine". + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". Operation *string -// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft -// Compute". + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". Provider *string -// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job -// Schedule Collections". + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". Resource *string } // OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to // get the next set of results. type OperationListResult struct { -// READ-ONLY; URL to get the next set of operation list results (if there are any). + // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string -// READ-ONLY; List of operations supported by the resource provider + // READ-ONLY; List of operations supported by the resource provider Value []*Operation } // OutputResource - Properties of an output resource. type OutputResource struct { -// The UCP resource ID of the underlying resource. + // The UCP resource ID of the underlying resource. ID *string -// The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency -// relationship. LocalIDs do not have any particular format or meaning beyond -// being compared to determine dependency relationships. + // The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency + // relationship. LocalIDs do not have any particular format or meaning beyond + // being compared to determine dependency relationships. LocalID *string -// Determines whether Radius manages the lifecycle of the underlying resource. + // Determines whether Radius manages the lifecycle of the underlying resource. RadiusManaged *bool } type Providers struct { -// The AWS cloud provider configuration. + // The AWS cloud provider configuration. Aws *ProvidersAws -// The Azure cloud provider configuration. + // The Azure cloud provider configuration. Azure *ProvidersAzure -// The Kubernetes provider configuration. + // The Kubernetes provider configuration. Kubernetes *ProvidersKubernetes } // ProvidersAws - The AWS cloud provider definition. type ProvidersAws struct { -// REQUIRED; Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'. + // REQUIRED; Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'. Scope *string } // ProvidersAzure - The Azure cloud provider definition. type ProvidersAzure struct { -// REQUIRED; Azure subscription ID hosting deployed resources. + // REQUIRED; Azure subscription ID hosting deployed resources. SubscriptionID *string -// External identity settings (moved from compute). + // External identity settings (moved from compute). Identity *IdentitySettings -// Optional resource group name. + // Optional resource group name. ResourceGroupName *string } type ProvidersKubernetes struct { -// REQUIRED; Kubernetes namespace to deploy workloads into. + // REQUIRED; Kubernetes namespace to deploy workloads into. Namespace *string } // RecipeDefinition - Recipe definition for a specific resource type type RecipeDefinition struct { -// REQUIRED; The type of recipe (e.g., Terraform, Bicep) + // REQUIRED; The type of recipe (e.g., Terraform, Bicep) RecipeKind *RecipeKind -// REQUIRED; URL path to the recipe + // REQUIRED; URL path to the recipe RecipeLocation *string -// Parameters to pass to the recipe + // Parameters to pass to the recipe Parameters map[string]any -// Connect to the location using HTTP (not HTTPS). This should be used when the location is known not to support HTTPS, for -// example in a locally hosted registry for Bicep recipes. Defaults to false (use -// HTTPS/TLS) + // Connect to the location using HTTP (not HTTPS). This should be used when the location is known not to support HTTPS, for + // example in a locally hosted registry for Bicep recipes. Defaults to false (use + // HTTPS/TLS) PlainHTTP *bool } // RecipePackProperties - Recipe Pack properties type RecipePackProperties struct { -// REQUIRED; Map of resource types to their recipe configurations + // REQUIRED; Map of resource types to their recipe configurations Recipes map[string]*RecipeDefinition -// Description of what this recipe pack provides - Description *string - -// READ-ONLY; The status of the asynchronous operation + // READ-ONLY; The status of the asynchronous operation ProvisioningState *ProvisioningState -// READ-ONLY; List of environment IDs that reference this recipe pack + // READ-ONLY; List of environment IDs that reference this recipe pack ReferencedBy []*string } // RecipePackResource - The recipe pack resource type RecipePackResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *RecipePackProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RecipePackResourceListResult - The response of a RecipePackResource list operation. type RecipePackResourceListResult struct { -// REQUIRED; The RecipePackResource items on this page + // REQUIRED; The RecipePackResource items on this page Value []*RecipePackResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // RecipePackResourceUpdate - The recipe pack resource type RecipePackResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RecipeStatus - Recipe status at deployment time for a resource. type RecipeStatus struct { -// REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. + // REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. TemplateKind *string -// REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. + // REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. TemplatePath *string -// TemplateVersion is the version number of the template. + // TemplateVersion is the version number of the template. TemplateVersion *string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceStatus - Status of a resource. type ResourceStatus struct { -// The compute resource associated with the resource. + // The compute resource associated with the resource. Compute EnvironmentComputeClassification -// Properties of an output resource + // Properties of an output resource OutputResources []*OutputResource -// READ-ONLY; The recipe data at the time of deployment + // READ-ONLY; The recipe data at the time of deployment Recipe *RecipeStatus } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { -// The timestamp of resource creation (UTC). + // The timestamp of resource creation (UTC). CreatedAt *time.Time -// The identity that created the resource. + // The identity that created the resource. CreatedBy *string -// The type of identity that created the resource. + // The type of identity that created the resource. CreatedByType *CreatedByType -// The timestamp of resource last modification (UTC) + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time -// The identity that last modified the resource. + // The identity that last modified the resource. LastModifiedBy *string -// The type of identity that last modified the resource. + // The type of identity that last modified the resource. LastModifiedByType *CreatedByType } // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_models_serde.go b/pkg/corerp/api/v20250801preview/zz_generated_models_serde.go index 99a526aeb8..dbeb6cfe38 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_models_serde.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_models_serde.go @@ -29,10 +29,10 @@ func (a *ApplicationGraphConnection) UnmarshalJSON(data []byte) error { var err error switch key { case "direction": - err = unpopulate(val, "Direction", &a.Direction) + err = unpopulate(val, "Direction", &a.Direction) delete(rawMsg, key) case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) } if err != nil { @@ -61,13 +61,13 @@ func (a *ApplicationGraphOutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -99,22 +99,22 @@ func (a *ApplicationGraphResource) UnmarshalJSON(data []byte) error { var err error switch key { case "connections": - err = unpopulate(val, "Connections", &a.Connections) + err = unpopulate(val, "Connections", &a.Connections) delete(rawMsg, key) case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &a.OutputResources) + err = unpopulate(val, "OutputResources", &a.OutputResources) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -141,7 +141,7 @@ func (a *ApplicationGraphResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "resources": - err = unpopulate(val, "Resources", &a.Resources) + err = unpopulate(val, "Resources", &a.Resources) delete(rawMsg, key) } if err != nil { @@ -170,13 +170,13 @@ func (a *ApplicationProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "environment": - err = unpopulate(val, "Environment", &a.Environment) + err = unpopulate(val, "Environment", &a.Environment) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &a.Status) + err = unpopulate(val, "Status", &a.Status) delete(rawMsg, key) } if err != nil { @@ -209,25 +209,25 @@ func (a *ApplicationResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -255,10 +255,10 @@ func (a *ApplicationResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -289,19 +289,19 @@ func (a *ApplicationResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -331,16 +331,16 @@ func (a *AzureContainerInstanceCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &a.Identity) + err = unpopulate(val, "Identity", &a.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) + err = unpopulate(val, "ResourceID", &a.ResourceID) delete(rawMsg, key) } if err != nil { @@ -371,19 +371,19 @@ func (a *AzureResourceManagerCommonTypesTrackedResourceUpdate) UnmarshalJSON(dat var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -412,13 +412,13 @@ func (e *EnvironmentCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &e.Identity) + err = unpopulate(val, "Identity", &e.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) + err = unpopulate(val, "ResourceID", &e.ResourceID) delete(rawMsg, key) } if err != nil { @@ -448,16 +448,16 @@ func (e *EnvironmentProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "providers": - err = unpopulate(val, "Providers", &e.Providers) + err = unpopulate(val, "Providers", &e.Providers) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) delete(rawMsg, key) case "recipePacks": - err = unpopulate(val, "RecipePacks", &e.RecipePacks) + err = unpopulate(val, "RecipePacks", &e.RecipePacks) delete(rawMsg, key) case "simulated": - err = unpopulate(val, "Simulated", &e.Simulated) + err = unpopulate(val, "Simulated", &e.Simulated) delete(rawMsg, key) } if err != nil { @@ -490,25 +490,25 @@ func (e *EnvironmentResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &e.ID) + err = unpopulate(val, "ID", &e.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &e.Location) + err = unpopulate(val, "Location", &e.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &e.Name) + err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &e.Properties) + err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) + err = unpopulate(val, "SystemData", &e.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &e.Tags) + err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -536,10 +536,10 @@ func (e *EnvironmentResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) + err = unpopulate(val, "NextLink", &e.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &e.Value) + err = unpopulate(val, "Value", &e.Value) delete(rawMsg, key) } if err != nil { @@ -570,19 +570,19 @@ func (e *EnvironmentResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &e.ID) + err = unpopulate(val, "ID", &e.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &e.Name) + err = unpopulate(val, "Name", &e.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) + err = unpopulate(val, "SystemData", &e.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &e.Tags) + err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -610,10 +610,10 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) + err = unpopulate(val, "Info", &e.Info) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -644,19 +644,19 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &e.Details) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &e.Target) delete(rawMsg, key) } if err != nil { @@ -683,7 +683,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -713,16 +713,16 @@ func (i *IdentitySettings) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "managedIdentity": - err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) + err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) delete(rawMsg, key) case "oidcIssuer": - err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) + err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &i.Resource) + err = unpopulate(val, "Resource", &i.Resource) delete(rawMsg, key) } if err != nil { @@ -752,16 +752,16 @@ func (k *KubernetesCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &k.Identity) + err = unpopulate(val, "Identity", &k.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + err = unpopulate(val, "Namespace", &k.Namespace) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) + err = unpopulate(val, "ResourceID", &k.ResourceID) delete(rawMsg, key) } if err != nil { @@ -792,19 +792,19 @@ func (o *Operation) UnmarshalJSON(data []byte) error { var err error switch key { case "actionType": - err = unpopulate(val, "ActionType", &o.ActionType) + err = unpopulate(val, "ActionType", &o.ActionType) delete(rawMsg, key) case "display": - err = unpopulate(val, "Display", &o.Display) + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) + err = unpopulate(val, "IsDataAction", &o.IsDataAction) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "origin": - err = unpopulate(val, "Origin", &o.Origin) + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { @@ -834,16 +834,16 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { var err error switch key { case "description": - err = unpopulate(val, "Description", &o.Description) + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) case "operation": - err = unpopulate(val, "Operation", &o.Operation) + err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) case "provider": - err = unpopulate(val, "Provider", &o.Provider) + err = unpopulate(val, "Provider", &o.Provider) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &o.Resource) + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { @@ -871,10 +871,10 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &o.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { @@ -903,13 +903,13 @@ func (o *OutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &o.ID) + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) case "localId": - err = unpopulate(val, "LocalID", &o.LocalID) + err = unpopulate(val, "LocalID", &o.LocalID) delete(rawMsg, key) case "radiusManaged": - err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) + err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) delete(rawMsg, key) } if err != nil { @@ -938,13 +938,13 @@ func (p *Providers) UnmarshalJSON(data []byte) error { var err error switch key { case "aws": - err = unpopulate(val, "Aws", &p.Aws) + err = unpopulate(val, "Aws", &p.Aws) delete(rawMsg, key) case "azure": - err = unpopulate(val, "Azure", &p.Azure) + err = unpopulate(val, "Azure", &p.Azure) delete(rawMsg, key) case "kubernetes": - err = unpopulate(val, "Kubernetes", &p.Kubernetes) + err = unpopulate(val, "Kubernetes", &p.Kubernetes) delete(rawMsg, key) } if err != nil { @@ -971,7 +971,7 @@ func (p *ProvidersAws) UnmarshalJSON(data []byte) error { var err error switch key { case "scope": - err = unpopulate(val, "Scope", &p.Scope) + err = unpopulate(val, "Scope", &p.Scope) delete(rawMsg, key) } if err != nil { @@ -1000,13 +1000,13 @@ func (p *ProvidersAzure) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &p.Identity) + err = unpopulate(val, "Identity", &p.Identity) delete(rawMsg, key) case "resourceGroupName": - err = unpopulate(val, "ResourceGroupName", &p.ResourceGroupName) + err = unpopulate(val, "ResourceGroupName", &p.ResourceGroupName) delete(rawMsg, key) case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &p.SubscriptionID) + err = unpopulate(val, "SubscriptionID", &p.SubscriptionID) delete(rawMsg, key) } if err != nil { @@ -1033,7 +1033,7 @@ func (p *ProvidersKubernetes) UnmarshalJSON(data []byte) error { var err error switch key { case "namespace": - err = unpopulate(val, "Namespace", &p.Namespace) + err = unpopulate(val, "Namespace", &p.Namespace) delete(rawMsg, key) } if err != nil { @@ -1063,16 +1063,16 @@ func (r *RecipeDefinition) UnmarshalJSON(data []byte) error { var err error switch key { case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) case "plainHttp": - err = unpopulate(val, "PlainHTTP", &r.PlainHTTP) + err = unpopulate(val, "PlainHTTP", &r.PlainHTTP) delete(rawMsg, key) case "recipeKind": - err = unpopulate(val, "RecipeKind", &r.RecipeKind) + err = unpopulate(val, "RecipeKind", &r.RecipeKind) delete(rawMsg, key) case "recipeLocation": - err = unpopulate(val, "RecipeLocation", &r.RecipeLocation) + err = unpopulate(val, "RecipeLocation", &r.RecipeLocation) delete(rawMsg, key) } if err != nil { @@ -1085,7 +1085,6 @@ func (r *RecipeDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RecipePackProperties. func (r RecipePackProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", r.Description) populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "recipes", r.Recipes) populate(objectMap, "referencedBy", r.ReferencedBy) @@ -1101,17 +1100,14 @@ func (r *RecipePackProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &r.Description) - delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) case "recipes": - err = unpopulate(val, "Recipes", &r.Recipes) + err = unpopulate(val, "Recipes", &r.Recipes) delete(rawMsg, key) case "referencedBy": - err = unpopulate(val, "ReferencedBy", &r.ReferencedBy) + err = unpopulate(val, "ReferencedBy", &r.ReferencedBy) delete(rawMsg, key) } if err != nil { @@ -1144,25 +1140,25 @@ func (r *RecipePackResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &r.Location) + err = unpopulate(val, "Location", &r.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1190,10 +1186,10 @@ func (r *RecipePackResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -1224,19 +1220,19 @@ func (r *RecipePackResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1265,13 +1261,13 @@ func (r *RecipeStatus) UnmarshalJSON(data []byte) error { var err error switch key { case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -1301,16 +1297,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1342,10 +1338,10 @@ func (r *ResourceStatus) UnmarshalJSON(data []byte) error { r.Compute, err = unmarshalEnvironmentComputeClassification(val) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &r.OutputResources) + err = unpopulate(val, "OutputResources", &r.OutputResources) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) } if err != nil { @@ -1377,22 +1373,22 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { @@ -1424,22 +1420,22 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) + err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) + err = unpopulate(val, "SystemData", &t.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -1478,4 +1474,3 @@ func unpopulate(data json.RawMessage, fn string, v any) error { } return nil } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_operations_client.go b/pkg/corerp/api/v20250801preview/zz_generated_operations_client.go index ddf70b0fcf..33ecb1a730 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_operations_client.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_operations_client.go @@ -28,7 +28,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return nil, err } client := &OperationsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -37,7 +37,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // // Generated from API version 2025-08-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) (*runtime.Pager[OperationsClientListResponse]) { +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -54,7 +54,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return OperationsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -81,4 +81,3 @@ func (client *OperationsClient) listHandleResponse(resp *http.Response) (Operati } return result, nil } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_options.go b/pkg/corerp/api/v20250801preview/zz_generated_options.go index e75e8af0a1..25fe2b8409 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_options.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_options.go @@ -88,4 +88,3 @@ type RecipePacksClientListByScopeOptions struct { type RecipePacksClientUpdateOptions struct { // placeholder for future optional parameters } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_polymorphic_helpers.go b/pkg/corerp/api/v20250801preview/zz_generated_polymorphic_helpers.go index 48b3556749..0ac5dc25d5 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_polymorphic_helpers.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_polymorphic_helpers.go @@ -28,4 +28,3 @@ func unmarshalEnvironmentComputeClassification(rawMsg json.RawMessage) (Environm } return b, nil } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_recipepacks_client.go b/pkg/corerp/api/v20250801preview/zz_generated_recipepacks_client.go index d653536405..682d2b8e47 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_recipepacks_client.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_recipepacks_client.go @@ -19,7 +19,7 @@ import ( // RecipePacksClient contains the methods for the RecipePacks group. // Don't use this type directly, use NewRecipePacksClient() instead. type RecipePacksClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewRecipePacksClient(rootScope string, credential azcore.TokenCredential, o } client := &RecipePacksClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -86,9 +86,9 @@ func (client *RecipePacksClient) createOrUpdateCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -203,7 +203,7 @@ func (client *RecipePacksClient) getHandleResponse(resp *http.Response) (RecipeP // Generated from API version 2025-08-01-preview // - options - RecipePacksClientListByScopeOptions contains the optional parameters for the RecipePacksClient.NewListByScopePager // method. -func (client *RecipePacksClient) NewListByScopePager(options *RecipePacksClientListByScopeOptions) (*runtime.Pager[RecipePacksClientListByScopeResponse]) { +func (client *RecipePacksClient) NewListByScopePager(options *RecipePacksClientListByScopeOptions) *runtime.Pager[RecipePacksClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[RecipePacksClientListByScopeResponse]{ More: func(page RecipePacksClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -220,7 +220,7 @@ func (client *RecipePacksClient) NewListByScopePager(options *RecipePacksClientL return RecipePacksClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -293,9 +293,9 @@ func (client *RecipePacksClient) updateCreateRequest(ctx context.Context, recipe req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -306,4 +306,3 @@ func (client *RecipePacksClient) updateHandleResponse(resp *http.Response) (Reci } return result, nil } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_responses.go b/pkg/corerp/api/v20250801preview/zz_generated_responses.go index f7c1ba0b01..6038070cb6 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_responses.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_responses.go @@ -6,7 +6,7 @@ package v20250801preview // ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate. type ApplicationsClientCreateOrUpdateResponse struct { -// Radius Application resource + // Radius Application resource ApplicationResource } @@ -17,31 +17,31 @@ type ApplicationsClientDeleteResponse struct { // ApplicationsClientGetGraphResponse contains the response from method ApplicationsClient.GetGraph. type ApplicationsClientGetGraphResponse struct { -// Describes the application architecture and its dependencies. + // Describes the application architecture and its dependencies. ApplicationGraphResponse } // ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get. type ApplicationsClientGetResponse struct { -// Radius Application resource + // Radius Application resource ApplicationResource } // ApplicationsClientListByScopeResponse contains the response from method ApplicationsClient.NewListByScopePager. type ApplicationsClientListByScopeResponse struct { -// The response of a ApplicationResource list operation. + // The response of a ApplicationResource list operation. ApplicationResourceListResult } // ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update. type ApplicationsClientUpdateResponse struct { -// Radius Application resource + // Radius Application resource ApplicationResource } // EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.CreateOrUpdate. type EnvironmentsClientCreateOrUpdateResponse struct { -// The environment resource + // The environment resource EnvironmentResource } @@ -52,31 +52,31 @@ type EnvironmentsClientDeleteResponse struct { // EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. type EnvironmentsClientGetResponse struct { -// The environment resource + // The environment resource EnvironmentResource } // EnvironmentsClientListByScopeResponse contains the response from method EnvironmentsClient.NewListByScopePager. type EnvironmentsClientListByScopeResponse struct { -// The response of a EnvironmentResource list operation. + // The response of a EnvironmentResource list operation. EnvironmentResourceListResult } // EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. type EnvironmentsClientUpdateResponse struct { -// The environment resource + // The environment resource EnvironmentResource } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { -// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult } // RecipePacksClientCreateOrUpdateResponse contains the response from method RecipePacksClient.CreateOrUpdate. type RecipePacksClientCreateOrUpdateResponse struct { -// The recipe pack resource + // The recipe pack resource RecipePackResource } @@ -87,19 +87,18 @@ type RecipePacksClientDeleteResponse struct { // RecipePacksClientGetResponse contains the response from method RecipePacksClient.Get. type RecipePacksClientGetResponse struct { -// The recipe pack resource + // The recipe pack resource RecipePackResource } // RecipePacksClientListByScopeResponse contains the response from method RecipePacksClient.NewListByScopePager. type RecipePacksClientListByScopeResponse struct { -// The response of a RecipePackResource list operation. + // The response of a RecipePackResource list operation. RecipePackResourceListResult } // RecipePacksClientUpdateResponse contains the response from method RecipePacksClient.Update. type RecipePacksClientUpdateResponse struct { -// The recipe pack resource + // The recipe pack resource RecipePackResource } - diff --git a/pkg/corerp/api/v20250801preview/zz_generated_time_rfc3339.go b/pkg/corerp/api/v20250801preview/zz_generated_time_rfc3339.go index 412c8ef633..384c320ddb 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_time_rfc3339.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_time_rfc3339.go @@ -4,8 +4,6 @@ package v20250801preview - - import ( "encoding/json" "fmt" @@ -16,8 +14,6 @@ import ( "time" ) - - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) @@ -88,7 +84,6 @@ func (t dateTimeRFC3339) String() string { return time.Time(t).Format(time.RFC3339Nano) } - func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return diff --git a/pkg/corerp/api/v20250801preview/zz_generated_version.go b/pkg/corerp/api/v20250801preview/zz_generated_version.go new file mode 100644 index 0000000000..56e6e6a890 --- /dev/null +++ b/pkg/corerp/api/v20250801preview/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package v20250801preview + +const ( + moduleName = "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + moduleVersion = "v0.1.0" +) diff --git a/pkg/corerp/datamodel/converter/recipepack_converter_test.go b/pkg/corerp/datamodel/converter/recipepack_converter_test.go index 5fcb51a7fd..63fcbff9e2 100644 --- a/pkg/corerp/datamodel/converter/recipepack_converter_test.go +++ b/pkg/corerp/datamodel/converter/recipepack_converter_test.go @@ -56,7 +56,6 @@ func TestRecipePackDataModelToVersioned(t *testing.T) { }, }, Properties: datamodel.RecipePackProperties{ - Description: "Test recipe pack", Recipes: map[string]*datamodel.RecipeDefinition{ "Applications.Core/containers": { RecipeKind: "bicep", @@ -128,10 +127,6 @@ func TestRecipePackDataModelToVersioned(t *testing.T) { require.Equal(t, tc.dataModel.Type, to.String(versionedResource.Type)) require.Equal(t, tc.dataModel.Location, to.String(versionedResource.Location)) - if tc.dataModel.Properties.Description != "" { - require.Equal(t, tc.dataModel.Properties.Description, to.String(versionedResource.Properties.Description)) - } - if len(tc.dataModel.Properties.ReferencedBy) > 0 { require.Equal(t, len(tc.dataModel.Properties.ReferencedBy), len(versionedResource.Properties.ReferencedBy)) } @@ -165,7 +160,6 @@ func TestRecipePackDataModelFromVersioned(t *testing.T) { "env": "test" }, "properties": { - "description": "Test recipe pack", "recipes": { "Applications.Core/containers": { "recipeKind": "bicep", @@ -207,7 +201,6 @@ func TestRecipePackDataModelFromVersioned(t *testing.T) { }, }, Properties: datamodel.RecipePackProperties{ - Description: "Test recipe pack", Recipes: map[string]*datamodel.RecipeDefinition{ "Applications.Core/containers": { RecipeKind: "bicep", @@ -383,7 +376,6 @@ func TestRecipePackDataModelFromVersioned(t *testing.T) { } else { require.Equal(t, tc.expected.Tags, result.Tags) } - require.Equal(t, tc.expected.Properties.Description, result.Properties.Description) require.Equal(t, tc.expected.Properties.ReferencedBy, result.Properties.ReferencedBy) // Validate recipes @@ -432,7 +424,6 @@ func TestRecipePackRoundTripConversion(t *testing.T) { }, }, Properties: datamodel.RecipePackProperties{ - Description: "Round-trip test recipe pack", Recipes: map[string]*datamodel.RecipeDefinition{ "Applications.Core/containers": { RecipeKind: "bicep", @@ -470,7 +461,6 @@ func TestRecipePackRoundTripConversion(t *testing.T) { require.Equal(t, originalDataModel.Type, resultDataModel.Type) require.Equal(t, originalDataModel.Location, resultDataModel.Location) require.Equal(t, originalDataModel.Tags, resultDataModel.Tags) - require.Equal(t, originalDataModel.Properties.Description, resultDataModel.Properties.Description) require.Equal(t, originalDataModel.Properties.ReferencedBy, resultDataModel.Properties.ReferencedBy) // Validate recipes diff --git a/pkg/corerp/frontend/controller/applications/graph_util.go b/pkg/corerp/frontend/controller/applications/graph_util.go index 09b7aca54c..58dda7621c 100644 --- a/pkg/corerp/frontend/controller/applications/graph_util.go +++ b/pkg/corerp/frontend/controller/applications/graph_util.go @@ -458,52 +458,48 @@ func outputResourceEntryFromID(id resources.ID) corerpv20231001preview.Applicati // outputResourcesFromAPIData processes the generic resource representation returned by the Radius API // and produces a list of output resources. func outputResourcesFromAPIData(resource generated.GenericResource) []*corerpv20231001preview.ApplicationGraphOutputResource { - // We need to access the output resources in a weakly-typed way since the data type we're - // working with is a property bag. - // - // Any Radius resource type that supports output resources uses the following property path to return them. - p, err := jsonpointer.New("/properties/status/outputResources") - if err != nil { - // This should never fail since we're hard-coding the path. - panic("parsing JSON pointer should not fail: " + err.Error()) - } - - raw, _, err := p.Get(&resource) - if err != nil { - // Not found, this is fine. + // Directly access the nested weakly-typed property bag instead of using jsonpointer on the struct. + // The previous implementation relied on jsonpointer with the path /properties/status/outputResources. + // When applied to the struct value, jsonpointer failed to locate the lowercase JSON field name and + // silently returned an empty list, causing OutputResources to be omitted in the application graph. + statusRaw, ok := resource.Properties["status"] + if !ok || statusRaw == nil { return []*corerpv20231001preview.ApplicationGraphOutputResource{} } - - ors, ok := raw.([]any) + statusMap, ok := statusRaw.(map[string]any) if !ok { - // Not an array, this is fine. + return []*corerpv20231001preview.ApplicationGraphOutputResource{} + } + orRaw, ok := statusMap["outputResources"] + if !ok || orRaw == nil { + return []*corerpv20231001preview.ApplicationGraphOutputResource{} + } + ors, ok := orRaw.([]any) + if !ok || len(ors) == 0 { return []*corerpv20231001preview.ApplicationGraphOutputResource{} } - // The data is returned as an array of JSON objects. We need to convert each object from a map[string]any - // to the strongly-typed format we understand. - // - // If we encounter an error processing this data, just and an "invalid" output resource entry. entries := []*corerpv20231001preview.ApplicationGraphOutputResource{} for _, or := range ors { // This is the wire format returned by the API for an output resource. + // Wire format: { "id": "" } type outputResourceWireFormat struct { ID resources.ID `json:"id"` } data := outputResourceWireFormat{} - err = toStronglyTypedData(or, &data) - if err != nil { + err := toStronglyTypedData(or, &data) + if err != nil || data.ID.String() == "" { continue } // Now build the entry from the API data entry := outputResourceEntryFromID(data.ID) - entries = append(entries, &entry) } // Produce a stable output + // Deterministic ordering: Type, Name, ID sort.Slice(entries, func(i, j int) bool { if to.String(entries[i].Type) != to.String(entries[j].Type) { return to.String(entries[i].Type) < to.String(entries[j].Type) @@ -512,23 +508,35 @@ func outputResourcesFromAPIData(resource generated.GenericResource) []*corerpv20 return to.String(entries[i].Name) < to.String(entries[j].Name) } return to.String(entries[i].ID) < to.String(entries[j].ID) - }) return entries } func resolveConnections(resource generated.GenericResource, jsonRefPath string, converter resolver) []*corerpv20231001preview.ApplicationGraphConnection { - // We need to access the connections in a weakly-typed way since the data type we're - // working with is a property bag. - p, err := jsonpointer.New(jsonRefPath) - if err != nil { - // This should never fail since we're hard-coding the path. - panic("parsing JSON pointer should not fail: " + err.Error()) + // Access data directly from the property bag instead of using jsonpointer on the struct. + // The jsonpointer approach failed to locate '/properties/...' because the struct field is + // named 'Properties' and does not serialize to a lowercase key until marshalled. Tests + // provide raw JSON with lowercase keys, so direct map access is more reliable. + var raw any + switch jsonRefPath { + case connectionsPath: + raw = resource.Properties["connections"] + case routesPath: + raw = resource.Properties["routes"] + default: + p, err := jsonpointer.New(jsonRefPath) + if err != nil { + // This should never fail since we're hard-coding the path. + panic("parsing JSON pointer should not fail: " + err.Error()) + } + val, _, err := p.Get(&resource) + if err == nil { + raw = val + } } - raw, _, err := p.Get(&resource) - if err != nil { + if raw == nil { // Not found, this is fine. return []*corerpv20231001preview.ApplicationGraphConnection{} } @@ -543,6 +551,8 @@ func resolveConnections(resource generated.GenericResource, jsonRefPath string, for _, v := range conn { items = append(items, v) } + default: + return []*corerpv20231001preview.ApplicationGraphConnection{} } if len(items) == 0 { diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment.go b/pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment.go new file mode 100644 index 0000000000..ce6a7226cd --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment.go @@ -0,0 +1,108 @@ +/* +Copyright 2023 The Radius Authors. + +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 v20250801preview + +import ( + "context" + "fmt" + "net/http" + + v1 "github.com/radius-project/radius/pkg/armrpc/api/v1" + ctrl "github.com/radius-project/radius/pkg/armrpc/frontend/controller" + "github.com/radius-project/radius/pkg/armrpc/rest" + "github.com/radius-project/radius/pkg/corerp/datamodel" + "github.com/radius-project/radius/pkg/corerp/datamodel/converter" + "github.com/radius-project/radius/pkg/corerp/frontend/controller/util" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +var _ ctrl.Controller = (*CreateOrUpdateEnvironmentv20250801preview)(nil) + +// CreateOrUpdateEnvironmentv20250801preview is the controller implementation to create or update Radius.Core/environments resource. +type CreateOrUpdateEnvironmentv20250801preview struct { + ctrl.Operation[*datamodel.Environment_v20250801preview, datamodel.Environment_v20250801preview] +} + +// NewCreateOrUpdateEnvironmentv20250801preview creates a new controller for creating or updating a Radius.Core/environments resource. +func NewCreateOrUpdateEnvironmentv20250801preview(opts ctrl.Options) (ctrl.Controller, error) { + return &CreateOrUpdateEnvironmentv20250801preview{ + ctrl.NewOperation(opts, + ctrl.ResourceOptions[datamodel.Environment_v20250801preview]{ + RequestConverter: converter.Environment20250801DataModelFromVersioned, + ResponseConverter: converter.Environment20250801DataModelToVersioned, + }, + ), + }, nil +} + +// Run creates or updates a Radius.Core/environments resource. +func (e *CreateOrUpdateEnvironmentv20250801preview) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (rest.Response, error) { + serviceCtx := v1.ARMRequestContextFromContext(ctx) + newResource, err := e.GetResourceFromRequest(ctx, req) + if err != nil { + return nil, err + } + old, etag, err := e.GetResource(ctx, serviceCtx.ResourceID) + if err != nil { + return nil, err + } + + if resp, err := e.PrepareResource(ctx, req, newResource, old, etag); resp != nil || err != nil { + return resp, err + } + + // Create Query filter to query kubernetes namespace used by the other environment resources. + if newResource.Properties.Providers != nil && newResource.Properties.Providers.Kubernetes != nil { + namespace := newResource.Properties.Providers.Kubernetes.Namespace + result, err := util.FindResources(ctx, serviceCtx.ResourceID.RootScope(), serviceCtx.ResourceID.Type(), "properties.providers.kubernetes.namespace", namespace, e.DatabaseClient()) + if err != nil { + return nil, err + } + + if len(result.Items) > 0 { + env := &datamodel.Environment_v20250801preview{} + if err := result.Items[0].As(env); err != nil { + return nil, err + } + + // If a different resource has the same namespace, return a conflict + // Otherwise, continue and update the resource + if old == nil || env.ID != old.ID { + return rest.NewConflictResponse(fmt.Sprintf("Environment %s with the same namespace (%s) already exists", env.ID, namespace)), nil + } + } + + ns := &corev1.Namespace{} + err = e.Options().KubeClient.Get(ctx, client.ObjectKey{Name: namespace}, ns) + if err != nil { + if apierrors.IsNotFound(err) { + return rest.NewBadRequestResponse(fmt.Sprintf("Namespace '%s' does not exist in the Kubernetes cluster. Please create it before proceeding.", namespace)), nil + } + return nil, err + } + } + + newResource.SetProvisioningState(v1.ProvisioningStateSucceeded) + newEtag, err := e.SaveResource(ctx, serviceCtx.ResourceID.String(), newResource, etag) + if err != nil { + return nil, err + } + + return e.ConstructSyncResponse(ctx, req.Method, newEtag, newResource) +} diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment_test.go b/pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment_test.go new file mode 100644 index 0000000000..69c406b720 --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment_test.go @@ -0,0 +1,353 @@ +/* +Copyright 2023 The Radius Authors. + +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 v20250801preview + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "testing" + + ctrl "github.com/radius-project/radius/pkg/armrpc/frontend/controller" + "github.com/radius-project/radius/pkg/armrpc/rpctest" + "github.com/radius-project/radius/pkg/components/database" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + "github.com/radius-project/radius/test/k8sutil" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestCreateOrUpdateEnvironmentRun_20250801Preview(t *testing.T) { + mctrl := gomock.NewController(t) + defer mctrl.Finish() + + databaseClient := database.NewMockClient(mctrl) + ctx := context.Background() + + createNewResourceCases := []struct { + desc string + headerKey string + headerValue string + resourceETag string + expectedStatusCode int + shouldFail bool + }{ + {"create-new-resource-no-if-match", "If-Match", "", "", 200, false}, + {"create-new-resource-*-if-match", "If-Match", "*", "", 412, true}, + {"create-new-resource-etag-if-match", "If-Match", "randome-etag", "", 412, true}, + {"create-new-resource-*-if-none-match", "If-None-Match", "*", "", 200, false}, + } + + for _, tt := range createNewResourceCases { + t.Run(tt.desc, func(t *testing.T) { + envInput, envDataModel, expectedOutput := getTestModelsv20250801preview() + w := httptest.NewRecorder() + req, err := rpctest.NewHTTPRequestFromJSON(ctx, http.MethodGet, testHeaderfilev20250801preview, envInput) + require.NoError(t, err) + req.Header.Set(tt.headerKey, tt.headerValue) + ctx := rpctest.NewARMRequestContext(req) + + databaseClient. + EXPECT(). + Get(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, id string, _ ...database.GetOptions) (*database.Object, error) { + return nil, &database.ErrNotFound{ID: id} + }) + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Query(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, query database.Query, options ...database.QueryOptions) (*database.ObjectQueryResult, error) { + return &database.ObjectQueryResult{ + Items: []database.Object{}, + }, nil + }) + } + + expectedOutput.SystemData.CreatedAt = expectedOutput.SystemData.LastModifiedAt + expectedOutput.SystemData.CreatedBy = expectedOutput.SystemData.LastModifiedBy + expectedOutput.SystemData.CreatedByType = expectedOutput.SystemData.LastModifiedByType + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Save(gomock.Any(), gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, obj *database.Object, opts ...database.SaveOptions) error { + obj.ETag = "new-resource-etag" + obj.Data = envDataModel + return nil + }) + } + + defaultNamespace := &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default", + }, + } + opts := ctrl.Options{ + DatabaseClient: databaseClient, + KubeClient: k8sutil.NewFakeKubeClient(nil, defaultNamespace), + } + + ctl, err := NewCreateOrUpdateEnvironmentv20250801preview(opts) + require.NoError(t, err) + resp, err := ctl.Run(ctx, w, req) + require.NoError(t, err) + _ = resp.Apply(ctx, w, req) + require.Equal(t, tt.expectedStatusCode, w.Result().StatusCode) + if !tt.shouldFail { + actualOutput := &v20250801preview.EnvironmentResource{} + _ = json.Unmarshal(w.Body.Bytes(), actualOutput) + require.Equal(t, expectedOutput, actualOutput) + + require.Equal(t, "new-resource-etag", w.Header().Get("ETag")) + } + }) + } + + updateExistingResourceCases := []struct { + desc string + headerKey string + headerValue string + resourceETag string + expectedStatusCode int + shouldFail bool + }{ + {"update-resource-no-if-match", "If-Match", "", "resource-etag", 200, false}, + {"update-resource-*-if-match", "If-Match", "*", "resource-etag", 200, false}, + {"update-resource-matching-if-match", "If-Match", "matching-etag", "matching-etag", 200, false}, + {"update-resource-not-matching-if-match", "If-Match", "not-matching-etag", "another-etag", 412, true}, + {"update-resource-*-if-none-match", "If-None-Match", "*", "another-etag", 412, true}, + } + + for _, tt := range updateExistingResourceCases { + t.Run(tt.desc, func(t *testing.T) { + envInput, envDataModel, expectedOutput := getTestModelsv20250801preview() + w := httptest.NewRecorder() + req, err := rpctest.NewHTTPRequestFromJSON(ctx, http.MethodGet, testHeaderfilev20250801preview, envInput) + require.NoError(t, err) + req.Header.Set(tt.headerKey, tt.headerValue) + ctx := rpctest.NewARMRequestContext(req) + + databaseClient. + EXPECT(). + Get(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, id string, _ ...database.GetOptions) (*database.Object, error) { + return &database.Object{ + Metadata: database.Metadata{ID: id, ETag: tt.resourceETag}, + Data: envDataModel, + }, nil + }) + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Query(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, query database.Query, options ...database.QueryOptions) (*database.ObjectQueryResult, error) { + return &database.ObjectQueryResult{ + Items: []database.Object{}, + }, nil + }) + } + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Save(gomock.Any(), gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, obj *database.Object, opts ...database.SaveOptions) error { + obj.ETag = "updated-resource-etag" + obj.Data = envDataModel + return nil + }) + } + + defaultNamespace := &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default", + }, + } + opts := ctrl.Options{ + DatabaseClient: databaseClient, + KubeClient: k8sutil.NewFakeKubeClient(nil, defaultNamespace), + } + + ctl, err := NewCreateOrUpdateEnvironmentv20250801preview(opts) + require.NoError(t, err) + resp, err := ctl.Run(ctx, w, req) + require.NoError(t, err) + + _ = resp.Apply(ctx, w, req) + require.NoError(t, err) + require.Equal(t, tt.expectedStatusCode, w.Result().StatusCode) + + if !tt.shouldFail { + actualOutput := &v20250801preview.EnvironmentResource{} + _ = json.Unmarshal(w.Body.Bytes(), actualOutput) + require.Equal(t, expectedOutput, actualOutput) + + require.Equal(t, "updated-resource-etag", w.Header().Get("ETag")) + } + }) + } + + patchNonExistingResourceCases := []struct { + desc string + headerKey string + headerValue string + resourceEtag string + expectedStatusCode int + shouldFail bool + }{ + {"patch-non-existing-resource-no-if-match", "If-Match", "", "", 404, true}, + {"patch-non-existing-resource-*-if-match", "If-Match", "*", "", 404, true}, + {"patch-non-existing-resource-random-if-match", "If-Match", "randome-etag", "", 404, true}, + } + + for _, tt := range patchNonExistingResourceCases { + t.Run(fmt.Sprint(tt.desc), func(t *testing.T) { + envInput, _, _ := getTestModelsv20250801preview() + w := httptest.NewRecorder() + req, err := rpctest.NewHTTPRequestFromJSON(ctx, http.MethodPatch, testHeaderfilev20250801preview, envInput) + require.NoError(t, err) + req.Header.Set(tt.headerKey, tt.headerValue) + ctx := rpctest.NewARMRequestContext(req) + + databaseClient. + EXPECT(). + Get(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, id string, _ ...database.GetOptions) (*database.Object, error) { + return nil, &database.ErrNotFound{ID: id} + }) + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Query(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, query database.Query, options ...database.QueryOptions) (*database.ObjectQueryResult, error) { + return &database.ObjectQueryResult{ + Items: []database.Object{}, + }, nil + }) + } + + defaultNamespace := &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default", + }, + } + opts := ctrl.Options{ + DatabaseClient: databaseClient, + KubeClient: k8sutil.NewFakeKubeClient(nil, defaultNamespace), + } + + ctl, err := NewCreateOrUpdateEnvironmentv20250801preview(opts) + require.NoError(t, err) + resp, err := ctl.Run(ctx, w, req) + require.NoError(t, err) + _ = resp.Apply(ctx, w, req) + require.Equal(t, tt.expectedStatusCode, w.Result().StatusCode) + }) + } + + patchExistingResourceCases := []struct { + desc string + headerKey string + headerValue string + resourceEtag string + expectedStatusCode int + shouldFail bool + }{ + {"patch-existing-resource-no-if-match", "If-Match", "", "resource-etag", 200, false}, + {"patch-existing-resource-*-if-match", "If-Match", "*", "resource-etag", 200, false}, + {"patch-existing-resource-matching-if-match", "If-Match", "matching-etag", "matching-etag", 200, false}, + {"patch-existing-resource-not-matching-if-match", "If-Match", "not-matching-etag", "another-etag", 412, true}, + } + + for _, tt := range patchExistingResourceCases { + t.Run(fmt.Sprint(tt.desc), func(t *testing.T) { + envInput, envDataModel, expectedOutput := getTestModelsv20250801preview() + w := httptest.NewRecorder() + req, err := rpctest.NewHTTPRequestFromJSON(ctx, http.MethodPatch, testHeaderfilev20250801preview, envInput) + require.NoError(t, err) + req.Header.Set(tt.headerKey, tt.headerValue) + ctx := rpctest.NewARMRequestContext(req) + + databaseClient. + EXPECT(). + Get(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, id string, _ ...database.GetOptions) (*database.Object, error) { + return &database.Object{ + Metadata: database.Metadata{ID: id, ETag: tt.resourceEtag}, + Data: envDataModel, + }, nil + }) + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Query(gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, query database.Query, options ...database.QueryOptions) (*database.ObjectQueryResult, error) { + return &database.ObjectQueryResult{ + Items: []database.Object{}, + }, nil + }) + } + + if !tt.shouldFail { + databaseClient. + EXPECT(). + Save(gomock.Any(), gomock.Any(), gomock.Any()). + DoAndReturn(func(ctx context.Context, obj *database.Object, opts ...database.SaveOptions) error { + cfg := database.NewSaveConfig(opts...) + obj.ETag = cfg.ETag + obj.Data = envDataModel + return nil + }) + } + + defaultNamespace := &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default", + }, + } + opts := ctrl.Options{ + DatabaseClient: databaseClient, + KubeClient: k8sutil.NewFakeKubeClient(nil, defaultNamespace), + } + + ctl, err := NewCreateOrUpdateEnvironmentv20250801preview(opts) + require.NoError(t, err) + resp, err := ctl.Run(ctx, w, req) + require.NoError(t, err) + _ = resp.Apply(ctx, w, req) + require.NoError(t, err) + require.Equal(t, tt.expectedStatusCode, w.Result().StatusCode) + + if !tt.shouldFail { + actualOutput := &v20250801preview.EnvironmentResource{} + _ = json.Unmarshal(w.Body.Bytes(), actualOutput) + require.Equal(t, expectedOutput, actualOutput) + } + }) + } +} \ No newline at end of file diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/test.go b/pkg/corerp/frontend/controller/environments/v20250801preview/test.go new file mode 100644 index 0000000000..2575d212cb --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/test.go @@ -0,0 +1,43 @@ +/* +Copyright 2023 The Radius Authors. + +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 v20250801preview + +import ( + "encoding/json" + + v20250801preview "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + "github.com/radius-project/radius/pkg/corerp/datamodel" + "github.com/radius-project/radius/test/testutil" +) + +const testHeaderfilev20250801preview = "requestheaderspreview.json" + +func getTestModelsv20250801preview() (*v20250801preview.EnvironmentResource, *datamodel.Environment_v20250801preview, *v20250801preview.EnvironmentResource) { + rawInput := testutil.ReadFixture("environmentresource_input.json") + envInput := &v20250801preview.EnvironmentResource{} + _ = json.Unmarshal(rawInput, envInput) + + rawDataModel := testutil.ReadFixture("environmentresource_datamodel.json") + envDataModel := &datamodel.Environment_v20250801preview{} + _ = json.Unmarshal(rawDataModel, envDataModel) + + rawExpectedOutput := testutil.ReadFixture("environmentresource_output.json") + expectedOutput := &v20250801preview.EnvironmentResource{} + _ = json.Unmarshal(rawExpectedOutput, expectedOutput) + + return envInput, envDataModel, expectedOutput +} \ No newline at end of file diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_datamodel.json b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_datamodel.json new file mode 100644 index 0000000000..f5dcb7a888 --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_datamodel.json @@ -0,0 +1,33 @@ +{ + "id": "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-k8s-env", + "name": "my-k8s-env", + "type": "Radius.Core/environments", + "location": "West US", + "tags": { + "env": "test" + }, + "systemData": { + "createdBy": "test-user", + "createdByType": "User", + "createdAt": "2023-10-01T10:00:00Z", + "lastModifiedBy": "test-user", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-10-01T10:00:00Z" + }, + "internalMetadata": { + "createdAPIVersion": "2025-08-01-preview", + "updatedAPIVersion": "2025-08-01-preview", + "asyncProvisioningState": "Succeeded" + }, + "properties": { + "recipePacks": [ + "/planes/radius/local/providers/Radius.Core/recipePacks/kubernetes-pack" + ], + "providers": { + "kubernetes": { + "namespace": "default" + } + }, + "simulated": false + } +} diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_input.json b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_input.json new file mode 100644 index 0000000000..598fd6b57e --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_input.json @@ -0,0 +1,20 @@ +{ + "id": "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-k8s-env", + "name": "my-k8s-env", + "type": "Radius.Core/environments", + "location": "West US", + "tags": { + "env": "test" + }, + "properties": { + "provisioningState": "Succeeded", + "recipePacks": [ + "/planes/radius/local/providers/Radius.Core/recipePacks/kubernetes-pack" + ], + "providers": { + "kubernetes": { + "namespace": "default" + } + } + } +} diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_output.json b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_output.json new file mode 100644 index 0000000000..98a13ad3a0 --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/environmentresource_output.json @@ -0,0 +1,28 @@ +{ + "id": "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-k8s-env", + "name": "my-k8s-env", + "type": "Radius.Core/environments", + "location": "West US", + "tags": { + "env": "test" + }, + "systemData": { + "createdBy": "test-user", + "createdByType": "User", + "createdAt": "2023-10-01T10:00:00Z", + "lastModifiedBy": "test-user", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-10-01T10:00:00Z" + }, + "properties": { + "provisioningState": "Succeeded", + "recipePacks": [ + "/planes/radius/local/providers/Radius.Core/recipePacks/kubernetes-pack" + ], + "providers": { + "kubernetes": { + "namespace": "default" + } + } + } +} diff --git a/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/requestheaderspreview.json b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/requestheaderspreview.json new file mode 100644 index 0000000000..89ee2ae03c --- /dev/null +++ b/pkg/corerp/frontend/controller/environments/v20250801preview/testdata/requestheaderspreview.json @@ -0,0 +1,63 @@ +{ + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "en-US", + "Content-Length": "305", + "Content-Type": "application/json; charset=utf-8", + "Referer": "https://radapp.io/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-k8s-env?api-version=2025-08-01-preview", + "Traceparent": "00-000011048df2134ca37c9a689c3a0000-0000000000000000-01", + "User-Agent": "ARMClient/1.6.0.0", + "Via": "1.1 Azure", + "X-Azure-Requestchain": "hops=1", + "X-Fd-Clienthttpversion": "1.1", + "X-Fd-Clientip": "0000:0000:0000:1:0000:0000:0000:0000", + "X-Fd-Edgeenvironment": "fake", + "X-Fd-Eventid": "00005A12DDEC4F8B80B65BB768190000", + "X-Fd-Impressionguid": "00005A12DDEC4F8B80B65BB768190000", + "X-Fd-Originalurl": "https://radapp.io:443/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-k8s-env?api-version=2025-08-01-preview", + "X-Fd-Partner": "AzureResourceManager_Test", + "X-Fd-Ref": "Ref A: xxxx Ref B: xxxx Ref C: 2022-03-22T18:54:50Z", + "X-Fd-Revip": "country=United States,iso=us,state=Washington,city=Redmond,zip=00000,tz=-8,asn=0,lat=0,long=-1,countrycf=8,citycf=8", + "X-Fd-Routekey": "000075000", + "X-Fd-Socketip": "0000:0000:0000:1:0000:0000:0000:0000", + "X-Forwarded-For": "192.168.0.10", + "X-Forwarded-Host": "radapp.io", + "X-Forwarded-Port": "443", + "X-Forwarded-Proto": "https", + "X-Forwarded-Scheme": "https", + "X-Ms-Activity-Vector": "IN.0P", + "X-Ms-Arm-Network-Source": "PublicNetwork", + "X-Ms-Arm-Request-Tracking-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Arm-Resource-System-Data": "{\"lastModifiedBy\":\"test-user\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-10-01T10:00:00Z\"}", + "X-Ms-Arm-Service-Request-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Client-Acr": "1", + "X-Ms-Client-Alt-Sec-Id": "1:live.com:0006000017E40000", + "X-Ms-Client-App-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Client-App-Id-Acr": "0", + "X-Ms-Client-Audience": "https://management.core.windows.net/", + "X-Ms-Client-Authentication-Methods": "pwd", + "X-Ms-Client-Authorization-Source": "RoleBased", + "X-Ms-Client-Family-Name-Encoded": "fake", + "X-Ms-Client-Given-Name-Encoded": "fake", + "X-Ms-Client-Identity-Provider": "live.com", + "X-Ms-Client-Ip-Address": "192.168.0.10", + "X-Ms-Client-Issuer": "https://sts.windows-ppe.net/00000000-0000-0000-0000-000000000000/", + "X-Ms-Client-Location": "centralus", + "X-Ms-Client-Object-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Client-Principal-Group-Membership-Source": "Token", + "X-Ms-Client-Principal-Id": "000000000000000", + "X-Ms-Client-Principal-Name": "live.com#fake@hotmail.com", + "X-Ms-Client-Puid": "000000000000000", + "X-Ms-Client-Request-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Client-Scope": "user_impersonation", + "X-Ms-Client-Tenant-Id": "00000000-0000-0000-0000-000000000001", + "X-Ms-Client-Wids": "00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000001", + "X-Ms-Correlation-Request-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Home-Tenant-Id": "00000000-0000-0000-0000-000000000002", + "X-Ms-Request-Id": "00000000-0000-0000-0000-000000000000", + "X-Ms-Routing-Request-Id": "CENTRALUS:20220322T185452Z:00000000-0000-0000-0000-000000000000", + "X-Original-Forwarded-For": "0000:0000:0000:1:449b:f928:e40a:a351", + "X-Real-Ip": "192.168.0.10", + "X-Request-Id": "1000f6040000000000004bc7d1666424", + "X-Scheme": "https" +} diff --git a/pkg/corerp/frontend/controller/recipepacks/createorupdaterecipepack_test.go b/pkg/corerp/frontend/controller/recipepacks/createorupdaterecipepack_test.go index 257858ff67..b7c2bbaa68 100644 --- a/pkg/corerp/frontend/controller/recipepacks/createorupdaterecipepack_test.go +++ b/pkg/corerp/frontend/controller/recipepacks/createorupdaterecipepack_test.go @@ -95,7 +95,6 @@ func TestCreateOrUpdateRecipePackRun_CreateNew(t *testing.T) { actualOutput := &v20250801preview.RecipePackResource{} _ = json.Unmarshal(w.Body.Bytes(), actualOutput) - require.Equal(t, expectedOutput.Properties.Description, actualOutput.Properties.Description) require.Equal(t, expectedOutput.Properties.Recipes, actualOutput.Properties.Recipes) require.Equal(t, v20250801preview.ProvisioningStateSucceeded, *actualOutput.Properties.ProvisioningState) } @@ -145,7 +144,6 @@ func TestCreateOrUpdateRecipePackRun_UpdateExisting(t *testing.T) { actualOutput := &v20250801preview.RecipePackResource{} _ = json.Unmarshal(w.Body.Bytes(), actualOutput) - require.Equal(t, expectedOutput.Properties.Description, actualOutput.Properties.Description) require.Equal(t, expectedOutput.Properties.Recipes, actualOutput.Properties.Recipes) require.Equal(t, v20250801preview.ProvisioningStateSucceeded, *actualOutput.Properties.ProvisioningState) } @@ -154,12 +152,10 @@ func getTestModels() (*v20250801preview.RecipePackResource, *datamodel.RecipePac resourceID := "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/default/providers/Radius.Core/recipePacks/testrecipepack" resourceName := "testrecipepack" location := "global" - description := "Test recipe pack with sample recipes" recipePackInput := &v20250801preview.RecipePackResource{ Location: &location, Properties: &v20250801preview.RecipePackProperties{ - Description: &description, Recipes: map[string]*v20250801preview.RecipeDefinition{ "Applications.Core/extenders": { RecipeKind: to.Ptr(v20250801preview.RecipeKindBicep), @@ -190,7 +186,6 @@ func getTestModels() (*v20250801preview.RecipePackResource, *datamodel.RecipePac }, }, Properties: datamodel.RecipePackProperties{ - Description: description, Recipes: map[string]*datamodel.RecipeDefinition{ "Applications.Core/extenders": { RecipeKind: "bicep", @@ -217,7 +212,6 @@ func getTestModels() (*v20250801preview.RecipePackResource, *datamodel.RecipePac Type: to.Ptr(datamodel.RecipePackResourceType), Location: &location, Properties: &v20250801preview.RecipePackProperties{ - Description: &description, ProvisioningState: to.Ptr(v20250801preview.ProvisioningStateSucceeded), Recipes: map[string]*v20250801preview.RecipeDefinition{ "Applications.Core/extenders": { diff --git a/pkg/corerp/frontend/controller/recipepacks/testdata/recipepack_datamodel.json b/pkg/corerp/frontend/controller/recipepacks/testdata/recipepack_datamodel.json index 3bb6f1cd6e..05a1a4d708 100644 --- a/pkg/corerp/frontend/controller/recipepacks/testdata/recipepack_datamodel.json +++ b/pkg/corerp/frontend/controller/recipepacks/testdata/recipepack_datamodel.json @@ -12,7 +12,6 @@ "lastModifiedByType": "User" }, "properties": { - "description": "Test recipe pack with sample recipes", "recipes": { "Applications.Core/extenders": { "recipeKind": "bicep", diff --git a/pkg/corerp/setup/setup.go b/pkg/corerp/setup/setup.go index b11c87c1a2..abb75a2f88 100644 --- a/pkg/corerp/setup/setup.go +++ b/pkg/corerp/setup/setup.go @@ -28,6 +28,7 @@ import ( app_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/applications" ctr_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/containers" env_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/environments" + env_v20250801_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/environments/v20250801preview" ext_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/extenders" gw_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/gateways" rp_ctrl "github.com/radius-project/radius/pkg/corerp/frontend/controller/recipepacks" @@ -250,7 +251,7 @@ func SetupNamespace(recipeControllerConfig *controllerconfig.RecipeControllerCon return ns } -// SetupRadiusCoreNamespace builds the Radius.Core namespace for recipe packs. +// SetupRadiusCoreNamespace builds the namespace for core resource provider. func SetupRadiusCoreNamespace(recipeControllerConfig *controllerconfig.RecipeControllerConfig) *builder.Namespace { ns := builder.NewNamespace("Radius.Core") @@ -266,5 +267,17 @@ func SetupRadiusCoreNamespace(recipeControllerConfig *controllerconfig.RecipeCon }, }) + _ = ns.AddResource("environments", &builder.ResourceOption[*datamodel.Environment_v20250801preview, datamodel.Environment_v20250801preview]{ + RequestConverter: converter.Environment20250801DataModelFromVersioned, + ResponseConverter: converter.Environment20250801DataModelToVersioned, + + Put: builder.Operation[datamodel.Environment_v20250801preview]{ + APIController: env_v20250801_ctrl.NewCreateOrUpdateEnvironmentv20250801preview, + }, + Patch: builder.Operation[datamodel.Environment_v20250801preview]{ + APIController: env_v20250801_ctrl.NewCreateOrUpdateEnvironmentv20250801preview, + }, + }) + return ns } diff --git a/pkg/corerp/setup/setup_test.go b/pkg/corerp/setup/setup_test.go index 1e719c127e..4ef71814d0 100644 --- a/pkg/corerp/setup/setup_test.go +++ b/pkg/corerp/setup/setup_test.go @@ -210,6 +210,26 @@ var handlerTests = []rpctest.HandlerTestSpec{ }, } +var radiusCoreHandlerTests = []rpctest.HandlerTestSpec{ + { + OperationType: v1.OperationType{Type: "Radius.Core/recipePacks", Method: v1.OperationPut}, + Path: "/resourcegroups/testrg/providers/radius.core/recipepacks/recipe0", + Method: http.MethodPut, + }, { + OperationType: v1.OperationType{Type: "Radius.Core/recipePacks", Method: v1.OperationPatch}, + Path: "/resourcegroups/testrg/providers/radius.core/recipepacks/recipe0", + Method: http.MethodPatch, + }, { + OperationType: v1.OperationType{Type: "Radius.Core/environments", Method: v1.OperationPut}, + Path: "/resourcegroups/testrg/providers/radius.core/environments/env0", + Method: http.MethodPut, + }, { + OperationType: v1.OperationType{Type: "Radius.Core/environments", Method: v1.OperationPatch}, + Path: "/resourcegroups/testrg/providers/radius.core/environments/env0", + Method: http.MethodPatch, + }, +} + func TestRouter(t *testing.T) { conn, err := sdk.NewDirectConnection("http://localhost:9000/apis/api.ucp.dev/v1alpha3") require.NoError(t, err) @@ -234,3 +254,28 @@ func TestRouter(t *testing.T) { return r, nsBuilder.ApplyAPIHandlers(ctx, r, options, validator) }) } + +func TestRadiusCoreRouter(t *testing.T) { + conn, err := sdk.NewDirectConnection("http://localhost:9000/apis/api.ucp.dev/v1alpha3") + require.NoError(t, err) + cfg := &controllerconfig.RecipeControllerConfig{ + UCPConnection: &conn, + } + ns := SetupRadiusCoreNamespace(cfg) + nsBuilder := ns.GenerateBuilder() + + rpctest.AssertRouters(t, radiusCoreHandlerTests, "/api.ucp.dev", "/planes/radius/local", func(ctx context.Context) (chi.Router, error) { + r := chi.NewRouter() + validator, err := builder.NewOpenAPIValidator(ctx, "/api.ucp.dev", "radius.core") + require.NoError(t, err) + + options := apictrl.Options{ + Address: "localhost:9000", + PathBase: "/api.ucp.dev", + DatabaseClient: inmemory.NewClient(), + StatusManager: statusmanager.NewMockStatusManager(gomock.NewController(t)), + } + + return r, nsBuilder.ApplyAPIHandlers(ctx, r, options, validator) + }) +} diff --git a/pkg/daprrp/api/README.md b/pkg/daprrp/api/README.md index d783aec2b0..e92ddb46f8 100644 --- a/pkg/daprrp/api/README.md +++ b/pkg/daprrp/api/README.md @@ -3,20 +3,25 @@ This directory includes API version specific models from open api specs. The models in this directory is used for serializing/deserializing request and response. [datamodels](../datamodel/) has the converters to convert between version specific models and datamodels. datamodels will be used for internal controller and datastorage. ## Generate new models + ### Prerequisites + 1. Install [NodeJS](https://nodejs.org/) 2. Install [AutoRest](http://aka.ms/autorest) -``` -npm install -g autorest -``` + + ```shell + npm install -g autorest@3.7.2 + ``` ### Add new api-version 1. Add api version tags and openapi file below in this README.md 2. Run autorest. -```bash -autorest README.md --tag=dapr-2023-10-01-preview -``` + + ```bash + autorest README.md --tag=dapr-2023-10-01-preview + ``` + 3. Create or modify the corresponding datamodels in [datamodel](../datamodel/) 4. Add the converter between versioned model and datamodel in [converter](../datamodel/converter/) @@ -38,15 +43,15 @@ input-file: modelerfour: treat-type-object-as-anything: false ``` + ### Common The following configuration generates track2 go models and client. ```yaml $(tag) != '' version: 3.*.* -use: "@autorest/go@4.0.0-preview.69" +use: "@autorest/go@4.0.0-preview.74" module: "github.com/radius-project/radius/pkg/daprrp/api/v20231001preview" -module-version: 0.0.1 file-prefix: zz_generated_ license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated." azure-arm: true @@ -61,4 +66,4 @@ These settings apply only when `--tag=dapr-2023-10-01-preview` is specified on t ```yaml $(tag) == 'dapr-2023-10-01-preview' output-folder: ./v20231001preview -``` \ No newline at end of file +``` diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_client_factory.go b/pkg/daprrp/api/v20231001preview/zz_generated_client_factory.go index 1431c737b5..9786f7a2cb 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_client_factory.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_client_factory.go @@ -13,7 +13,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { rootScope string - internal *arm.Client + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -30,7 +30,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio } return &ClientFactory{ rootScope: rootScope, - internal: internal, + internal: internal, }, nil } @@ -38,7 +38,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio func (c *ClientFactory) NewConfigurationStoresClient() *ConfigurationStoresClient { return &ConfigurationStoresClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -53,7 +53,7 @@ func (c *ClientFactory) NewOperationsClient() *OperationsClient { func (c *ClientFactory) NewPubSubBrokersClient() *PubSubBrokersClient { return &PubSubBrokersClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -61,7 +61,7 @@ func (c *ClientFactory) NewPubSubBrokersClient() *PubSubBrokersClient { func (c *ClientFactory) NewSecretStoresClient() *SecretStoresClient { return &SecretStoresClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -69,7 +69,6 @@ func (c *ClientFactory) NewSecretStoresClient() *SecretStoresClient { func (c *ClientFactory) NewStateStoresClient() *StateStoresClient { return &StateStoresClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_configurationstores_client.go b/pkg/daprrp/api/v20231001preview/zz_generated_configurationstores_client.go index 6208d986f6..e2afe72304 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_configurationstores_client.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_configurationstores_client.go @@ -19,7 +19,7 @@ import ( // ConfigurationStoresClient contains the methods for the ConfigurationStores group. // Don't use this type directly, use NewConfigurationStoresClient() instead. type ConfigurationStoresClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewConfigurationStoresClient(rootScope string, credential azcore.TokenCrede } client := &ConfigurationStoresClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *ConfigurationStoresClient) BeginCreateOrUpdate(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationStoresClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *ConfigurationStoresClient) createOrUpdateCreateRequest(ctx context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a DaprConfigurationStoreResource @@ -127,7 +127,7 @@ func (client *ConfigurationStoresClient) BeginDelete(ctx context.Context, config } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationStoresClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -238,7 +238,7 @@ func (client *ConfigurationStoresClient) getHandleResponse(resp *http.Response) // Generated from API version 2023-10-01-preview // - options - ConfigurationStoresClientListByScopeOptions contains the optional parameters for the ConfigurationStoresClient.NewListByScopePager // method. -func (client *ConfigurationStoresClient) NewListByScopePager(options *ConfigurationStoresClientListByScopeOptions) (*runtime.Pager[ConfigurationStoresClientListByScopeResponse]) { +func (client *ConfigurationStoresClient) NewListByScopePager(options *ConfigurationStoresClientListByScopeOptions) *runtime.Pager[ConfigurationStoresClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[ConfigurationStoresClientListByScopeResponse]{ More: func(page ConfigurationStoresClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -255,7 +255,7 @@ func (client *ConfigurationStoresClient) NewListByScopePager(options *Configurat return ConfigurationStoresClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -300,7 +300,7 @@ func (client *ConfigurationStoresClient) BeginUpdate(ctx context.Context, config } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationStoresClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -350,8 +350,7 @@ func (client *ConfigurationStoresClient) updateCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_constants.go b/pkg/daprrp/api/v20231001preview/zz_generated_constants.go index fce6c2a10f..f19385ad94 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_constants.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_constants.go @@ -4,11 +4,6 @@ package v20231001preview -const ( - moduleName = "github.com/radius-project/radius/pkg/daprrp/api/v20231001preview" - moduleVersion = "v0.0.1" -) - // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -18,7 +13,7 @@ const ( // PossibleActionTypeValues returns the possible values for the ActionType const type. func PossibleActionTypeValues() []ActionType { - return []ActionType{ + return []ActionType{ ActionTypeInternal, } } @@ -27,15 +22,15 @@ func PossibleActionTypeValues() []ActionType { type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, @@ -47,21 +42,21 @@ func PossibleCreatedByTypeValues() []CreatedByType { type IdentitySettingKind string const ( -// IdentitySettingKindAzureComWorkload - azure ad workload identity + // IdentitySettingKindAzureComWorkload - azure ad workload identity IdentitySettingKindAzureComWorkload IdentitySettingKind = "azure.com.workload" -// IdentitySettingKindSystemAssigned - System assigned managed identity + // IdentitySettingKindSystemAssigned - System assigned managed identity IdentitySettingKindSystemAssigned IdentitySettingKind = "systemAssigned" -// IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity + // IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity IdentitySettingKindSystemAssignedUserAssigned IdentitySettingKind = "systemAssignedUserAssigned" -// IdentitySettingKindUndefined - undefined identity + // IdentitySettingKindUndefined - undefined identity IdentitySettingKindUndefined IdentitySettingKind = "undefined" -// IdentitySettingKindUserAssigned - User assigned managed identity + // IdentitySettingKindUserAssigned - User assigned managed identity IdentitySettingKindUserAssigned IdentitySettingKind = "userAssigned" ) // PossibleIdentitySettingKindValues returns the possible values for the IdentitySettingKind const type. func PossibleIdentitySettingKindValues() []IdentitySettingKind { - return []IdentitySettingKind{ + return []IdentitySettingKind{ IdentitySettingKindAzureComWorkload, IdentitySettingKindSystemAssigned, IdentitySettingKindSystemAssignedUserAssigned, @@ -75,14 +70,14 @@ func PossibleIdentitySettingKindValues() []IdentitySettingKind { type Origin string const ( - OriginSystem Origin = "system" - OriginUser Origin = "user" + OriginSystem Origin = "system" + OriginUser Origin = "user" OriginUserSystem Origin = "user,system" ) // PossibleOriginValues returns the possible values for the Origin const type. func PossibleOriginValues() []Origin { - return []Origin{ + return []Origin{ OriginSystem, OriginUser, OriginUserSystem, @@ -93,27 +88,27 @@ func PossibleOriginValues() []Origin { type ProvisioningState string const ( -// ProvisioningStateAccepted - The resource create request has been accepted + // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" -// ProvisioningStateCanceled - The resource provisioning has been canceled + // ProvisioningStateCanceled - The resource provisioning has been canceled ProvisioningStateCanceled ProvisioningState = "Canceled" -// ProvisioningStateCreating - The resource is being created + // ProvisioningStateCreating - The resource is being created ProvisioningStateCreating ProvisioningState = "Creating" -// ProvisioningStateDeleting - The resource is being deleted + // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" -// ProvisioningStateFailed - The resource provisioning has failed + // ProvisioningStateFailed - The resource provisioning has failed ProvisioningStateFailed ProvisioningState = "Failed" -// ProvisioningStateProvisioning - The resource is being provisioned + // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" -// ProvisioningStateSucceeded - The resource has been successfully provisioned + // ProvisioningStateSucceeded - The resource has been successfully provisioned ProvisioningStateSucceeded ProvisioningState = "Succeeded" -// ProvisioningStateUpdating - The resource is being updated + // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ + return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, @@ -131,17 +126,16 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceProvisioning string const ( -// ResourceProvisioningManual - The resource lifecycle will be managed by the user + // ResourceProvisioningManual - The resource lifecycle will be managed by the user ResourceProvisioningManual ResourceProvisioning = "manual" -// ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius + // ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius ResourceProvisioningRecipe ResourceProvisioning = "recipe" ) // PossibleResourceProvisioningValues returns the possible values for the ResourceProvisioning const type. func PossibleResourceProvisioningValues() []ResourceProvisioning { - return []ResourceProvisioning{ + return []ResourceProvisioning{ ResourceProvisioningManual, ResourceProvisioningRecipe, } } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_interfaces.go b/pkg/daprrp/api/v20231001preview/zz_generated_interfaces.go index 721325a717..67a9d96507 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_interfaces.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_interfaces.go @@ -12,4 +12,3 @@ type EnvironmentComputeClassification interface { // GetEnvironmentCompute returns the EnvironmentCompute content of the underlying type. GetEnvironmentCompute() *EnvironmentCompute } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_models.go b/pkg/daprrp/api/v20231001preview/zz_generated_models.go index 3e69b7fcfd..206ac77b3c 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_models.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_models.go @@ -8,24 +8,24 @@ import "time" // AzureContainerInstanceCompute - The Azure container instance compute configuration type AzureContainerInstanceCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource group to use for the environment. + // The resource group to use for the environment. ResourceGroup *string -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type AzureContainerInstanceCompute. func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: a.Identity, - Kind: a.Kind, + Identity: a.Identity, + Kind: a.Kind, ResourceID: a.ResourceID, } } @@ -33,395 +33,395 @@ func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentComp // AzureResourceManagerCommonTypesTrackedResourceUpdate - The resource model definition for an Azure Resource Manager tracked // top level resource which has 'tags' and a 'location' type AzureResourceManagerCommonTypesTrackedResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprConfigurationStoreProperties - Dapr configuration store portable resource properties type DaprConfigurationStoreProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The name of the Dapr component to be used as a secret store + // The name of the Dapr component to be used as a secret store Auth *DaprResourceAuth -// The metadata for Dapr resource which must match the values specified in Dapr component spec + // The metadata for Dapr resource which must match the values specified in Dapr component spec Metadata map[string]*MetadataValue -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// A collection of references to resources associated with the configuration store + // A collection of references to resources associated with the configuration store Resources []*ResourceReference -// Dapr component type which must matches the format used by Dapr Kubernetes configuration format + // Dapr component type which must matches the format used by Dapr Kubernetes configuration format Type *string -// Dapr component version + // Dapr component version Version *string -// READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to -// use the Dapr component. + // READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to + // use the Dapr component. ComponentName *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // DaprConfigurationStoreResource - Dapr configuration store portable resource type DaprConfigurationStoreResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *DaprConfigurationStoreProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprConfigurationStoreResourceListResult - The response of a DaprConfigurationStoreResource list operation. type DaprConfigurationStoreResourceListResult struct { -// REQUIRED; The DaprConfigurationStoreResource items on this page + // REQUIRED; The DaprConfigurationStoreResource items on this page Value []*DaprConfigurationStoreResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // DaprConfigurationStoreResourceUpdate - Dapr configuration store portable resource type DaprConfigurationStoreResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprPubSubBrokerProperties - Dapr PubSubBroker portable resource properties type DaprPubSubBrokerProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The name of the Dapr component to be used as a secret store + // The name of the Dapr component to be used as a secret store Auth *DaprResourceAuth -// The metadata for Dapr resource which must match the values specified in Dapr component spec + // The metadata for Dapr resource which must match the values specified in Dapr component spec Metadata map[string]*MetadataValue -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// A collection of references to resources associated with the pubSubBroker + // A collection of references to resources associated with the pubSubBroker Resources []*ResourceReference -// Dapr component type which must matches the format used by Dapr Kubernetes configuration format + // Dapr component type which must matches the format used by Dapr Kubernetes configuration format Type *string -// Dapr component version + // Dapr component version Version *string -// READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to -// use the Dapr component. + // READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to + // use the Dapr component. ComponentName *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // DaprPubSubBrokerResource - Dapr PubSubBroker portable resource type DaprPubSubBrokerResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *DaprPubSubBrokerProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprPubSubBrokerResourceListResult - The response of a DaprPubSubBrokerResource list operation. type DaprPubSubBrokerResourceListResult struct { -// REQUIRED; The DaprPubSubBrokerResource items on this page + // REQUIRED; The DaprPubSubBrokerResource items on this page Value []*DaprPubSubBrokerResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // DaprPubSubBrokerResourceUpdate - Dapr PubSubBroker portable resource type DaprPubSubBrokerResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprResourceAuth - Authentication properties for a Dapr component object type DaprResourceAuth struct { -// Secret store to fetch secrets from + // Secret store to fetch secrets from SecretStore *string } // DaprSecretStoreProperties - Dapr SecretStore portable resource properties type DaprSecretStoreProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The metadata for Dapr resource which must match the values specified in Dapr component spec + // The metadata for Dapr resource which must match the values specified in Dapr component spec Metadata map[string]*MetadataValue -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// Dapr component type which must matches the format used by Dapr Kubernetes configuration format + // Dapr component type which must matches the format used by Dapr Kubernetes configuration format Type *string -// Dapr component version + // Dapr component version Version *string -// READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to -// use the Dapr component. + // READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to + // use the Dapr component. ComponentName *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // DaprSecretStoreResource - Dapr SecretStore portable resource type DaprSecretStoreResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *DaprSecretStoreProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprSecretStoreResourceListResult - The response of a DaprSecretStoreResource list operation. type DaprSecretStoreResourceListResult struct { -// REQUIRED; The DaprSecretStoreResource items on this page + // REQUIRED; The DaprSecretStoreResource items on this page Value []*DaprSecretStoreResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // DaprSecretStoreResourceUpdate - Dapr SecretStore portable resource type DaprSecretStoreResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprStateStoreProperties - Dapr StateStore portable resource properties type DaprStateStoreProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The name of the Dapr component to be used as a secret store + // The name of the Dapr component to be used as a secret store Auth *DaprResourceAuth -// The metadata for Dapr resource which must match the values specified in Dapr component spec + // The metadata for Dapr resource which must match the values specified in Dapr component spec Metadata map[string]*MetadataValue -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// A collection of references to resources associated with the state store + // A collection of references to resources associated with the state store Resources []*ResourceReference -// Dapr component type which must matches the format used by Dapr Kubernetes configuration format + // Dapr component type which must matches the format used by Dapr Kubernetes configuration format Type *string -// Dapr component version + // Dapr component version Version *string -// READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to -// use the Dapr component. + // READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to + // use the Dapr component. ComponentName *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // DaprStateStoreResource - Dapr StateStore portable resource type DaprStateStoreResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *DaprStateStoreProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // DaprStateStoreResourceListResult - The response of a DaprStateStoreResource list operation. type DaprStateStoreResourceListResult struct { -// REQUIRED; The DaprStateStoreResource items on this page + // REQUIRED; The DaprStateStoreResource items on this page Value []*DaprStateStoreResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // DaprStateStoreResourceUpdate - Dapr StateStore portable resource type DaprStateStoreResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentCompute - Represents backing compute resource type EnvironmentCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } @@ -430,268 +430,267 @@ func (e *EnvironmentCompute) GetEnvironmentCompute() *EnvironmentCompute { retur // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { -// READ-ONLY; The additional info. + // READ-ONLY; The additional info. Info map[string]any -// READ-ONLY; The additional info type. + // READ-ONLY; The additional info type. Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { -// READ-ONLY; The error additional info. + // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo -// READ-ONLY; The error code. + // READ-ONLY; The error code. Code *string -// READ-ONLY; The error details. + // READ-ONLY; The error details. Details []*ErrorDetail -// READ-ONLY; The error message. + // READ-ONLY; The error message. Message *string -// READ-ONLY; The error target. + // READ-ONLY; The error target. Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { -// The error object. + // The error object. Error *ErrorDetail } // IdentitySettings is the external identity setting. type IdentitySettings struct { -// REQUIRED; kind of identity setting + // REQUIRED; kind of identity setting Kind *IdentitySettingKind -// The list of user assigned managed identities + // The list of user assigned managed identities ManagedIdentity []*string -// The URI for your compute platform's OIDC issuer + // The URI for your compute platform's OIDC issuer OidcIssuer *string -// The resource ID of the provisioned identity + // The resource ID of the provisioned identity Resource *string } // KubernetesCompute - The Kubernetes compute configuration type KubernetesCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// REQUIRED; The namespace to use for the environment. + // REQUIRED; The namespace to use for the environment. Namespace *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type KubernetesCompute. func (k *KubernetesCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: k.Identity, - Kind: k.Kind, + Identity: k.Identity, + Kind: k.Kind, ResourceID: k.ResourceID, } } // MetadataValue - A single metadata for a Dapr component object type MetadataValue struct { -// A reference of a value in a secret store component + // A reference of a value in a secret store component SecretKeyRef *MetadataValueFromSecret -// The plain text value of the metadata + // The plain text value of the metadata Value *string } // MetadataValueFromSecret - A reference of a value in a secret store component. type MetadataValueFromSecret struct { -// REQUIRED; The field to select in the secret value. If the secret value is a string, it should be equal to the secret name + // REQUIRED; The field to select in the secret value. If the secret value is a string, it should be equal to the secret name Key *string -// REQUIRED; Secret name in the secret store component + // REQUIRED; Secret name in the secret store component Name *string } // NonRedundantDaprResourceProperties - The base properties of a Dapr component object. type NonRedundantDaprResourceProperties struct { -// The metadata for Dapr resource which must match the values specified in Dapr component spec + // The metadata for Dapr resource which must match the values specified in Dapr component spec Metadata map[string]*MetadataValue -// Dapr component type which must matches the format used by Dapr Kubernetes configuration format + // Dapr component type which must matches the format used by Dapr Kubernetes configuration format Type *string -// Dapr component version + // Dapr component version Version *string -// READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to -// use the Dapr component. + // READ-ONLY; The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to + // use the Dapr component. ComponentName *string } // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { -// Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay -// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType -// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane -// operations. + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. IsDataAction *bool -// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", -// "Microsoft.Compute/virtualMachines/capture/action" + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" Name *string -// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default -// value is "user,system" + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" Origin *Origin } // OperationDisplay - Localized display information for this particular operation. type OperationDisplay struct { -// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string -// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual -// Machine", "Restart Virtual Machine". + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". Operation *string -// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft -// Compute". + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". Provider *string -// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job -// Schedule Collections". + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". Resource *string } // OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to // get the next set of results. type OperationListResult struct { -// READ-ONLY; URL to get the next set of operation list results (if there are any). + // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string -// READ-ONLY; List of operations supported by the resource provider + // READ-ONLY; List of operations supported by the resource provider Value []*Operation } // OutputResource - Properties of an output resource. type OutputResource struct { -// The UCP resource ID of the underlying resource. + // The UCP resource ID of the underlying resource. ID *string -// The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency -// relationship. LocalIDs do not have any particular format or meaning beyond -// being compared to determine dependency relationships. + // The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency + // relationship. LocalIDs do not have any particular format or meaning beyond + // being compared to determine dependency relationships. LocalID *string -// Determines whether Radius manages the lifecycle of the underlying resource. + // Determines whether Radius manages the lifecycle of the underlying resource. RadiusManaged *bool } // Recipe - The recipe used to automatically deploy underlying infrastructure for a portable resource type Recipe struct { -// REQUIRED; The name of the recipe within the environment to use + // REQUIRED; The name of the recipe within the environment to use Name *string -// Key/value parameters to pass into the recipe at deployment + // Key/value parameters to pass into the recipe at deployment Parameters map[string]any } // RecipeStatus - Recipe status at deployment time for a resource. type RecipeStatus struct { -// REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. + // REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. TemplateKind *string -// REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. + // REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. TemplatePath *string -// TemplateVersion is the version number of the template. + // TemplateVersion is the version number of the template. TemplateVersion *string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceReference - Describes a reference to an existing resource type ResourceReference struct { -// REQUIRED; Resource id of an existing resource + // REQUIRED; Resource id of an existing resource ID *string } // ResourceStatus - Status of a resource. type ResourceStatus struct { -// The compute resource associated with the resource. + // The compute resource associated with the resource. Compute EnvironmentComputeClassification -// Properties of an output resource + // Properties of an output resource OutputResources []*OutputResource -// READ-ONLY; The recipe data at the time of deployment + // READ-ONLY; The recipe data at the time of deployment Recipe *RecipeStatus } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { -// The timestamp of resource creation (UTC). + // The timestamp of resource creation (UTC). CreatedAt *time.Time -// The identity that created the resource. + // The identity that created the resource. CreatedBy *string -// The type of identity that created the resource. + // The type of identity that created the resource. CreatedByType *CreatedByType -// The timestamp of resource last modification (UTC) + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time -// The identity that last modified the resource. + // The identity that last modified the resource. LastModifiedBy *string -// The type of identity that last modified the resource. + // The type of identity that last modified the resource. LastModifiedByType *CreatedByType } // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_models_serde.go b/pkg/daprrp/api/v20231001preview/zz_generated_models_serde.go index f072a4b9cd..6596ab881c 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_models_serde.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_models_serde.go @@ -31,16 +31,16 @@ func (a *AzureContainerInstanceCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &a.Identity) + err = unpopulate(val, "Identity", &a.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) + err = unpopulate(val, "ResourceID", &a.ResourceID) delete(rawMsg, key) } if err != nil { @@ -71,19 +71,19 @@ func (a *AzureResourceManagerCommonTypesTrackedResourceUpdate) UnmarshalJSON(dat var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -121,40 +121,40 @@ func (d *DaprConfigurationStoreProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &d.Application) + err = unpopulate(val, "Application", &d.Application) delete(rawMsg, key) case "auth": - err = unpopulate(val, "Auth", &d.Auth) + err = unpopulate(val, "Auth", &d.Auth) delete(rawMsg, key) case "componentName": - err = unpopulate(val, "ComponentName", &d.ComponentName) + err = unpopulate(val, "ComponentName", &d.ComponentName) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &d.Environment) + err = unpopulate(val, "Environment", &d.Environment) delete(rawMsg, key) case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) + err = unpopulate(val, "Metadata", &d.Metadata) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &d.Recipe) + err = unpopulate(val, "Recipe", &d.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &d.Resources) + err = unpopulate(val, "Resources", &d.Resources) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &d.Status) + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &d.Version) + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -187,25 +187,25 @@ func (d *DaprConfigurationStoreResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &d.Location) + err = unpopulate(val, "Location", &d.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &d.Properties) + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -233,10 +233,10 @@ func (d *DaprConfigurationStoreResourceListResult) UnmarshalJSON(data []byte) er var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &d.Value) + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -267,19 +267,19 @@ func (d *DaprConfigurationStoreResourceUpdate) UnmarshalJSON(data []byte) error var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -317,40 +317,40 @@ func (d *DaprPubSubBrokerProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &d.Application) + err = unpopulate(val, "Application", &d.Application) delete(rawMsg, key) case "auth": - err = unpopulate(val, "Auth", &d.Auth) + err = unpopulate(val, "Auth", &d.Auth) delete(rawMsg, key) case "componentName": - err = unpopulate(val, "ComponentName", &d.ComponentName) + err = unpopulate(val, "ComponentName", &d.ComponentName) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &d.Environment) + err = unpopulate(val, "Environment", &d.Environment) delete(rawMsg, key) case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) + err = unpopulate(val, "Metadata", &d.Metadata) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &d.Recipe) + err = unpopulate(val, "Recipe", &d.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &d.Resources) + err = unpopulate(val, "Resources", &d.Resources) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &d.Status) + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &d.Version) + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -383,25 +383,25 @@ func (d *DaprPubSubBrokerResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &d.Location) + err = unpopulate(val, "Location", &d.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &d.Properties) + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -429,10 +429,10 @@ func (d *DaprPubSubBrokerResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &d.Value) + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -463,19 +463,19 @@ func (d *DaprPubSubBrokerResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -502,7 +502,7 @@ func (d *DaprResourceAuth) UnmarshalJSON(data []byte) error { var err error switch key { case "secretStore": - err = unpopulate(val, "SecretStore", &d.SecretStore) + err = unpopulate(val, "SecretStore", &d.SecretStore) delete(rawMsg, key) } if err != nil { @@ -538,34 +538,34 @@ func (d *DaprSecretStoreProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &d.Application) + err = unpopulate(val, "Application", &d.Application) delete(rawMsg, key) case "componentName": - err = unpopulate(val, "ComponentName", &d.ComponentName) + err = unpopulate(val, "ComponentName", &d.ComponentName) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &d.Environment) + err = unpopulate(val, "Environment", &d.Environment) delete(rawMsg, key) case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) + err = unpopulate(val, "Metadata", &d.Metadata) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &d.Recipe) + err = unpopulate(val, "Recipe", &d.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &d.Status) + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &d.Version) + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -598,25 +598,25 @@ func (d *DaprSecretStoreResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &d.Location) + err = unpopulate(val, "Location", &d.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &d.Properties) + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -644,10 +644,10 @@ func (d *DaprSecretStoreResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &d.Value) + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -678,19 +678,19 @@ func (d *DaprSecretStoreResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -728,40 +728,40 @@ func (d *DaprStateStoreProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &d.Application) + err = unpopulate(val, "Application", &d.Application) delete(rawMsg, key) case "auth": - err = unpopulate(val, "Auth", &d.Auth) + err = unpopulate(val, "Auth", &d.Auth) delete(rawMsg, key) case "componentName": - err = unpopulate(val, "ComponentName", &d.ComponentName) + err = unpopulate(val, "ComponentName", &d.ComponentName) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &d.Environment) + err = unpopulate(val, "Environment", &d.Environment) delete(rawMsg, key) case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) + err = unpopulate(val, "Metadata", &d.Metadata) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &d.Recipe) + err = unpopulate(val, "Recipe", &d.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &d.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &d.Resources) + err = unpopulate(val, "Resources", &d.Resources) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &d.Status) + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &d.Version) + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -794,25 +794,25 @@ func (d *DaprStateStoreResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &d.Location) + err = unpopulate(val, "Location", &d.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &d.Properties) + err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -840,10 +840,10 @@ func (d *DaprStateStoreResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &d.Value) + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -874,19 +874,19 @@ func (d *DaprStateStoreResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &d.ID) + err = unpopulate(val, "ID", &d.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &d.Name) + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) + err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &d.Tags) + err = unpopulate(val, "Tags", &d.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &d.Type) + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -915,13 +915,13 @@ func (e *EnvironmentCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &e.Identity) + err = unpopulate(val, "Identity", &e.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) + err = unpopulate(val, "ResourceID", &e.ResourceID) delete(rawMsg, key) } if err != nil { @@ -949,10 +949,10 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) + err = unpopulate(val, "Info", &e.Info) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -983,19 +983,19 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &e.Details) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &e.Target) delete(rawMsg, key) } if err != nil { @@ -1022,7 +1022,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -1052,16 +1052,16 @@ func (i *IdentitySettings) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "managedIdentity": - err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) + err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) delete(rawMsg, key) case "oidcIssuer": - err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) + err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &i.Resource) + err = unpopulate(val, "Resource", &i.Resource) delete(rawMsg, key) } if err != nil { @@ -1091,16 +1091,16 @@ func (k *KubernetesCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &k.Identity) + err = unpopulate(val, "Identity", &k.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + err = unpopulate(val, "Namespace", &k.Namespace) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) + err = unpopulate(val, "ResourceID", &k.ResourceID) delete(rawMsg, key) } if err != nil { @@ -1128,10 +1128,10 @@ func (m *MetadataValue) UnmarshalJSON(data []byte) error { var err error switch key { case "secretKeyRef": - err = unpopulate(val, "SecretKeyRef", &m.SecretKeyRef) + err = unpopulate(val, "SecretKeyRef", &m.SecretKeyRef) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &m.Value) + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -1159,10 +1159,10 @@ func (m *MetadataValueFromSecret) UnmarshalJSON(data []byte) error { var err error switch key { case "key": - err = unpopulate(val, "Key", &m.Key) + err = unpopulate(val, "Key", &m.Key) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &m.Name) + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) } if err != nil { @@ -1192,16 +1192,16 @@ func (n *NonRedundantDaprResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "componentName": - err = unpopulate(val, "ComponentName", &n.ComponentName) + err = unpopulate(val, "ComponentName", &n.ComponentName) delete(rawMsg, key) case "metadata": - err = unpopulate(val, "Metadata", &n.Metadata) + err = unpopulate(val, "Metadata", &n.Metadata) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &n.Type) + err = unpopulate(val, "Type", &n.Type) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &n.Version) + err = unpopulate(val, "Version", &n.Version) delete(rawMsg, key) } if err != nil { @@ -1232,19 +1232,19 @@ func (o *Operation) UnmarshalJSON(data []byte) error { var err error switch key { case "actionType": - err = unpopulate(val, "ActionType", &o.ActionType) + err = unpopulate(val, "ActionType", &o.ActionType) delete(rawMsg, key) case "display": - err = unpopulate(val, "Display", &o.Display) + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) + err = unpopulate(val, "IsDataAction", &o.IsDataAction) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "origin": - err = unpopulate(val, "Origin", &o.Origin) + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { @@ -1274,16 +1274,16 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { var err error switch key { case "description": - err = unpopulate(val, "Description", &o.Description) + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) case "operation": - err = unpopulate(val, "Operation", &o.Operation) + err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) case "provider": - err = unpopulate(val, "Provider", &o.Provider) + err = unpopulate(val, "Provider", &o.Provider) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &o.Resource) + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { @@ -1311,10 +1311,10 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &o.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { @@ -1343,13 +1343,13 @@ func (o *OutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &o.ID) + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) case "localId": - err = unpopulate(val, "LocalID", &o.LocalID) + err = unpopulate(val, "LocalID", &o.LocalID) delete(rawMsg, key) case "radiusManaged": - err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) + err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) delete(rawMsg, key) } if err != nil { @@ -1377,10 +1377,10 @@ func (r *Recipe) UnmarshalJSON(data []byte) error { var err error switch key { case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) } if err != nil { @@ -1409,13 +1409,13 @@ func (r *RecipeStatus) UnmarshalJSON(data []byte) error { var err error switch key { case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -1445,16 +1445,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1481,7 +1481,7 @@ func (r *ResourceReference) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) } if err != nil { @@ -1513,10 +1513,10 @@ func (r *ResourceStatus) UnmarshalJSON(data []byte) error { r.Compute, err = unmarshalEnvironmentComputeClassification(val) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &r.OutputResources) + err = unpopulate(val, "OutputResources", &r.OutputResources) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) } if err != nil { @@ -1548,22 +1548,22 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { @@ -1595,22 +1595,22 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) + err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) + err = unpopulate(val, "SystemData", &t.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -1639,4 +1639,3 @@ func unpopulate(data json.RawMessage, fn string, v any) error { } return nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_operations_client.go b/pkg/daprrp/api/v20231001preview/zz_generated_operations_client.go index 2c28ffe4e4..2471da3970 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_operations_client.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_operations_client.go @@ -28,7 +28,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return nil, err } client := &OperationsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -37,7 +37,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // // Generated from API version 2023-10-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) (*runtime.Pager[OperationsClientListResponse]) { +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -54,7 +54,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return OperationsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -81,4 +81,3 @@ func (client *OperationsClient) listHandleResponse(resp *http.Response) (Operati } return result, nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_options.go b/pkg/daprrp/api/v20231001preview/zz_generated_options.go index 768444955c..fe8fad8084 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_options.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_options.go @@ -7,21 +7,21 @@ package v20231001preview // ConfigurationStoresClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationStoresClient.BeginCreateOrUpdate // method. type ConfigurationStoresClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ConfigurationStoresClientBeginDeleteOptions contains the optional parameters for the ConfigurationStoresClient.BeginDelete // method. type ConfigurationStoresClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ConfigurationStoresClientBeginUpdateOptions contains the optional parameters for the ConfigurationStoresClient.BeginUpdate // method. type ConfigurationStoresClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -44,19 +44,19 @@ type OperationsClientListOptions struct { // PubSubBrokersClientBeginCreateOrUpdateOptions contains the optional parameters for the PubSubBrokersClient.BeginCreateOrUpdate // method. type PubSubBrokersClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // PubSubBrokersClientBeginDeleteOptions contains the optional parameters for the PubSubBrokersClient.BeginDelete method. type PubSubBrokersClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // PubSubBrokersClientBeginUpdateOptions contains the optional parameters for the PubSubBrokersClient.BeginUpdate method. type PubSubBrokersClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -74,19 +74,19 @@ type PubSubBrokersClientListByScopeOptions struct { // SecretStoresClientBeginCreateOrUpdateOptions contains the optional parameters for the SecretStoresClient.BeginCreateOrUpdate // method. type SecretStoresClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // SecretStoresClientBeginDeleteOptions contains the optional parameters for the SecretStoresClient.BeginDelete method. type SecretStoresClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // SecretStoresClientBeginUpdateOptions contains the optional parameters for the SecretStoresClient.BeginUpdate method. type SecretStoresClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -103,19 +103,19 @@ type SecretStoresClientListByScopeOptions struct { // StateStoresClientBeginCreateOrUpdateOptions contains the optional parameters for the StateStoresClient.BeginCreateOrUpdate // method. type StateStoresClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // StateStoresClientBeginDeleteOptions contains the optional parameters for the StateStoresClient.BeginDelete method. type StateStoresClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // StateStoresClientBeginUpdateOptions contains the optional parameters for the StateStoresClient.BeginUpdate method. type StateStoresClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -128,4 +128,3 @@ type StateStoresClientGetOptions struct { type StateStoresClientListByScopeOptions struct { // placeholder for future optional parameters } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_polymorphic_helpers.go b/pkg/daprrp/api/v20231001preview/zz_generated_polymorphic_helpers.go index 63d92e887a..1ad145b26f 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_polymorphic_helpers.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_polymorphic_helpers.go @@ -28,4 +28,3 @@ func unmarshalEnvironmentComputeClassification(rawMsg json.RawMessage) (Environm } return b, nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_pubsubbrokers_client.go b/pkg/daprrp/api/v20231001preview/zz_generated_pubsubbrokers_client.go index 54aef4044b..c647da28c7 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_pubsubbrokers_client.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_pubsubbrokers_client.go @@ -19,7 +19,7 @@ import ( // PubSubBrokersClient contains the methods for the PubSubBrokers group. // Don't use this type directly, use NewPubSubBrokersClient() instead. type PubSubBrokersClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewPubSubBrokersClient(rootScope string, credential azcore.TokenCredential, } client := &PubSubBrokersClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *PubSubBrokersClient) BeginCreateOrUpdate(ctx context.Context, pubS } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PubSubBrokersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *PubSubBrokersClient) createOrUpdateCreateRequest(ctx context.Conte req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a DaprPubSubBrokerResource @@ -127,7 +127,7 @@ func (client *PubSubBrokersClient) BeginDelete(ctx context.Context, pubSubBroker } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PubSubBrokersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -238,7 +238,7 @@ func (client *PubSubBrokersClient) getHandleResponse(resp *http.Response) (PubSu // Generated from API version 2023-10-01-preview // - options - PubSubBrokersClientListByScopeOptions contains the optional parameters for the PubSubBrokersClient.NewListByScopePager // method. -func (client *PubSubBrokersClient) NewListByScopePager(options *PubSubBrokersClientListByScopeOptions) (*runtime.Pager[PubSubBrokersClientListByScopeResponse]) { +func (client *PubSubBrokersClient) NewListByScopePager(options *PubSubBrokersClientListByScopeOptions) *runtime.Pager[PubSubBrokersClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[PubSubBrokersClientListByScopeResponse]{ More: func(page PubSubBrokersClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -255,7 +255,7 @@ func (client *PubSubBrokersClient) NewListByScopePager(options *PubSubBrokersCli return PubSubBrokersClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -300,7 +300,7 @@ func (client *PubSubBrokersClient) BeginUpdate(ctx context.Context, pubSubBroker } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PubSubBrokersClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -350,8 +350,7 @@ func (client *PubSubBrokersClient) updateCreateRequest(ctx context.Context, pubS req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_responses.go b/pkg/daprrp/api/v20231001preview/zz_generated_responses.go index f005a866ca..16be1553e4 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_responses.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_responses.go @@ -6,7 +6,7 @@ package v20231001preview // ConfigurationStoresClientCreateOrUpdateResponse contains the response from method ConfigurationStoresClient.BeginCreateOrUpdate. type ConfigurationStoresClientCreateOrUpdateResponse struct { -// Dapr configuration store portable resource + // Dapr configuration store portable resource DaprConfigurationStoreResource } @@ -17,31 +17,31 @@ type ConfigurationStoresClientDeleteResponse struct { // ConfigurationStoresClientGetResponse contains the response from method ConfigurationStoresClient.Get. type ConfigurationStoresClientGetResponse struct { -// Dapr configuration store portable resource + // Dapr configuration store portable resource DaprConfigurationStoreResource } // ConfigurationStoresClientListByScopeResponse contains the response from method ConfigurationStoresClient.NewListByScopePager. type ConfigurationStoresClientListByScopeResponse struct { -// The response of a DaprConfigurationStoreResource list operation. + // The response of a DaprConfigurationStoreResource list operation. DaprConfigurationStoreResourceListResult } // ConfigurationStoresClientUpdateResponse contains the response from method ConfigurationStoresClient.BeginUpdate. type ConfigurationStoresClientUpdateResponse struct { -// Dapr configuration store portable resource + // Dapr configuration store portable resource DaprConfigurationStoreResource } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { -// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult } // PubSubBrokersClientCreateOrUpdateResponse contains the response from method PubSubBrokersClient.BeginCreateOrUpdate. type PubSubBrokersClientCreateOrUpdateResponse struct { -// Dapr PubSubBroker portable resource + // Dapr PubSubBroker portable resource DaprPubSubBrokerResource } @@ -52,25 +52,25 @@ type PubSubBrokersClientDeleteResponse struct { // PubSubBrokersClientGetResponse contains the response from method PubSubBrokersClient.Get. type PubSubBrokersClientGetResponse struct { -// Dapr PubSubBroker portable resource + // Dapr PubSubBroker portable resource DaprPubSubBrokerResource } // PubSubBrokersClientListByScopeResponse contains the response from method PubSubBrokersClient.NewListByScopePager. type PubSubBrokersClientListByScopeResponse struct { -// The response of a DaprPubSubBrokerResource list operation. + // The response of a DaprPubSubBrokerResource list operation. DaprPubSubBrokerResourceListResult } // PubSubBrokersClientUpdateResponse contains the response from method PubSubBrokersClient.BeginUpdate. type PubSubBrokersClientUpdateResponse struct { -// Dapr PubSubBroker portable resource + // Dapr PubSubBroker portable resource DaprPubSubBrokerResource } // SecretStoresClientCreateOrUpdateResponse contains the response from method SecretStoresClient.BeginCreateOrUpdate. type SecretStoresClientCreateOrUpdateResponse struct { -// Dapr SecretStore portable resource + // Dapr SecretStore portable resource DaprSecretStoreResource } @@ -81,25 +81,25 @@ type SecretStoresClientDeleteResponse struct { // SecretStoresClientGetResponse contains the response from method SecretStoresClient.Get. type SecretStoresClientGetResponse struct { -// Dapr SecretStore portable resource + // Dapr SecretStore portable resource DaprSecretStoreResource } // SecretStoresClientListByScopeResponse contains the response from method SecretStoresClient.NewListByScopePager. type SecretStoresClientListByScopeResponse struct { -// The response of a DaprSecretStoreResource list operation. + // The response of a DaprSecretStoreResource list operation. DaprSecretStoreResourceListResult } // SecretStoresClientUpdateResponse contains the response from method SecretStoresClient.BeginUpdate. type SecretStoresClientUpdateResponse struct { -// Dapr SecretStore portable resource + // Dapr SecretStore portable resource DaprSecretStoreResource } // StateStoresClientCreateOrUpdateResponse contains the response from method StateStoresClient.BeginCreateOrUpdate. type StateStoresClientCreateOrUpdateResponse struct { -// Dapr StateStore portable resource + // Dapr StateStore portable resource DaprStateStoreResource } @@ -110,19 +110,18 @@ type StateStoresClientDeleteResponse struct { // StateStoresClientGetResponse contains the response from method StateStoresClient.Get. type StateStoresClientGetResponse struct { -// Dapr StateStore portable resource + // Dapr StateStore portable resource DaprStateStoreResource } // StateStoresClientListByScopeResponse contains the response from method StateStoresClient.NewListByScopePager. type StateStoresClientListByScopeResponse struct { -// The response of a DaprStateStoreResource list operation. + // The response of a DaprStateStoreResource list operation. DaprStateStoreResourceListResult } // StateStoresClientUpdateResponse contains the response from method StateStoresClient.BeginUpdate. type StateStoresClientUpdateResponse struct { -// Dapr StateStore portable resource + // Dapr StateStore portable resource DaprStateStoreResource } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_secretstores_client.go b/pkg/daprrp/api/v20231001preview/zz_generated_secretstores_client.go index 982f029144..2b735e605c 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_secretstores_client.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_secretstores_client.go @@ -19,7 +19,7 @@ import ( // SecretStoresClient contains the methods for the SecretStores group. // Don't use this type directly, use NewSecretStoresClient() instead. type SecretStoresClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewSecretStoresClient(rootScope string, credential azcore.TokenCredential, } client := &SecretStoresClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *SecretStoresClient) BeginCreateOrUpdate(ctx context.Context, secre } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretStoresClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *SecretStoresClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a DaprSecretStoreResource @@ -127,7 +127,7 @@ func (client *SecretStoresClient) BeginDelete(ctx context.Context, secretStoreNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretStoresClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -238,7 +238,7 @@ func (client *SecretStoresClient) getHandleResponse(resp *http.Response) (Secret // Generated from API version 2023-10-01-preview // - options - SecretStoresClientListByScopeOptions contains the optional parameters for the SecretStoresClient.NewListByScopePager // method. -func (client *SecretStoresClient) NewListByScopePager(options *SecretStoresClientListByScopeOptions) (*runtime.Pager[SecretStoresClientListByScopeResponse]) { +func (client *SecretStoresClient) NewListByScopePager(options *SecretStoresClientListByScopeOptions) *runtime.Pager[SecretStoresClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[SecretStoresClientListByScopeResponse]{ More: func(page SecretStoresClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -255,7 +255,7 @@ func (client *SecretStoresClient) NewListByScopePager(options *SecretStoresClien return SecretStoresClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -300,7 +300,7 @@ func (client *SecretStoresClient) BeginUpdate(ctx context.Context, secretStoreNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretStoresClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -350,8 +350,7 @@ func (client *SecretStoresClient) updateCreateRequest(ctx context.Context, secre req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_statestores_client.go b/pkg/daprrp/api/v20231001preview/zz_generated_statestores_client.go index dbe8752d01..7488cb2dd6 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_statestores_client.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_statestores_client.go @@ -19,7 +19,7 @@ import ( // StateStoresClient contains the methods for the StateStores group. // Don't use this type directly, use NewStateStoresClient() instead. type StateStoresClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewStateStoresClient(rootScope string, credential azcore.TokenCredential, o } client := &StateStoresClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *StateStoresClient) BeginCreateOrUpdate(ctx context.Context, stateS } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StateStoresClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *StateStoresClient) createOrUpdateCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a DaprStateStoreResource @@ -126,7 +126,7 @@ func (client *StateStoresClient) BeginDelete(ctx context.Context, stateStoreName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StateStoresClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -237,7 +237,7 @@ func (client *StateStoresClient) getHandleResponse(resp *http.Response) (StateSt // Generated from API version 2023-10-01-preview // - options - StateStoresClientListByScopeOptions contains the optional parameters for the StateStoresClient.NewListByScopePager // method. -func (client *StateStoresClient) NewListByScopePager(options *StateStoresClientListByScopeOptions) (*runtime.Pager[StateStoresClientListByScopeResponse]) { +func (client *StateStoresClient) NewListByScopePager(options *StateStoresClientListByScopeOptions) *runtime.Pager[StateStoresClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[StateStoresClientListByScopeResponse]{ More: func(page StateStoresClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -254,7 +254,7 @@ func (client *StateStoresClient) NewListByScopePager(options *StateStoresClientL return StateStoresClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -298,7 +298,7 @@ func (client *StateStoresClient) BeginUpdate(ctx context.Context, stateStoreName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StateStoresClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -348,8 +348,7 @@ func (client *StateStoresClient) updateCreateRequest(ctx context.Context, stateS req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_time_rfc3339.go b/pkg/daprrp/api/v20231001preview/zz_generated_time_rfc3339.go index bbe5fcce12..04527d297f 100644 --- a/pkg/daprrp/api/v20231001preview/zz_generated_time_rfc3339.go +++ b/pkg/daprrp/api/v20231001preview/zz_generated_time_rfc3339.go @@ -4,8 +4,6 @@ package v20231001preview - - import ( "encoding/json" "fmt" @@ -16,8 +14,6 @@ import ( "time" ) - - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) @@ -88,7 +84,6 @@ func (t dateTimeRFC3339) String() string { return time.Time(t).Format(time.RFC3339Nano) } - func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return diff --git a/pkg/daprrp/api/v20231001preview/zz_generated_version.go b/pkg/daprrp/api/v20231001preview/zz_generated_version.go new file mode 100644 index 0000000000..7f584b631a --- /dev/null +++ b/pkg/daprrp/api/v20231001preview/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package v20231001preview + +const ( + moduleName = "github.com/radius-project/radius/pkg/daprrp/api/v20231001preview" + moduleVersion = "v0.1.0" +) diff --git a/pkg/datastoresrp/api/README.md b/pkg/datastoresrp/api/README.md index add3b440ea..137c21b5ce 100644 --- a/pkg/datastoresrp/api/README.md +++ b/pkg/datastoresrp/api/README.md @@ -3,20 +3,25 @@ This directory includes API version specific models from open api specs. The models in this directory is used for serializing/deserializing request and response. [datamodels](../datamodel/) has the converters to convert between version specific models and datamodels. datamodels will be used for internal controller and datastorage. ## Generate new models + ### Prerequisites + 1. Install [NodeJS](https://nodejs.org/) 2. Install [AutoRest](http://aka.ms/autorest) -``` -npm install -g autorest -``` + + ```shell + npm install -g autorest@3.7.2 + ``` ### Add new api-version 1. Add api version tags and openapi file below in this README.md 2. Run autorest. -```bash -autorest README.md --tag=datastores-2023-10-01-preview -``` + + ```shell + autorest README.md --tag=datastores-2023-10-01-preview + ``` + 3. Create or modify the corresponding datamodels in [datamodel](../datamodel/) 4. Add the converter between versioned model and datamodel in [converter](../datamodel/converter/) @@ -38,15 +43,15 @@ input-file: modelerfour: treat-type-object-as-anything: false ``` + ### Common The following configuration generates track2 go models and client. ```yaml $(tag) != '' version: 3.*.* -use: "@autorest/go@4.0.0-preview.69" +use: "@autorest/go@4.0.0-preview.74" module: "github.com/radius-project/radius/pkg/datastoresrp/api/v20231001preview" -module-version: 0.0.1 file-prefix: zz_generated_ license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated." azure-arm: true @@ -61,4 +66,4 @@ These settings apply only when `--tag=datastores-2023-10-01-preview` is specifie ```yaml $(tag) == 'datastores-2023-10-01-preview' output-folder: ./v20231001preview -``` \ No newline at end of file +``` diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_client_factory.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_client_factory.go index 23f70c1eaa..ce6ff48f10 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_client_factory.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_client_factory.go @@ -13,7 +13,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { rootScope string - internal *arm.Client + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -30,7 +30,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio } return &ClientFactory{ rootScope: rootScope, - internal: internal, + internal: internal, }, nil } @@ -38,7 +38,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio func (c *ClientFactory) NewMongoDatabasesClient() *MongoDatabasesClient { return &MongoDatabasesClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -53,7 +53,7 @@ func (c *ClientFactory) NewOperationsClient() *OperationsClient { func (c *ClientFactory) NewRedisCachesClient() *RedisCachesClient { return &RedisCachesClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } @@ -61,7 +61,6 @@ func (c *ClientFactory) NewRedisCachesClient() *RedisCachesClient { func (c *ClientFactory) NewSQLDatabasesClient() *SQLDatabasesClient { return &SQLDatabasesClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_constants.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_constants.go index a1eba67919..f19385ad94 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_constants.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_constants.go @@ -4,11 +4,6 @@ package v20231001preview -const ( - moduleName = "github.com/radius-project/radius/pkg/datastoresrp/api/v20231001preview" - moduleVersion = "v0.0.1" -) - // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -18,7 +13,7 @@ const ( // PossibleActionTypeValues returns the possible values for the ActionType const type. func PossibleActionTypeValues() []ActionType { - return []ActionType{ + return []ActionType{ ActionTypeInternal, } } @@ -27,15 +22,15 @@ func PossibleActionTypeValues() []ActionType { type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, @@ -47,21 +42,21 @@ func PossibleCreatedByTypeValues() []CreatedByType { type IdentitySettingKind string const ( -// IdentitySettingKindAzureComWorkload - azure ad workload identity + // IdentitySettingKindAzureComWorkload - azure ad workload identity IdentitySettingKindAzureComWorkload IdentitySettingKind = "azure.com.workload" -// IdentitySettingKindSystemAssigned - System assigned managed identity + // IdentitySettingKindSystemAssigned - System assigned managed identity IdentitySettingKindSystemAssigned IdentitySettingKind = "systemAssigned" -// IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity + // IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity IdentitySettingKindSystemAssignedUserAssigned IdentitySettingKind = "systemAssignedUserAssigned" -// IdentitySettingKindUndefined - undefined identity + // IdentitySettingKindUndefined - undefined identity IdentitySettingKindUndefined IdentitySettingKind = "undefined" -// IdentitySettingKindUserAssigned - User assigned managed identity + // IdentitySettingKindUserAssigned - User assigned managed identity IdentitySettingKindUserAssigned IdentitySettingKind = "userAssigned" ) // PossibleIdentitySettingKindValues returns the possible values for the IdentitySettingKind const type. func PossibleIdentitySettingKindValues() []IdentitySettingKind { - return []IdentitySettingKind{ + return []IdentitySettingKind{ IdentitySettingKindAzureComWorkload, IdentitySettingKindSystemAssigned, IdentitySettingKindSystemAssignedUserAssigned, @@ -75,14 +70,14 @@ func PossibleIdentitySettingKindValues() []IdentitySettingKind { type Origin string const ( - OriginSystem Origin = "system" - OriginUser Origin = "user" + OriginSystem Origin = "system" + OriginUser Origin = "user" OriginUserSystem Origin = "user,system" ) // PossibleOriginValues returns the possible values for the Origin const type. func PossibleOriginValues() []Origin { - return []Origin{ + return []Origin{ OriginSystem, OriginUser, OriginUserSystem, @@ -93,27 +88,27 @@ func PossibleOriginValues() []Origin { type ProvisioningState string const ( -// ProvisioningStateAccepted - The resource create request has been accepted + // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" -// ProvisioningStateCanceled - The resource provisioning has been canceled + // ProvisioningStateCanceled - The resource provisioning has been canceled ProvisioningStateCanceled ProvisioningState = "Canceled" -// ProvisioningStateCreating - The resource is being created + // ProvisioningStateCreating - The resource is being created ProvisioningStateCreating ProvisioningState = "Creating" -// ProvisioningStateDeleting - The resource is being deleted + // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" -// ProvisioningStateFailed - The resource provisioning has failed + // ProvisioningStateFailed - The resource provisioning has failed ProvisioningStateFailed ProvisioningState = "Failed" -// ProvisioningStateProvisioning - The resource is being provisioned + // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" -// ProvisioningStateSucceeded - The resource has been successfully provisioned + // ProvisioningStateSucceeded - The resource has been successfully provisioned ProvisioningStateSucceeded ProvisioningState = "Succeeded" -// ProvisioningStateUpdating - The resource is being updated + // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ + return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, @@ -131,17 +126,16 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceProvisioning string const ( -// ResourceProvisioningManual - The resource lifecycle will be managed by the user + // ResourceProvisioningManual - The resource lifecycle will be managed by the user ResourceProvisioningManual ResourceProvisioning = "manual" -// ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius + // ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius ResourceProvisioningRecipe ResourceProvisioning = "recipe" ) // PossibleResourceProvisioningValues returns the possible values for the ResourceProvisioning const type. func PossibleResourceProvisioningValues() []ResourceProvisioning { - return []ResourceProvisioning{ + return []ResourceProvisioning{ ResourceProvisioningManual, ResourceProvisioningRecipe, } } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_interfaces.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_interfaces.go index 721325a717..67a9d96507 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_interfaces.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_interfaces.go @@ -12,4 +12,3 @@ type EnvironmentComputeClassification interface { // GetEnvironmentCompute returns the EnvironmentCompute content of the underlying type. GetEnvironmentCompute() *EnvironmentCompute } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_models.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_models.go index b7d53acabe..c8bd6ee399 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_models.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_models.go @@ -8,24 +8,24 @@ import "time" // AzureContainerInstanceCompute - The Azure container instance compute configuration type AzureContainerInstanceCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource group to use for the environment. + // The resource group to use for the environment. ResourceGroup *string -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type AzureContainerInstanceCompute. func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: a.Identity, - Kind: a.Kind, + Identity: a.Identity, + Kind: a.Kind, ResourceID: a.ResourceID, } } @@ -33,31 +33,31 @@ func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentComp // AzureResourceManagerCommonTypesTrackedResourceUpdate - The resource model definition for an Azure Resource Manager tracked // top level resource which has 'tags' and a 'location' type AzureResourceManagerCommonTypesTrackedResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentCompute - Represents backing compute resource type EnvironmentCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } @@ -66,564 +66,563 @@ func (e *EnvironmentCompute) GetEnvironmentCompute() *EnvironmentCompute { retur // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { -// READ-ONLY; The additional info. + // READ-ONLY; The additional info. Info map[string]any -// READ-ONLY; The additional info type. + // READ-ONLY; The additional info type. Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { -// READ-ONLY; The error additional info. + // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo -// READ-ONLY; The error code. + // READ-ONLY; The error code. Code *string -// READ-ONLY; The error details. + // READ-ONLY; The error details. Details []*ErrorDetail -// READ-ONLY; The error message. + // READ-ONLY; The error message. Message *string -// READ-ONLY; The error target. + // READ-ONLY; The error target. Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { -// The error object. + // The error object. Error *ErrorDetail } // IdentitySettings is the external identity setting. type IdentitySettings struct { -// REQUIRED; kind of identity setting + // REQUIRED; kind of identity setting Kind *IdentitySettingKind -// The list of user assigned managed identities + // The list of user assigned managed identities ManagedIdentity []*string -// The URI for your compute platform's OIDC issuer + // The URI for your compute platform's OIDC issuer OidcIssuer *string -// The resource ID of the provisioned identity + // The resource ID of the provisioned identity Resource *string } // KubernetesCompute - The Kubernetes compute configuration type KubernetesCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// REQUIRED; The namespace to use for the environment. + // REQUIRED; The namespace to use for the environment. Namespace *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type KubernetesCompute. func (k *KubernetesCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: k.Identity, - Kind: k.Kind, + Identity: k.Identity, + Kind: k.Kind, ResourceID: k.ResourceID, } } // MongoDatabaseListSecretsResult - The secret values for the given MongoDatabase resource type MongoDatabaseListSecretsResult struct { -// Connection string used to connect to the target Mongo database + // Connection string used to connect to the target Mongo database ConnectionString *string -// Password to use when connecting to the target Mongo database + // Password to use when connecting to the target Mongo database Password *string } // MongoDatabaseProperties - MongoDatabase portable resource properties type MongoDatabaseProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// Database name of the target Mongo database + // Database name of the target Mongo database Database *string -// Host name of the target Mongo database + // Host name of the target Mongo database Host *string -// Port value of the target Mongo database + // Port value of the target Mongo database Port *int32 -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// List of the resource IDs that support the MongoDB resource + // List of the resource IDs that support the MongoDB resource Resources []*ResourceReference -// Secret values provided for the resource + // Secret values provided for the resource Secrets *MongoDatabaseSecrets -// Username to use when connecting to the target Mongo database + // Username to use when connecting to the target Mongo database Username *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // MongoDatabaseResource - MongoDatabase portable resource type MongoDatabaseResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *MongoDatabaseProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // MongoDatabaseResourceListResult - The response of a MongoDatabaseResource list operation. type MongoDatabaseResourceListResult struct { -// REQUIRED; The MongoDatabaseResource items on this page + // REQUIRED; The MongoDatabaseResource items on this page Value []*MongoDatabaseResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // MongoDatabaseResourceUpdate - MongoDatabase portable resource type MongoDatabaseResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // MongoDatabaseSecrets - The secret values for the given MongoDatabase resource type MongoDatabaseSecrets struct { -// Connection string used to connect to the target Mongo database + // Connection string used to connect to the target Mongo database ConnectionString *string -// Password to use when connecting to the target Mongo database + // Password to use when connecting to the target Mongo database Password *string } // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { -// Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay -// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType -// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane -// operations. + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. IsDataAction *bool -// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", -// "Microsoft.Compute/virtualMachines/capture/action" + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" Name *string -// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default -// value is "user,system" + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" Origin *Origin } // OperationDisplay - Localized display information for this particular operation. type OperationDisplay struct { -// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string -// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual -// Machine", "Restart Virtual Machine". + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". Operation *string -// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft -// Compute". + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". Provider *string -// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job -// Schedule Collections". + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". Resource *string } // OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to // get the next set of results. type OperationListResult struct { -// READ-ONLY; URL to get the next set of operation list results (if there are any). + // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string -// READ-ONLY; List of operations supported by the resource provider + // READ-ONLY; List of operations supported by the resource provider Value []*Operation } // OutputResource - Properties of an output resource. type OutputResource struct { -// The UCP resource ID of the underlying resource. + // The UCP resource ID of the underlying resource. ID *string -// The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency -// relationship. LocalIDs do not have any particular format or meaning beyond -// being compared to determine dependency relationships. + // The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency + // relationship. LocalIDs do not have any particular format or meaning beyond + // being compared to determine dependency relationships. LocalID *string -// Determines whether Radius manages the lifecycle of the underlying resource. + // Determines whether Radius manages the lifecycle of the underlying resource. RadiusManaged *bool } // Recipe - The recipe used to automatically deploy underlying infrastructure for a portable resource type Recipe struct { -// REQUIRED; The name of the recipe within the environment to use + // REQUIRED; The name of the recipe within the environment to use Name *string -// Key/value parameters to pass into the recipe at deployment + // Key/value parameters to pass into the recipe at deployment Parameters map[string]any } // RecipeStatus - Recipe status at deployment time for a resource. type RecipeStatus struct { -// REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. + // REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. TemplateKind *string -// REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. + // REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. TemplatePath *string -// TemplateVersion is the version number of the template. + // TemplateVersion is the version number of the template. TemplateVersion *string } // RedisCacheListSecretsResult - The secret values for the given RedisCache resource type RedisCacheListSecretsResult struct { -// The connection string used to connect to the Redis cache + // The connection string used to connect to the Redis cache ConnectionString *string -// The password for this Redis cache instance + // The password for this Redis cache instance Password *string -// The URL used to connect to the Redis cache + // The URL used to connect to the Redis cache URL *string } // RedisCacheProperties - RedisCache portable resource properties type RedisCacheProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The host name of the target Redis cache + // The host name of the target Redis cache Host *string -// The port value of the target Redis cache + // The port value of the target Redis cache Port *int32 -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// List of the resource IDs that support the Redis resource + // List of the resource IDs that support the Redis resource Resources []*ResourceReference -// Secrets provided by resource + // Secrets provided by resource Secrets *RedisCacheSecrets -// Specifies whether to enable SSL connections to the Redis cache + // Specifies whether to enable SSL connections to the Redis cache TLS *bool -// The username for Redis cache + // The username for Redis cache Username *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // RedisCacheResource - RedisCache portable resource type RedisCacheResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *RedisCacheProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RedisCacheResourceListResult - The response of a RedisCacheResource list operation. type RedisCacheResourceListResult struct { -// REQUIRED; The RedisCacheResource items on this page + // REQUIRED; The RedisCacheResource items on this page Value []*RedisCacheResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // RedisCacheResourceUpdate - RedisCache portable resource type RedisCacheResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RedisCacheSecrets - The secret values for the given RedisCache resource type RedisCacheSecrets struct { -// The connection string used to connect to the Redis cache + // The connection string used to connect to the Redis cache ConnectionString *string -// The password for this Redis cache instance + // The password for this Redis cache instance Password *string -// The URL used to connect to the Redis cache + // The URL used to connect to the Redis cache URL *string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceReference - Describes a reference to an existing resource type ResourceReference struct { -// REQUIRED; Resource id of an existing resource + // REQUIRED; Resource id of an existing resource ID *string } // ResourceStatus - Status of a resource. type ResourceStatus struct { -// The compute resource associated with the resource. + // The compute resource associated with the resource. Compute EnvironmentComputeClassification -// Properties of an output resource + // Properties of an output resource OutputResources []*OutputResource -// READ-ONLY; The recipe data at the time of deployment + // READ-ONLY; The recipe data at the time of deployment Recipe *RecipeStatus } // SQLDatabaseListSecretsResult - The secret values for the given SqlDatabase resource type SQLDatabaseListSecretsResult struct { -// Connection string used to connect to the target Sql database + // Connection string used to connect to the target Sql database ConnectionString *string -// Password to use when connecting to the target Sql database + // Password to use when connecting to the target Sql database Password *string } // SQLDatabaseProperties - SqlDatabase properties type SQLDatabaseProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The name of the Sql database. + // The name of the Sql database. Database *string -// Port value of the target Sql database + // Port value of the target Sql database Port *int32 -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// List of the resource IDs that support the SqlDatabase resource + // List of the resource IDs that support the SqlDatabase resource Resources []*ResourceReference -// Secret values provided for the resource + // Secret values provided for the resource Secrets *SQLDatabaseSecrets -// The fully qualified domain name of the Sql database. + // The fully qualified domain name of the Sql database. Server *string -// Username to use when connecting to the target Sql database + // Username to use when connecting to the target Sql database Username *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // SQLDatabaseResource - SqlDatabase portable resource type SQLDatabaseResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *SQLDatabaseProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // SQLDatabaseResourceListResult - The response of a SqlDatabaseResource list operation. type SQLDatabaseResourceListResult struct { -// REQUIRED; The SqlDatabaseResource items on this page + // REQUIRED; The SqlDatabaseResource items on this page Value []*SQLDatabaseResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // SQLDatabaseResourceUpdate - SqlDatabase portable resource type SQLDatabaseResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // SQLDatabaseSecrets - The secret values for the given SqlDatabase resource type SQLDatabaseSecrets struct { -// Connection string used to connect to the target Sql database + // Connection string used to connect to the target Sql database ConnectionString *string -// Password to use when connecting to the target Sql database + // Password to use when connecting to the target Sql database Password *string } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { -// The timestamp of resource creation (UTC). + // The timestamp of resource creation (UTC). CreatedAt *time.Time -// The identity that created the resource. + // The identity that created the resource. CreatedBy *string -// The type of identity that created the resource. + // The type of identity that created the resource. CreatedByType *CreatedByType -// The timestamp of resource last modification (UTC) + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time -// The identity that last modified the resource. + // The identity that last modified the resource. LastModifiedBy *string -// The type of identity that last modified the resource. + // The type of identity that last modified the resource. LastModifiedByType *CreatedByType } // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_models_serde.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_models_serde.go index ce2ca06ce5..ab63c46231 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_models_serde.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_models_serde.go @@ -31,16 +31,16 @@ func (a *AzureContainerInstanceCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &a.Identity) + err = unpopulate(val, "Identity", &a.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) + err = unpopulate(val, "ResourceID", &a.ResourceID) delete(rawMsg, key) } if err != nil { @@ -71,19 +71,19 @@ func (a *AzureResourceManagerCommonTypesTrackedResourceUpdate) UnmarshalJSON(dat var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -112,13 +112,13 @@ func (e *EnvironmentCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &e.Identity) + err = unpopulate(val, "Identity", &e.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) + err = unpopulate(val, "ResourceID", &e.ResourceID) delete(rawMsg, key) } if err != nil { @@ -146,10 +146,10 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) + err = unpopulate(val, "Info", &e.Info) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -180,19 +180,19 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &e.Details) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &e.Target) delete(rawMsg, key) } if err != nil { @@ -219,7 +219,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -249,16 +249,16 @@ func (i *IdentitySettings) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "managedIdentity": - err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) + err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) delete(rawMsg, key) case "oidcIssuer": - err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) + err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &i.Resource) + err = unpopulate(val, "Resource", &i.Resource) delete(rawMsg, key) } if err != nil { @@ -288,16 +288,16 @@ func (k *KubernetesCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &k.Identity) + err = unpopulate(val, "Identity", &k.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + err = unpopulate(val, "Namespace", &k.Namespace) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) + err = unpopulate(val, "ResourceID", &k.ResourceID) delete(rawMsg, key) } if err != nil { @@ -325,10 +325,10 @@ func (m *MongoDatabaseListSecretsResult) UnmarshalJSON(data []byte) error { var err error switch key { case "connectionString": - err = unpopulate(val, "ConnectionString", &m.ConnectionString) + err = unpopulate(val, "ConnectionString", &m.ConnectionString) delete(rawMsg, key) case "password": - err = unpopulate(val, "Password", &m.Password) + err = unpopulate(val, "Password", &m.Password) delete(rawMsg, key) } if err != nil { @@ -366,40 +366,40 @@ func (m *MongoDatabaseProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &m.Application) + err = unpopulate(val, "Application", &m.Application) delete(rawMsg, key) case "database": - err = unpopulate(val, "Database", &m.Database) + err = unpopulate(val, "Database", &m.Database) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &m.Environment) + err = unpopulate(val, "Environment", &m.Environment) delete(rawMsg, key) case "host": - err = unpopulate(val, "Host", &m.Host) + err = unpopulate(val, "Host", &m.Host) delete(rawMsg, key) case "port": - err = unpopulate(val, "Port", &m.Port) + err = unpopulate(val, "Port", &m.Port) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &m.Recipe) + err = unpopulate(val, "Recipe", &m.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &m.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &m.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &m.Resources) + err = unpopulate(val, "Resources", &m.Resources) delete(rawMsg, key) case "secrets": - err = unpopulate(val, "Secrets", &m.Secrets) + err = unpopulate(val, "Secrets", &m.Secrets) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &m.Status) + err = unpopulate(val, "Status", &m.Status) delete(rawMsg, key) case "username": - err = unpopulate(val, "Username", &m.Username) + err = unpopulate(val, "Username", &m.Username) delete(rawMsg, key) } if err != nil { @@ -432,25 +432,25 @@ func (m *MongoDatabaseResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &m.ID) + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &m.Location) + err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &m.Name) + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &m.Properties) + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &m.Tags) + err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &m.Type) + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -478,10 +478,10 @@ func (m *MongoDatabaseResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &m.Value) + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -512,19 +512,19 @@ func (m *MongoDatabaseResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &m.ID) + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &m.Name) + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &m.Tags) + err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &m.Type) + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -552,10 +552,10 @@ func (m *MongoDatabaseSecrets) UnmarshalJSON(data []byte) error { var err error switch key { case "connectionString": - err = unpopulate(val, "ConnectionString", &m.ConnectionString) + err = unpopulate(val, "ConnectionString", &m.ConnectionString) delete(rawMsg, key) case "password": - err = unpopulate(val, "Password", &m.Password) + err = unpopulate(val, "Password", &m.Password) delete(rawMsg, key) } if err != nil { @@ -586,19 +586,19 @@ func (o *Operation) UnmarshalJSON(data []byte) error { var err error switch key { case "actionType": - err = unpopulate(val, "ActionType", &o.ActionType) + err = unpopulate(val, "ActionType", &o.ActionType) delete(rawMsg, key) case "display": - err = unpopulate(val, "Display", &o.Display) + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) + err = unpopulate(val, "IsDataAction", &o.IsDataAction) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "origin": - err = unpopulate(val, "Origin", &o.Origin) + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { @@ -628,16 +628,16 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { var err error switch key { case "description": - err = unpopulate(val, "Description", &o.Description) + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) case "operation": - err = unpopulate(val, "Operation", &o.Operation) + err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) case "provider": - err = unpopulate(val, "Provider", &o.Provider) + err = unpopulate(val, "Provider", &o.Provider) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &o.Resource) + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { @@ -665,10 +665,10 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &o.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { @@ -697,13 +697,13 @@ func (o *OutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &o.ID) + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) case "localId": - err = unpopulate(val, "LocalID", &o.LocalID) + err = unpopulate(val, "LocalID", &o.LocalID) delete(rawMsg, key) case "radiusManaged": - err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) + err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) delete(rawMsg, key) } if err != nil { @@ -731,10 +731,10 @@ func (r *Recipe) UnmarshalJSON(data []byte) error { var err error switch key { case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) } if err != nil { @@ -763,13 +763,13 @@ func (r *RecipeStatus) UnmarshalJSON(data []byte) error { var err error switch key { case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -798,13 +798,13 @@ func (r *RedisCacheListSecretsResult) UnmarshalJSON(data []byte) error { var err error switch key { case "connectionString": - err = unpopulate(val, "ConnectionString", &r.ConnectionString) + err = unpopulate(val, "ConnectionString", &r.ConnectionString) delete(rawMsg, key) case "password": - err = unpopulate(val, "Password", &r.Password) + err = unpopulate(val, "Password", &r.Password) delete(rawMsg, key) case "url": - err = unpopulate(val, "URL", &r.URL) + err = unpopulate(val, "URL", &r.URL) delete(rawMsg, key) } if err != nil { @@ -842,40 +842,40 @@ func (r *RedisCacheProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &r.Application) + err = unpopulate(val, "Application", &r.Application) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &r.Environment) + err = unpopulate(val, "Environment", &r.Environment) delete(rawMsg, key) case "host": - err = unpopulate(val, "Host", &r.Host) + err = unpopulate(val, "Host", &r.Host) delete(rawMsg, key) case "port": - err = unpopulate(val, "Port", &r.Port) + err = unpopulate(val, "Port", &r.Port) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &r.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &r.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &r.Resources) + err = unpopulate(val, "Resources", &r.Resources) delete(rawMsg, key) case "secrets": - err = unpopulate(val, "Secrets", &r.Secrets) + err = unpopulate(val, "Secrets", &r.Secrets) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &r.Status) + err = unpopulate(val, "Status", &r.Status) delete(rawMsg, key) case "tls": - err = unpopulate(val, "TLS", &r.TLS) + err = unpopulate(val, "TLS", &r.TLS) delete(rawMsg, key) case "username": - err = unpopulate(val, "Username", &r.Username) + err = unpopulate(val, "Username", &r.Username) delete(rawMsg, key) } if err != nil { @@ -908,25 +908,25 @@ func (r *RedisCacheResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &r.Location) + err = unpopulate(val, "Location", &r.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -954,10 +954,10 @@ func (r *RedisCacheResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -988,19 +988,19 @@ func (r *RedisCacheResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1029,13 +1029,13 @@ func (r *RedisCacheSecrets) UnmarshalJSON(data []byte) error { var err error switch key { case "connectionString": - err = unpopulate(val, "ConnectionString", &r.ConnectionString) + err = unpopulate(val, "ConnectionString", &r.ConnectionString) delete(rawMsg, key) case "password": - err = unpopulate(val, "Password", &r.Password) + err = unpopulate(val, "Password", &r.Password) delete(rawMsg, key) case "url": - err = unpopulate(val, "URL", &r.URL) + err = unpopulate(val, "URL", &r.URL) delete(rawMsg, key) } if err != nil { @@ -1065,16 +1065,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1101,7 +1101,7 @@ func (r *ResourceReference) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) } if err != nil { @@ -1133,10 +1133,10 @@ func (r *ResourceStatus) UnmarshalJSON(data []byte) error { r.Compute, err = unmarshalEnvironmentComputeClassification(val) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &r.OutputResources) + err = unpopulate(val, "OutputResources", &r.OutputResources) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) } if err != nil { @@ -1164,10 +1164,10 @@ func (s *SQLDatabaseListSecretsResult) UnmarshalJSON(data []byte) error { var err error switch key { case "connectionString": - err = unpopulate(val, "ConnectionString", &s.ConnectionString) + err = unpopulate(val, "ConnectionString", &s.ConnectionString) delete(rawMsg, key) case "password": - err = unpopulate(val, "Password", &s.Password) + err = unpopulate(val, "Password", &s.Password) delete(rawMsg, key) } if err != nil { @@ -1205,40 +1205,40 @@ func (s *SQLDatabaseProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &s.Application) + err = unpopulate(val, "Application", &s.Application) delete(rawMsg, key) case "database": - err = unpopulate(val, "Database", &s.Database) + err = unpopulate(val, "Database", &s.Database) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &s.Environment) + err = unpopulate(val, "Environment", &s.Environment) delete(rawMsg, key) case "port": - err = unpopulate(val, "Port", &s.Port) + err = unpopulate(val, "Port", &s.Port) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &s.Recipe) + err = unpopulate(val, "Recipe", &s.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &s.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &s.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &s.Resources) + err = unpopulate(val, "Resources", &s.Resources) delete(rawMsg, key) case "secrets": - err = unpopulate(val, "Secrets", &s.Secrets) + err = unpopulate(val, "Secrets", &s.Secrets) delete(rawMsg, key) case "server": - err = unpopulate(val, "Server", &s.Server) + err = unpopulate(val, "Server", &s.Server) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &s.Status) + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) case "username": - err = unpopulate(val, "Username", &s.Username) + err = unpopulate(val, "Username", &s.Username) delete(rawMsg, key) } if err != nil { @@ -1271,25 +1271,25 @@ func (s *SQLDatabaseResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &s.ID) + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &s.Location) + err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &s.Properties) + err = unpopulate(val, "Properties", &s.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) + err = unpopulate(val, "SystemData", &s.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &s.Tags) + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &s.Type) + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -1317,10 +1317,10 @@ func (s *SQLDatabaseResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &s.Value) + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -1351,19 +1351,19 @@ func (s *SQLDatabaseResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &s.ID) + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) + err = unpopulate(val, "SystemData", &s.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &s.Tags) + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &s.Type) + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -1391,10 +1391,10 @@ func (s *SQLDatabaseSecrets) UnmarshalJSON(data []byte) error { var err error switch key { case "connectionString": - err = unpopulate(val, "ConnectionString", &s.ConnectionString) + err = unpopulate(val, "ConnectionString", &s.ConnectionString) delete(rawMsg, key) case "password": - err = unpopulate(val, "Password", &s.Password) + err = unpopulate(val, "Password", &s.Password) delete(rawMsg, key) } if err != nil { @@ -1426,22 +1426,22 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { @@ -1473,22 +1473,22 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) + err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) + err = unpopulate(val, "SystemData", &t.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -1517,4 +1517,3 @@ func unpopulate(data json.RawMessage, fn string, v any) error { } return nil } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_mongodatabases_client.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_mongodatabases_client.go index 57e226eb28..16e395caa5 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_mongodatabases_client.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_mongodatabases_client.go @@ -19,7 +19,7 @@ import ( // MongoDatabasesClient contains the methods for the MongoDatabases group. // Don't use this type directly, use NewMongoDatabasesClient() instead. type MongoDatabasesClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewMongoDatabasesClient(rootScope string, credential azcore.TokenCredential } client := &MongoDatabasesClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *MongoDatabasesClient) BeginCreateOrUpdate(ctx context.Context, mon } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDatabasesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *MongoDatabasesClient) createOrUpdateCreateRequest(ctx context.Cont req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a MongoDatabaseResource @@ -127,7 +127,7 @@ func (client *MongoDatabasesClient) BeginDelete(ctx context.Context, mongoDataba } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDatabasesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -238,7 +238,7 @@ func (client *MongoDatabasesClient) getHandleResponse(resp *http.Response) (Mong // Generated from API version 2023-10-01-preview // - options - MongoDatabasesClientListByScopeOptions contains the optional parameters for the MongoDatabasesClient.NewListByScopePager // method. -func (client *MongoDatabasesClient) NewListByScopePager(options *MongoDatabasesClientListByScopeOptions) (*runtime.Pager[MongoDatabasesClientListByScopeResponse]) { +func (client *MongoDatabasesClient) NewListByScopePager(options *MongoDatabasesClientListByScopeOptions) *runtime.Pager[MongoDatabasesClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[MongoDatabasesClientListByScopeResponse]{ More: func(page MongoDatabasesClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -255,7 +255,7 @@ func (client *MongoDatabasesClient) NewListByScopePager(options *MongoDatabasesC return MongoDatabasesClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -329,9 +329,9 @@ func (client *MongoDatabasesClient) listSecretsCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // listSecretsHandleResponse handles the ListSecrets response. @@ -359,7 +359,7 @@ func (client *MongoDatabasesClient) BeginUpdate(ctx context.Context, mongoDataba } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoDatabasesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -409,8 +409,7 @@ func (client *MongoDatabasesClient) updateCreateRequest(ctx context.Context, mon req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_operations_client.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_operations_client.go index 9958f3b2bb..a4d7d8bc2a 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_operations_client.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_operations_client.go @@ -28,7 +28,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return nil, err } client := &OperationsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -37,7 +37,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // // Generated from API version 2023-10-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) (*runtime.Pager[OperationsClientListResponse]) { +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -54,7 +54,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return OperationsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -81,4 +81,3 @@ func (client *OperationsClient) listHandleResponse(resp *http.Response) (Operati } return result, nil } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_options.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_options.go index 5f7d72c902..f587a514b0 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_options.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_options.go @@ -7,19 +7,19 @@ package v20231001preview // MongoDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the MongoDatabasesClient.BeginCreateOrUpdate // method. type MongoDatabasesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // MongoDatabasesClientBeginDeleteOptions contains the optional parameters for the MongoDatabasesClient.BeginDelete method. type MongoDatabasesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // MongoDatabasesClientBeginUpdateOptions contains the optional parameters for the MongoDatabasesClient.BeginUpdate method. type MongoDatabasesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -47,19 +47,19 @@ type OperationsClientListOptions struct { // RedisCachesClientBeginCreateOrUpdateOptions contains the optional parameters for the RedisCachesClient.BeginCreateOrUpdate // method. type RedisCachesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // RedisCachesClientBeginDeleteOptions contains the optional parameters for the RedisCachesClient.BeginDelete method. type RedisCachesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // RedisCachesClientBeginUpdateOptions contains the optional parameters for the RedisCachesClient.BeginUpdate method. type RedisCachesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -81,19 +81,19 @@ type RedisCachesClientListSecretsOptions struct { // SQLDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLDatabasesClient.BeginCreateOrUpdate // method. type SQLDatabasesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // SQLDatabasesClientBeginDeleteOptions contains the optional parameters for the SQLDatabasesClient.BeginDelete method. type SQLDatabasesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // SQLDatabasesClientBeginUpdateOptions contains the optional parameters for the SQLDatabasesClient.BeginUpdate method. type SQLDatabasesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -111,4 +111,3 @@ type SQLDatabasesClientListByScopeOptions struct { type SQLDatabasesClientListSecretsOptions struct { // placeholder for future optional parameters } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_polymorphic_helpers.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_polymorphic_helpers.go index 63d92e887a..1ad145b26f 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_polymorphic_helpers.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_polymorphic_helpers.go @@ -28,4 +28,3 @@ func unmarshalEnvironmentComputeClassification(rawMsg json.RawMessage) (Environm } return b, nil } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_rediscaches_client.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_rediscaches_client.go index 2df08e8a12..8c09503747 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_rediscaches_client.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_rediscaches_client.go @@ -19,7 +19,7 @@ import ( // RedisCachesClient contains the methods for the RedisCaches group. // Don't use this type directly, use NewRedisCachesClient() instead. type RedisCachesClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewRedisCachesClient(rootScope string, credential azcore.TokenCredential, o } client := &RedisCachesClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *RedisCachesClient) BeginCreateOrUpdate(ctx context.Context, redisC } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RedisCachesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *RedisCachesClient) createOrUpdateCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a RedisCacheResource @@ -126,7 +126,7 @@ func (client *RedisCachesClient) BeginDelete(ctx context.Context, redisCacheName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RedisCachesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -237,7 +237,7 @@ func (client *RedisCachesClient) getHandleResponse(resp *http.Response) (RedisCa // Generated from API version 2023-10-01-preview // - options - RedisCachesClientListByScopeOptions contains the optional parameters for the RedisCachesClient.NewListByScopePager // method. -func (client *RedisCachesClient) NewListByScopePager(options *RedisCachesClientListByScopeOptions) (*runtime.Pager[RedisCachesClientListByScopeResponse]) { +func (client *RedisCachesClient) NewListByScopePager(options *RedisCachesClientListByScopeOptions) *runtime.Pager[RedisCachesClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[RedisCachesClientListByScopeResponse]{ More: func(page RedisCachesClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -254,7 +254,7 @@ func (client *RedisCachesClient) NewListByScopePager(options *RedisCachesClientL return RedisCachesClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -327,9 +327,9 @@ func (client *RedisCachesClient) listSecretsCreateRequest(ctx context.Context, r req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // listSecretsHandleResponse handles the ListSecrets response. @@ -356,7 +356,7 @@ func (client *RedisCachesClient) BeginUpdate(ctx context.Context, redisCacheName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RedisCachesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -406,8 +406,7 @@ func (client *RedisCachesClient) updateCreateRequest(ctx context.Context, redisC req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_responses.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_responses.go index 9ca03ab7ee..eeb9e0b9b4 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_responses.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_responses.go @@ -6,7 +6,7 @@ package v20231001preview // MongoDatabasesClientCreateOrUpdateResponse contains the response from method MongoDatabasesClient.BeginCreateOrUpdate. type MongoDatabasesClientCreateOrUpdateResponse struct { -// MongoDatabase portable resource + // MongoDatabase portable resource MongoDatabaseResource } @@ -17,37 +17,37 @@ type MongoDatabasesClientDeleteResponse struct { // MongoDatabasesClientGetResponse contains the response from method MongoDatabasesClient.Get. type MongoDatabasesClientGetResponse struct { -// MongoDatabase portable resource + // MongoDatabase portable resource MongoDatabaseResource } // MongoDatabasesClientListByScopeResponse contains the response from method MongoDatabasesClient.NewListByScopePager. type MongoDatabasesClientListByScopeResponse struct { -// The response of a MongoDatabaseResource list operation. + // The response of a MongoDatabaseResource list operation. MongoDatabaseResourceListResult } // MongoDatabasesClientListSecretsResponse contains the response from method MongoDatabasesClient.ListSecrets. type MongoDatabasesClientListSecretsResponse struct { -// The secret values for the given MongoDatabase resource + // The secret values for the given MongoDatabase resource MongoDatabaseListSecretsResult } // MongoDatabasesClientUpdateResponse contains the response from method MongoDatabasesClient.BeginUpdate. type MongoDatabasesClientUpdateResponse struct { -// MongoDatabase portable resource + // MongoDatabase portable resource MongoDatabaseResource } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { -// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult } // RedisCachesClientCreateOrUpdateResponse contains the response from method RedisCachesClient.BeginCreateOrUpdate. type RedisCachesClientCreateOrUpdateResponse struct { -// RedisCache portable resource + // RedisCache portable resource RedisCacheResource } @@ -58,31 +58,31 @@ type RedisCachesClientDeleteResponse struct { // RedisCachesClientGetResponse contains the response from method RedisCachesClient.Get. type RedisCachesClientGetResponse struct { -// RedisCache portable resource + // RedisCache portable resource RedisCacheResource } // RedisCachesClientListByScopeResponse contains the response from method RedisCachesClient.NewListByScopePager. type RedisCachesClientListByScopeResponse struct { -// The response of a RedisCacheResource list operation. + // The response of a RedisCacheResource list operation. RedisCacheResourceListResult } // RedisCachesClientListSecretsResponse contains the response from method RedisCachesClient.ListSecrets. type RedisCachesClientListSecretsResponse struct { -// The secret values for the given RedisCache resource + // The secret values for the given RedisCache resource RedisCacheListSecretsResult } // RedisCachesClientUpdateResponse contains the response from method RedisCachesClient.BeginUpdate. type RedisCachesClientUpdateResponse struct { -// RedisCache portable resource + // RedisCache portable resource RedisCacheResource } // SQLDatabasesClientCreateOrUpdateResponse contains the response from method SQLDatabasesClient.BeginCreateOrUpdate. type SQLDatabasesClientCreateOrUpdateResponse struct { -// SqlDatabase portable resource + // SqlDatabase portable resource SQLDatabaseResource } @@ -93,25 +93,24 @@ type SQLDatabasesClientDeleteResponse struct { // SQLDatabasesClientGetResponse contains the response from method SQLDatabasesClient.Get. type SQLDatabasesClientGetResponse struct { -// SqlDatabase portable resource + // SqlDatabase portable resource SQLDatabaseResource } // SQLDatabasesClientListByScopeResponse contains the response from method SQLDatabasesClient.NewListByScopePager. type SQLDatabasesClientListByScopeResponse struct { -// The response of a SqlDatabaseResource list operation. + // The response of a SqlDatabaseResource list operation. SQLDatabaseResourceListResult } // SQLDatabasesClientListSecretsResponse contains the response from method SQLDatabasesClient.ListSecrets. type SQLDatabasesClientListSecretsResponse struct { -// The secret values for the given SqlDatabase resource + // The secret values for the given SqlDatabase resource SQLDatabaseListSecretsResult } // SQLDatabasesClientUpdateResponse contains the response from method SQLDatabasesClient.BeginUpdate. type SQLDatabasesClientUpdateResponse struct { -// SqlDatabase portable resource + // SqlDatabase portable resource SQLDatabaseResource } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_sqldatabases_client.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_sqldatabases_client.go index f5de8d564f..a9c53e21df 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_sqldatabases_client.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_sqldatabases_client.go @@ -19,7 +19,7 @@ import ( // SQLDatabasesClient contains the methods for the SQLDatabases group. // Don't use this type directly, use NewSQLDatabasesClient() instead. type SQLDatabasesClient struct { - internal *arm.Client + internal *arm.Client rootScope string } @@ -36,7 +36,7 @@ func NewSQLDatabasesClient(rootScope string, credential azcore.TokenCredential, } client := &SQLDatabasesClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -57,7 +57,7 @@ func (client *SQLDatabasesClient) BeginCreateOrUpdate(ctx context.Context, sqlDa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLDatabasesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -107,9 +107,9 @@ func (client *SQLDatabasesClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a SqlDatabaseResource @@ -127,7 +127,7 @@ func (client *SQLDatabasesClient) BeginDelete(ctx context.Context, sqlDatabaseNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLDatabasesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -238,7 +238,7 @@ func (client *SQLDatabasesClient) getHandleResponse(resp *http.Response) (SQLDat // Generated from API version 2023-10-01-preview // - options - SQLDatabasesClientListByScopeOptions contains the optional parameters for the SQLDatabasesClient.NewListByScopePager // method. -func (client *SQLDatabasesClient) NewListByScopePager(options *SQLDatabasesClientListByScopeOptions) (*runtime.Pager[SQLDatabasesClientListByScopeResponse]) { +func (client *SQLDatabasesClient) NewListByScopePager(options *SQLDatabasesClientListByScopeOptions) *runtime.Pager[SQLDatabasesClientListByScopeResponse] { return runtime.NewPager(runtime.PagingHandler[SQLDatabasesClientListByScopeResponse]{ More: func(page SQLDatabasesClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -255,7 +255,7 @@ func (client *SQLDatabasesClient) NewListByScopePager(options *SQLDatabasesClien return SQLDatabasesClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -329,9 +329,9 @@ func (client *SQLDatabasesClient) listSecretsCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // listSecretsHandleResponse handles the ListSecrets response. @@ -359,7 +359,7 @@ func (client *SQLDatabasesClient) BeginUpdate(ctx context.Context, sqlDatabaseNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLDatabasesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -409,8 +409,7 @@ func (client *SQLDatabasesClient) updateCreateRequest(ctx context.Context, sqlDa req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_time_rfc3339.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_time_rfc3339.go index bbe5fcce12..04527d297f 100644 --- a/pkg/datastoresrp/api/v20231001preview/zz_generated_time_rfc3339.go +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_time_rfc3339.go @@ -4,8 +4,6 @@ package v20231001preview - - import ( "encoding/json" "fmt" @@ -16,8 +14,6 @@ import ( "time" ) - - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) @@ -88,7 +84,6 @@ func (t dateTimeRFC3339) String() string { return time.Time(t).Format(time.RFC3339Nano) } - func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return diff --git a/pkg/datastoresrp/api/v20231001preview/zz_generated_version.go b/pkg/datastoresrp/api/v20231001preview/zz_generated_version.go new file mode 100644 index 0000000000..4704751897 --- /dev/null +++ b/pkg/datastoresrp/api/v20231001preview/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package v20231001preview + +const ( + moduleName = "github.com/radius-project/radius/pkg/datastoresrp/api/v20231001preview" + moduleVersion = "v0.1.0" +) diff --git a/pkg/messagingrp/api/README.md b/pkg/messagingrp/api/README.md index 9477c8c8ad..fb72100a67 100644 --- a/pkg/messagingrp/api/README.md +++ b/pkg/messagingrp/api/README.md @@ -3,20 +3,25 @@ This directory includes API version specific models from open api specs. The models in this directory is used for serializing/deserializing request and response. [datamodels](../datamodel/) has the converters to convert between version specific models and datamodels. datamodels will be used for internal controller and datastorage. ## Generate new models + ### Prerequisites + 1. Install [NodeJS](https://nodejs.org/) 2. Install [AutoRest](http://aka.ms/autorest) -``` -npm install -g autorest -``` + + ```shell + npm install -g autorest@3.7.2 + ``` ### Add new api-version 1. Add api version tags and openapi file below in this README.md 2. Run autorest. -```bash -autorest README.md --tag=messaging-2023-10-01-preview -``` + + ```shell + autorest README.md --tag=messaging-2023-10-01-preview + ``` + 3. Create or modify the corresponding datamodels in [datamodel](../datamodel/) 4. Add the converter between versioned model and datamodel in [converter](../datamodel/converter/) @@ -38,15 +43,15 @@ input-file: modelerfour: treat-type-object-as-anything: false ``` + ### Common The following configuration generates track2 go models and client. ```yaml $(tag) != '' version: 3.*.* -use: "@autorest/go@4.0.0-preview.69" +use: "@autorest/go@4.0.0-preview.74" module: "github.com/radius-project/radius/pkg/messagingrp/api/v20231001preview" -module-version: 0.0.1 file-prefix: zz_generated_ license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated." azure-arm: true @@ -61,4 +66,4 @@ These settings apply only when `--tag=messaging-2023-10-01-preview` is specified ```yaml $(tag) == 'messaging-2023-10-01-preview' output-folder: ./v20231001preview -``` \ No newline at end of file +``` diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_client_factory.go b/pkg/messagingrp/api/v20231001preview/zz_generated_client_factory.go index dfd844bfcf..0a76dbe949 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_client_factory.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_client_factory.go @@ -13,7 +13,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { rootScope string - internal *arm.Client + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -30,7 +30,7 @@ func NewClientFactory(rootScope string, credential azcore.TokenCredential, optio } return &ClientFactory{ rootScope: rootScope, - internal: internal, + internal: internal, }, nil } @@ -41,11 +41,10 @@ func (c *ClientFactory) NewOperationsClient() *OperationsClient { } } -// NewRabbitMqQueuesClient creates a new instance of RabbitMqQueuesClient. -func (c *ClientFactory) NewRabbitMqQueuesClient() *RabbitMqQueuesClient { - return &RabbitMqQueuesClient{ +// NewRabbitMQQueuesClient creates a new instance of RabbitMQQueuesClient. +func (c *ClientFactory) NewRabbitMQQueuesClient() *RabbitMQQueuesClient { + return &RabbitMQQueuesClient{ rootScope: c.rootScope, - internal: c.internal, + internal: c.internal, } } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_constants.go b/pkg/messagingrp/api/v20231001preview/zz_generated_constants.go index 184c7c3912..f19385ad94 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_constants.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_constants.go @@ -4,11 +4,6 @@ package v20231001preview -const ( - moduleName = "github.com/radius-project/radius/pkg/messagingrp/api/v20231001preview" - moduleVersion = "v0.0.1" -) - // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -18,7 +13,7 @@ const ( // PossibleActionTypeValues returns the possible values for the ActionType const type. func PossibleActionTypeValues() []ActionType { - return []ActionType{ + return []ActionType{ ActionTypeInternal, } } @@ -27,15 +22,15 @@ func PossibleActionTypeValues() []ActionType { type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, @@ -47,21 +42,21 @@ func PossibleCreatedByTypeValues() []CreatedByType { type IdentitySettingKind string const ( -// IdentitySettingKindAzureComWorkload - azure ad workload identity + // IdentitySettingKindAzureComWorkload - azure ad workload identity IdentitySettingKindAzureComWorkload IdentitySettingKind = "azure.com.workload" -// IdentitySettingKindSystemAssigned - System assigned managed identity + // IdentitySettingKindSystemAssigned - System assigned managed identity IdentitySettingKindSystemAssigned IdentitySettingKind = "systemAssigned" -// IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity + // IdentitySettingKindSystemAssignedUserAssigned - System assigned and user assigned managed identity IdentitySettingKindSystemAssignedUserAssigned IdentitySettingKind = "systemAssignedUserAssigned" -// IdentitySettingKindUndefined - undefined identity + // IdentitySettingKindUndefined - undefined identity IdentitySettingKindUndefined IdentitySettingKind = "undefined" -// IdentitySettingKindUserAssigned - User assigned managed identity + // IdentitySettingKindUserAssigned - User assigned managed identity IdentitySettingKindUserAssigned IdentitySettingKind = "userAssigned" ) // PossibleIdentitySettingKindValues returns the possible values for the IdentitySettingKind const type. func PossibleIdentitySettingKindValues() []IdentitySettingKind { - return []IdentitySettingKind{ + return []IdentitySettingKind{ IdentitySettingKindAzureComWorkload, IdentitySettingKindSystemAssigned, IdentitySettingKindSystemAssignedUserAssigned, @@ -75,14 +70,14 @@ func PossibleIdentitySettingKindValues() []IdentitySettingKind { type Origin string const ( - OriginSystem Origin = "system" - OriginUser Origin = "user" + OriginSystem Origin = "system" + OriginUser Origin = "user" OriginUserSystem Origin = "user,system" ) // PossibleOriginValues returns the possible values for the Origin const type. func PossibleOriginValues() []Origin { - return []Origin{ + return []Origin{ OriginSystem, OriginUser, OriginUserSystem, @@ -93,27 +88,27 @@ func PossibleOriginValues() []Origin { type ProvisioningState string const ( -// ProvisioningStateAccepted - The resource create request has been accepted + // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" -// ProvisioningStateCanceled - The resource provisioning has been canceled + // ProvisioningStateCanceled - The resource provisioning has been canceled ProvisioningStateCanceled ProvisioningState = "Canceled" -// ProvisioningStateCreating - The resource is being created + // ProvisioningStateCreating - The resource is being created ProvisioningStateCreating ProvisioningState = "Creating" -// ProvisioningStateDeleting - The resource is being deleted + // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" -// ProvisioningStateFailed - The resource provisioning has failed + // ProvisioningStateFailed - The resource provisioning has failed ProvisioningStateFailed ProvisioningState = "Failed" -// ProvisioningStateProvisioning - The resource is being provisioned + // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" -// ProvisioningStateSucceeded - The resource has been successfully provisioned + // ProvisioningStateSucceeded - The resource has been successfully provisioned ProvisioningStateSucceeded ProvisioningState = "Succeeded" -// ProvisioningStateUpdating - The resource is being updated + // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ + return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, @@ -131,17 +126,16 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceProvisioning string const ( -// ResourceProvisioningManual - The resource lifecycle will be managed by the user + // ResourceProvisioningManual - The resource lifecycle will be managed by the user ResourceProvisioningManual ResourceProvisioning = "manual" -// ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius + // ResourceProvisioningRecipe - The resource lifecycle will be managed by Radius ResourceProvisioningRecipe ResourceProvisioning = "recipe" ) // PossibleResourceProvisioningValues returns the possible values for the ResourceProvisioning const type. func PossibleResourceProvisioningValues() []ResourceProvisioning { - return []ResourceProvisioning{ + return []ResourceProvisioning{ ResourceProvisioningManual, ResourceProvisioningRecipe, } } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_interfaces.go b/pkg/messagingrp/api/v20231001preview/zz_generated_interfaces.go index 721325a717..67a9d96507 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_interfaces.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_interfaces.go @@ -12,4 +12,3 @@ type EnvironmentComputeClassification interface { // GetEnvironmentCompute returns the EnvironmentCompute content of the underlying type. GetEnvironmentCompute() *EnvironmentCompute } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_models.go b/pkg/messagingrp/api/v20231001preview/zz_generated_models.go index ccedb70c50..d9e9af67f6 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_models.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_models.go @@ -8,24 +8,24 @@ import "time" // AzureContainerInstanceCompute - The Azure container instance compute configuration type AzureContainerInstanceCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource group to use for the environment. + // The resource group to use for the environment. ResourceGroup *string -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type AzureContainerInstanceCompute. func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: a.Identity, - Kind: a.Kind, + Identity: a.Identity, + Kind: a.Kind, ResourceID: a.ResourceID, } } @@ -33,31 +33,31 @@ func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentComp // AzureResourceManagerCommonTypesTrackedResourceUpdate - The resource model definition for an Azure Resource Manager tracked // top level resource which has 'tags' and a 'location' type AzureResourceManagerCommonTypesTrackedResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // EnvironmentCompute - Represents backing compute resource type EnvironmentCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } @@ -66,350 +66,349 @@ func (e *EnvironmentCompute) GetEnvironmentCompute() *EnvironmentCompute { retur // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { -// READ-ONLY; The additional info. + // READ-ONLY; The additional info. Info map[string]any -// READ-ONLY; The additional info type. + // READ-ONLY; The additional info type. Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { -// READ-ONLY; The error additional info. + // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo -// READ-ONLY; The error code. + // READ-ONLY; The error code. Code *string -// READ-ONLY; The error details. + // READ-ONLY; The error details. Details []*ErrorDetail -// READ-ONLY; The error message. + // READ-ONLY; The error message. Message *string -// READ-ONLY; The error target. + // READ-ONLY; The error target. Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { -// The error object. + // The error object. Error *ErrorDetail } // IdentitySettings is the external identity setting. type IdentitySettings struct { -// REQUIRED; kind of identity setting + // REQUIRED; kind of identity setting Kind *IdentitySettingKind -// The list of user assigned managed identities + // The list of user assigned managed identities ManagedIdentity []*string -// The URI for your compute platform's OIDC issuer + // The URI for your compute platform's OIDC issuer OidcIssuer *string -// The resource ID of the provisioned identity + // The resource ID of the provisioned identity Resource *string } // KubernetesCompute - The Kubernetes compute configuration type KubernetesCompute struct { -// REQUIRED; Discriminator property for EnvironmentCompute. + // REQUIRED; Discriminator property for EnvironmentCompute. Kind *string -// REQUIRED; The namespace to use for the environment. + // REQUIRED; The namespace to use for the environment. Namespace *string -// Configuration for supported external identity providers + // Configuration for supported external identity providers Identity *IdentitySettings -// The resource id of the compute resource for application environment. + // The resource id of the compute resource for application environment. ResourceID *string } // GetEnvironmentCompute implements the EnvironmentComputeClassification interface for type KubernetesCompute. func (k *KubernetesCompute) GetEnvironmentCompute() *EnvironmentCompute { return &EnvironmentCompute{ - Identity: k.Identity, - Kind: k.Kind, + Identity: k.Identity, + Kind: k.Kind, ResourceID: k.ResourceID, } } // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { -// Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay -// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType -// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane -// operations. + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. IsDataAction *bool -// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", -// "Microsoft.Compute/virtualMachines/capture/action" + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" Name *string -// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default -// value is "user,system" + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" Origin *Origin } // OperationDisplay - Localized display information for this particular operation. type OperationDisplay struct { -// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string -// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual -// Machine", "Restart Virtual Machine". + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". Operation *string -// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft -// Compute". + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". Provider *string -// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job -// Schedule Collections". + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". Resource *string } // OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to // get the next set of results. type OperationListResult struct { -// READ-ONLY; URL to get the next set of operation list results (if there are any). + // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string -// READ-ONLY; List of operations supported by the resource provider + // READ-ONLY; List of operations supported by the resource provider Value []*Operation } // OutputResource - Properties of an output resource. type OutputResource struct { -// The UCP resource ID of the underlying resource. + // The UCP resource ID of the underlying resource. ID *string -// The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency -// relationship. LocalIDs do not have any particular format or meaning beyond -// being compared to determine dependency relationships. + // The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency + // relationship. LocalIDs do not have any particular format or meaning beyond + // being compared to determine dependency relationships. LocalID *string -// Determines whether Radius manages the lifecycle of the underlying resource. + // Determines whether Radius manages the lifecycle of the underlying resource. RadiusManaged *bool } // RabbitMQListSecretsResult - The secret values for the given RabbitMQQueue resource type RabbitMQListSecretsResult struct { -// The password used to connect to the RabbitMQ instance + // The password used to connect to the RabbitMQ instance Password *string -// The connection URI of the RabbitMQ instance. Generated automatically from host, port, SSL, username, password, and vhost. -// Can be overridden with a custom value + // The connection URI of the RabbitMQ instance. Generated automatically from host, port, SSL, username, password, and vhost. + // Can be overridden with a custom value URI *string } // RabbitMQQueueProperties - RabbitMQQueue portable resource properties type RabbitMQQueueProperties struct { -// REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to + // REQUIRED; Fully qualified resource ID for the environment that the portable resource is linked to Environment *string -// Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) + // Fully qualified resource ID for the application that the portable resource is consumed by (if applicable) Application *string -// The hostname of the RabbitMQ instance + // The hostname of the RabbitMQ instance Host *string -// The port of the RabbitMQ instance. Defaults to 5672 + // The port of the RabbitMQ instance. Defaults to 5672 Port *int32 -// The name of the queue + // The name of the queue Queue *string -// The recipe used to automatically deploy underlying infrastructure for the resource + // The recipe used to automatically deploy underlying infrastructure for the resource Recipe *Recipe -// Specifies how the underlying service/resource is provisioned and managed. + // Specifies how the underlying service/resource is provisioned and managed. ResourceProvisioning *ResourceProvisioning -// List of the resource IDs that support the rabbitMQ resource + // List of the resource IDs that support the rabbitMQ resource Resources []*ResourceReference -// The secrets to connect to the RabbitMQ instance + // The secrets to connect to the RabbitMQ instance Secrets *RabbitMQSecrets -// Specifies whether to use SSL when connecting to the RabbitMQ instance + // Specifies whether to use SSL when connecting to the RabbitMQ instance TLS *bool -// The username to use when connecting to the RabbitMQ instance + // The username to use when connecting to the RabbitMQ instance Username *string -// The RabbitMQ virtual host (vHost) the client will connect to. Defaults to no vHost. + // The RabbitMQ virtual host (vHost) the client will connect to. Defaults to no vHost. VHost *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState -// READ-ONLY; Status of a resource. + // READ-ONLY; Status of a resource. Status *ResourceStatus } // RabbitMQQueueResource - RabbitMQQueue portable resource type RabbitMQQueueResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *RabbitMQQueueProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RabbitMQQueueResourceListResult - The response of a RabbitMQQueueResource list operation. type RabbitMQQueueResourceListResult struct { -// REQUIRED; The RabbitMQQueueResource items on this page + // REQUIRED; The RabbitMQQueueResource items on this page Value []*RabbitMQQueueResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // RabbitMQQueueResourceUpdate - RabbitMQQueue portable resource type RabbitMQQueueResourceUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RabbitMQSecrets - The connection secrets properties to the RabbitMQ instance type RabbitMQSecrets struct { -// The password used to connect to the RabbitMQ instance + // The password used to connect to the RabbitMQ instance Password *string -// The connection URI of the RabbitMQ instance. Generated automatically from host, port, SSL, username, password, and vhost. -// Can be overridden with a custom value + // The connection URI of the RabbitMQ instance. Generated automatically from host, port, SSL, username, password, and vhost. + // Can be overridden with a custom value URI *string } // Recipe - The recipe used to automatically deploy underlying infrastructure for a portable resource type Recipe struct { -// REQUIRED; The name of the recipe within the environment to use + // REQUIRED; The name of the recipe within the environment to use Name *string -// Key/value parameters to pass into the recipe at deployment + // Key/value parameters to pass into the recipe at deployment Parameters map[string]any } // RecipeStatus - Recipe status at deployment time for a resource. type RecipeStatus struct { -// REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. + // REQUIRED; TemplateKind is the kind of the recipe template used by the portable resource upon deployment. TemplateKind *string -// REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. + // REQUIRED; TemplatePath is the path of the recipe consumed by the portable resource upon deployment. TemplatePath *string -// TemplateVersion is the version number of the template. + // TemplateVersion is the version number of the template. TemplateVersion *string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceReference - Describes a reference to an existing resource type ResourceReference struct { -// REQUIRED; Resource id of an existing resource + // REQUIRED; Resource id of an existing resource ID *string } // ResourceStatus - Status of a resource. type ResourceStatus struct { -// The compute resource associated with the resource. + // The compute resource associated with the resource. Compute EnvironmentComputeClassification -// Properties of an output resource + // Properties of an output resource OutputResources []*OutputResource -// READ-ONLY; The recipe data at the time of deployment + // READ-ONLY; The recipe data at the time of deployment Recipe *RecipeStatus } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { -// The timestamp of resource creation (UTC). + // The timestamp of resource creation (UTC). CreatedAt *time.Time -// The identity that created the resource. + // The identity that created the resource. CreatedBy *string -// The type of identity that created the resource. + // The type of identity that created the resource. CreatedByType *CreatedByType -// The timestamp of resource last modification (UTC) + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time -// The identity that last modified the resource. + // The identity that last modified the resource. LastModifiedBy *string -// The type of identity that last modified the resource. + // The type of identity that last modified the resource. LastModifiedByType *CreatedByType } // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_models_serde.go b/pkg/messagingrp/api/v20231001preview/zz_generated_models_serde.go index cd9fbedf52..c12dbcdaae 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_models_serde.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_models_serde.go @@ -31,16 +31,16 @@ func (a *AzureContainerInstanceCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &a.Identity) + err = unpopulate(val, "Identity", &a.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) + err = unpopulate(val, "ResourceID", &a.ResourceID) delete(rawMsg, key) } if err != nil { @@ -71,19 +71,19 @@ func (a *AzureResourceManagerCommonTypesTrackedResourceUpdate) UnmarshalJSON(dat var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -112,13 +112,13 @@ func (e *EnvironmentCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &e.Identity) + err = unpopulate(val, "Identity", &e.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &e.Kind) + err = unpopulate(val, "Kind", &e.Kind) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) + err = unpopulate(val, "ResourceID", &e.ResourceID) delete(rawMsg, key) } if err != nil { @@ -146,10 +146,10 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) + err = unpopulate(val, "Info", &e.Info) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -180,19 +180,19 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &e.Details) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &e.Target) delete(rawMsg, key) } if err != nil { @@ -219,7 +219,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -249,16 +249,16 @@ func (i *IdentitySettings) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "managedIdentity": - err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) + err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) delete(rawMsg, key) case "oidcIssuer": - err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) + err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &i.Resource) + err = unpopulate(val, "Resource", &i.Resource) delete(rawMsg, key) } if err != nil { @@ -288,16 +288,16 @@ func (k *KubernetesCompute) UnmarshalJSON(data []byte) error { var err error switch key { case "identity": - err = unpopulate(val, "Identity", &k.Identity) + err = unpopulate(val, "Identity", &k.Identity) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + err = unpopulate(val, "Namespace", &k.Namespace) delete(rawMsg, key) case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) + err = unpopulate(val, "ResourceID", &k.ResourceID) delete(rawMsg, key) } if err != nil { @@ -328,19 +328,19 @@ func (o *Operation) UnmarshalJSON(data []byte) error { var err error switch key { case "actionType": - err = unpopulate(val, "ActionType", &o.ActionType) + err = unpopulate(val, "ActionType", &o.ActionType) delete(rawMsg, key) case "display": - err = unpopulate(val, "Display", &o.Display) + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) + err = unpopulate(val, "IsDataAction", &o.IsDataAction) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "origin": - err = unpopulate(val, "Origin", &o.Origin) + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { @@ -370,16 +370,16 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { var err error switch key { case "description": - err = unpopulate(val, "Description", &o.Description) + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) case "operation": - err = unpopulate(val, "Operation", &o.Operation) + err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) case "provider": - err = unpopulate(val, "Provider", &o.Provider) + err = unpopulate(val, "Provider", &o.Provider) delete(rawMsg, key) case "resource": - err = unpopulate(val, "Resource", &o.Resource) + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { @@ -407,10 +407,10 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &o.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { @@ -439,13 +439,13 @@ func (o *OutputResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &o.ID) + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) case "localId": - err = unpopulate(val, "LocalID", &o.LocalID) + err = unpopulate(val, "LocalID", &o.LocalID) delete(rawMsg, key) case "radiusManaged": - err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) + err = unpopulate(val, "RadiusManaged", &o.RadiusManaged) delete(rawMsg, key) } if err != nil { @@ -473,10 +473,10 @@ func (r *RabbitMQListSecretsResult) UnmarshalJSON(data []byte) error { var err error switch key { case "password": - err = unpopulate(val, "Password", &r.Password) + err = unpopulate(val, "Password", &r.Password) delete(rawMsg, key) case "uri": - err = unpopulate(val, "URI", &r.URI) + err = unpopulate(val, "URI", &r.URI) delete(rawMsg, key) } if err != nil { @@ -516,46 +516,46 @@ func (r *RabbitMQQueueProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "application": - err = unpopulate(val, "Application", &r.Application) + err = unpopulate(val, "Application", &r.Application) delete(rawMsg, key) case "environment": - err = unpopulate(val, "Environment", &r.Environment) + err = unpopulate(val, "Environment", &r.Environment) delete(rawMsg, key) case "host": - err = unpopulate(val, "Host", &r.Host) + err = unpopulate(val, "Host", &r.Host) delete(rawMsg, key) case "port": - err = unpopulate(val, "Port", &r.Port) + err = unpopulate(val, "Port", &r.Port) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) case "queue": - err = unpopulate(val, "Queue", &r.Queue) + err = unpopulate(val, "Queue", &r.Queue) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) case "resourceProvisioning": - err = unpopulate(val, "ResourceProvisioning", &r.ResourceProvisioning) + err = unpopulate(val, "ResourceProvisioning", &r.ResourceProvisioning) delete(rawMsg, key) case "resources": - err = unpopulate(val, "Resources", &r.Resources) + err = unpopulate(val, "Resources", &r.Resources) delete(rawMsg, key) case "secrets": - err = unpopulate(val, "Secrets", &r.Secrets) + err = unpopulate(val, "Secrets", &r.Secrets) delete(rawMsg, key) case "status": - err = unpopulate(val, "Status", &r.Status) + err = unpopulate(val, "Status", &r.Status) delete(rawMsg, key) case "tls": - err = unpopulate(val, "TLS", &r.TLS) + err = unpopulate(val, "TLS", &r.TLS) delete(rawMsg, key) case "username": - err = unpopulate(val, "Username", &r.Username) + err = unpopulate(val, "Username", &r.Username) delete(rawMsg, key) case "vHost": - err = unpopulate(val, "VHost", &r.VHost) + err = unpopulate(val, "VHost", &r.VHost) delete(rawMsg, key) } if err != nil { @@ -588,25 +588,25 @@ func (r *RabbitMQQueueResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &r.Location) + err = unpopulate(val, "Location", &r.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -634,10 +634,10 @@ func (r *RabbitMQQueueResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -668,19 +668,19 @@ func (r *RabbitMQQueueResourceUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -708,10 +708,10 @@ func (r *RabbitMQSecrets) UnmarshalJSON(data []byte) error { var err error switch key { case "password": - err = unpopulate(val, "Password", &r.Password) + err = unpopulate(val, "Password", &r.Password) delete(rawMsg, key) case "uri": - err = unpopulate(val, "URI", &r.URI) + err = unpopulate(val, "URI", &r.URI) delete(rawMsg, key) } if err != nil { @@ -739,10 +739,10 @@ func (r *Recipe) UnmarshalJSON(data []byte) error { var err error switch key { case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "parameters": - err = unpopulate(val, "Parameters", &r.Parameters) + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) } if err != nil { @@ -771,13 +771,13 @@ func (r *RecipeStatus) UnmarshalJSON(data []byte) error { var err error switch key { case "templateKind": - err = unpopulate(val, "TemplateKind", &r.TemplateKind) + err = unpopulate(val, "TemplateKind", &r.TemplateKind) delete(rawMsg, key) case "templatePath": - err = unpopulate(val, "TemplatePath", &r.TemplatePath) + err = unpopulate(val, "TemplatePath", &r.TemplatePath) delete(rawMsg, key) case "templateVersion": - err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) + err = unpopulate(val, "TemplateVersion", &r.TemplateVersion) delete(rawMsg, key) } if err != nil { @@ -807,16 +807,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -843,7 +843,7 @@ func (r *ResourceReference) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) } if err != nil { @@ -875,10 +875,10 @@ func (r *ResourceStatus) UnmarshalJSON(data []byte) error { r.Compute, err = unmarshalEnvironmentComputeClassification(val) delete(rawMsg, key) case "outputResources": - err = unpopulate(val, "OutputResources", &r.OutputResources) + err = unpopulate(val, "OutputResources", &r.OutputResources) delete(rawMsg, key) case "recipe": - err = unpopulate(val, "Recipe", &r.Recipe) + err = unpopulate(val, "Recipe", &r.Recipe) delete(rawMsg, key) } if err != nil { @@ -910,22 +910,22 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { @@ -957,22 +957,22 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) + err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) + err = unpopulate(val, "SystemData", &t.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -1001,4 +1001,3 @@ func unpopulate(data json.RawMessage, fn string, v any) error { } return nil } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_operations_client.go b/pkg/messagingrp/api/v20231001preview/zz_generated_operations_client.go index 850f410d8f..22d66c6fc0 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_operations_client.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_operations_client.go @@ -28,7 +28,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return nil, err } client := &OperationsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -37,7 +37,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // // Generated from API version 2023-10-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) (*runtime.Pager[OperationsClientListResponse]) { +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 @@ -54,7 +54,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return OperationsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -81,4 +81,3 @@ func (client *OperationsClient) listHandleResponse(resp *http.Response) (Operati } return result, nil } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_options.go b/pkg/messagingrp/api/v20231001preview/zz_generated_options.go index e5ec6f6b11..ed82e533c3 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_options.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_options.go @@ -9,38 +9,37 @@ type OperationsClientListOptions struct { // placeholder for future optional parameters } -// RabbitMqQueuesClientBeginCreateOrUpdateOptions contains the optional parameters for the RabbitMqQueuesClient.BeginCreateOrUpdate +// RabbitMQQueuesClientBeginCreateOrUpdateOptions contains the optional parameters for the RabbitMQQueuesClient.BeginCreateOrUpdate // method. -type RabbitMqQueuesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. +type RabbitMQQueuesClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. ResumeToken string } -// RabbitMqQueuesClientBeginDeleteOptions contains the optional parameters for the RabbitMqQueuesClient.BeginDelete method. -type RabbitMqQueuesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. +// RabbitMQQueuesClientBeginDeleteOptions contains the optional parameters for the RabbitMQQueuesClient.BeginDelete method. +type RabbitMQQueuesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. ResumeToken string } -// RabbitMqQueuesClientBeginUpdateOptions contains the optional parameters for the RabbitMqQueuesClient.BeginUpdate method. -type RabbitMqQueuesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. +// RabbitMQQueuesClientBeginUpdateOptions contains the optional parameters for the RabbitMQQueuesClient.BeginUpdate method. +type RabbitMQQueuesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. ResumeToken string } -// RabbitMqQueuesClientGetOptions contains the optional parameters for the RabbitMqQueuesClient.Get method. -type RabbitMqQueuesClientGetOptions struct { +// RabbitMQQueuesClientGetOptions contains the optional parameters for the RabbitMQQueuesClient.Get method. +type RabbitMQQueuesClientGetOptions struct { // placeholder for future optional parameters } -// RabbitMqQueuesClientListByScopeOptions contains the optional parameters for the RabbitMqQueuesClient.NewListByScopePager +// RabbitMQQueuesClientListByScopeOptions contains the optional parameters for the RabbitMQQueuesClient.NewListByScopePager // method. -type RabbitMqQueuesClientListByScopeOptions struct { +type RabbitMQQueuesClientListByScopeOptions struct { // placeholder for future optional parameters } -// RabbitMqQueuesClientListSecretsOptions contains the optional parameters for the RabbitMqQueuesClient.ListSecrets method. -type RabbitMqQueuesClientListSecretsOptions struct { +// RabbitMQQueuesClientListSecretsOptions contains the optional parameters for the RabbitMQQueuesClient.ListSecrets method. +type RabbitMQQueuesClientListSecretsOptions struct { // placeholder for future optional parameters } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_polymorphic_helpers.go b/pkg/messagingrp/api/v20231001preview/zz_generated_polymorphic_helpers.go index 63d92e887a..1ad145b26f 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_polymorphic_helpers.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_polymorphic_helpers.go @@ -28,4 +28,3 @@ func unmarshalEnvironmentComputeClassification(rawMsg json.RawMessage) (Environm } return b, nil } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_rabbitmqqueues_client.go b/pkg/messagingrp/api/v20231001preview/zz_generated_rabbitmqqueues_client.go index 061e7d7a6a..fe1b304a23 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_rabbitmqqueues_client.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_rabbitmqqueues_client.go @@ -16,27 +16,27 @@ import ( "strings" ) -// RabbitMqQueuesClient contains the methods for the RabbitMqQueues group. -// Don't use this type directly, use NewRabbitMqQueuesClient() instead. -type RabbitMqQueuesClient struct { - internal *arm.Client +// RabbitMQQueuesClient contains the methods for the RabbitMQQueues group. +// Don't use this type directly, use NewRabbitMQQueuesClient() instead. +type RabbitMQQueuesClient struct { + internal *arm.Client rootScope string } -// NewRabbitMqQueuesClient creates a new instance of RabbitMqQueuesClient with the specified values. +// NewRabbitMQQueuesClient creates a new instance of RabbitMQQueuesClient with the specified values. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is // /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. -func NewRabbitMqQueuesClient(rootScope string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RabbitMqQueuesClient, error) { +func NewRabbitMQQueuesClient(rootScope string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RabbitMQQueuesClient, error) { cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } - client := &RabbitMqQueuesClient{ + client := &RabbitMQQueuesClient{ rootScope: rootScope, - internal: cl, + internal: cl, } return client, nil } @@ -47,21 +47,21 @@ func NewRabbitMqQueuesClient(rootScope string, credential azcore.TokenCredential // Generated from API version 2023-10-01-preview // - rabbitMQQueueName - The name of the RabbitMQQueue portable resource resource // - resource - Resource create parameters. -// - options - RabbitMqQueuesClientBeginCreateOrUpdateOptions contains the optional parameters for the RabbitMqQueuesClient.BeginCreateOrUpdate +// - options - RabbitMQQueuesClientBeginCreateOrUpdateOptions contains the optional parameters for the RabbitMQQueuesClient.BeginCreateOrUpdate // method. -func (client *RabbitMqQueuesClient) BeginCreateOrUpdate(ctx context.Context, rabbitMQQueueName string, resource RabbitMQQueueResource, options *RabbitMqQueuesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RabbitMqQueuesClientCreateOrUpdateResponse], error) { +func (client *RabbitMQQueuesClient) BeginCreateOrUpdate(ctx context.Context, rabbitMQQueueName string, resource RabbitMQQueueResource, options *RabbitMQQueuesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RabbitMQQueuesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, rabbitMQQueueName, resource, options) if err != nil { return nil, err } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RabbitMqQueuesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RabbitMQQueuesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RabbitMqQueuesClientCreateOrUpdateResponse]{ + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RabbitMQQueuesClientCreateOrUpdateResponse]{ Tracer: client.internal.Tracer(), }) } @@ -71,9 +71,9 @@ func (client *RabbitMqQueuesClient) BeginCreateOrUpdate(ctx context.Context, rab // If the operation fails it returns an *azcore.ResponseError type. // // Generated from API version 2023-10-01-preview -func (client *RabbitMqQueuesClient) createOrUpdate(ctx context.Context, rabbitMQQueueName string, resource RabbitMQQueueResource, options *RabbitMqQueuesClientBeginCreateOrUpdateOptions) (*http.Response, error) { +func (client *RabbitMQQueuesClient) createOrUpdate(ctx context.Context, rabbitMQQueueName string, resource RabbitMQQueueResource, options *RabbitMQQueuesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error - ctx, endSpan := runtime.StartSpan(ctx, "RabbitMqQueuesClient.BeginCreateOrUpdate", client.internal.Tracer(), nil) + ctx, endSpan := runtime.StartSpan(ctx, "RabbitMQQueuesClient.BeginCreateOrUpdate", client.internal.Tracer(), nil) defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, rabbitMQQueueName, resource, options) if err != nil { @@ -91,7 +91,7 @@ func (client *RabbitMqQueuesClient) createOrUpdate(ctx context.Context, rabbitMQ } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RabbitMqQueuesClient) createOrUpdateCreateRequest(ctx context.Context, rabbitMQQueueName string, resource RabbitMQQueueResource, _ *RabbitMqQueuesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *RabbitMQQueuesClient) createOrUpdateCreateRequest(ctx context.Context, rabbitMQQueueName string, resource RabbitMQQueueResource, _ *RabbitMQQueuesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) if rabbitMQQueueName == "" { @@ -107,9 +107,9 @@ func (client *RabbitMqQueuesClient) createOrUpdateCreateRequest(ctx context.Cont req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a RabbitMQQueueResource @@ -117,21 +117,21 @@ func (client *RabbitMqQueuesClient) createOrUpdateCreateRequest(ctx context.Cont // // Generated from API version 2023-10-01-preview // - rabbitMQQueueName - The name of the RabbitMQQueue portable resource resource -// - options - RabbitMqQueuesClientBeginDeleteOptions contains the optional parameters for the RabbitMqQueuesClient.BeginDelete +// - options - RabbitMQQueuesClientBeginDeleteOptions contains the optional parameters for the RabbitMQQueuesClient.BeginDelete // method. -func (client *RabbitMqQueuesClient) BeginDelete(ctx context.Context, rabbitMQQueueName string, options *RabbitMqQueuesClientBeginDeleteOptions) (*runtime.Poller[RabbitMqQueuesClientDeleteResponse], error) { +func (client *RabbitMQQueuesClient) BeginDelete(ctx context.Context, rabbitMQQueueName string, options *RabbitMQQueuesClientBeginDeleteOptions) (*runtime.Poller[RabbitMQQueuesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, rabbitMQQueueName, options) if err != nil { return nil, err } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RabbitMqQueuesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RabbitMQQueuesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RabbitMqQueuesClientDeleteResponse]{ + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RabbitMQQueuesClientDeleteResponse]{ Tracer: client.internal.Tracer(), }) } @@ -141,9 +141,9 @@ func (client *RabbitMqQueuesClient) BeginDelete(ctx context.Context, rabbitMQQue // If the operation fails it returns an *azcore.ResponseError type. // // Generated from API version 2023-10-01-preview -func (client *RabbitMqQueuesClient) deleteOperation(ctx context.Context, rabbitMQQueueName string, options *RabbitMqQueuesClientBeginDeleteOptions) (*http.Response, error) { +func (client *RabbitMQQueuesClient) deleteOperation(ctx context.Context, rabbitMQQueueName string, options *RabbitMQQueuesClientBeginDeleteOptions) (*http.Response, error) { var err error - ctx, endSpan := runtime.StartSpan(ctx, "RabbitMqQueuesClient.BeginDelete", client.internal.Tracer(), nil) + ctx, endSpan := runtime.StartSpan(ctx, "RabbitMQQueuesClient.BeginDelete", client.internal.Tracer(), nil) defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, rabbitMQQueueName, options) if err != nil { @@ -161,7 +161,7 @@ func (client *RabbitMqQueuesClient) deleteOperation(ctx context.Context, rabbitM } // deleteCreateRequest creates the Delete request. -func (client *RabbitMqQueuesClient) deleteCreateRequest(ctx context.Context, rabbitMQQueueName string, _ *RabbitMqQueuesClientBeginDeleteOptions) (*policy.Request, error) { +func (client *RabbitMQQueuesClient) deleteCreateRequest(ctx context.Context, rabbitMQQueueName string, _ *RabbitMQQueuesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) if rabbitMQQueueName == "" { @@ -184,29 +184,29 @@ func (client *RabbitMqQueuesClient) deleteCreateRequest(ctx context.Context, rab // // Generated from API version 2023-10-01-preview // - rabbitMQQueueName - The name of the RabbitMQQueue portable resource resource -// - options - RabbitMqQueuesClientGetOptions contains the optional parameters for the RabbitMqQueuesClient.Get method. -func (client *RabbitMqQueuesClient) Get(ctx context.Context, rabbitMQQueueName string, options *RabbitMqQueuesClientGetOptions) (RabbitMqQueuesClientGetResponse, error) { +// - options - RabbitMQQueuesClientGetOptions contains the optional parameters for the RabbitMQQueuesClient.Get method. +func (client *RabbitMQQueuesClient) Get(ctx context.Context, rabbitMQQueueName string, options *RabbitMQQueuesClientGetOptions) (RabbitMQQueuesClientGetResponse, error) { var err error - ctx, endSpan := runtime.StartSpan(ctx, "RabbitMqQueuesClient.Get", client.internal.Tracer(), nil) + ctx, endSpan := runtime.StartSpan(ctx, "RabbitMQQueuesClient.Get", client.internal.Tracer(), nil) defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, rabbitMQQueueName, options) if err != nil { - return RabbitMqQueuesClientGetResponse{}, err + return RabbitMQQueuesClientGetResponse{}, err } httpResp, err := client.internal.Pipeline().Do(req) if err != nil { - return RabbitMqQueuesClientGetResponse{}, err + return RabbitMQQueuesClientGetResponse{}, err } if !runtime.HasStatusCode(httpResp, http.StatusOK) { err = runtime.NewResponseError(httpResp) - return RabbitMqQueuesClientGetResponse{}, err + return RabbitMQQueuesClientGetResponse{}, err } resp, err := client.getHandleResponse(httpResp) return resp, err } // getCreateRequest creates the Get request. -func (client *RabbitMqQueuesClient) getCreateRequest(ctx context.Context, rabbitMQQueueName string, _ *RabbitMqQueuesClientGetOptions) (*policy.Request, error) { +func (client *RabbitMQQueuesClient) getCreateRequest(ctx context.Context, rabbitMQQueueName string, _ *RabbitMQQueuesClientGetOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) if rabbitMQQueueName == "" { @@ -225,10 +225,10 @@ func (client *RabbitMqQueuesClient) getCreateRequest(ctx context.Context, rabbit } // getHandleResponse handles the Get response. -func (client *RabbitMqQueuesClient) getHandleResponse(resp *http.Response) (RabbitMqQueuesClientGetResponse, error) { - result := RabbitMqQueuesClientGetResponse{} +func (client *RabbitMQQueuesClient) getHandleResponse(resp *http.Response) (RabbitMQQueuesClientGetResponse, error) { + result := RabbitMQQueuesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RabbitMQQueueResource); err != nil { - return RabbitMqQueuesClientGetResponse{}, err + return RabbitMQQueuesClientGetResponse{}, err } return result, nil } @@ -236,14 +236,14 @@ func (client *RabbitMqQueuesClient) getHandleResponse(resp *http.Response) (Rabb // NewListByScopePager - List RabbitMQQueueResource resources by Scope // // Generated from API version 2023-10-01-preview -// - options - RabbitMqQueuesClientListByScopeOptions contains the optional parameters for the RabbitMqQueuesClient.NewListByScopePager +// - options - RabbitMQQueuesClientListByScopeOptions contains the optional parameters for the RabbitMQQueuesClient.NewListByScopePager // method. -func (client *RabbitMqQueuesClient) NewListByScopePager(options *RabbitMqQueuesClientListByScopeOptions) (*runtime.Pager[RabbitMqQueuesClientListByScopeResponse]) { - return runtime.NewPager(runtime.PagingHandler[RabbitMqQueuesClientListByScopeResponse]{ - More: func(page RabbitMqQueuesClientListByScopeResponse) bool { +func (client *RabbitMQQueuesClient) NewListByScopePager(options *RabbitMQQueuesClientListByScopeOptions) *runtime.Pager[RabbitMQQueuesClientListByScopeResponse] { + return runtime.NewPager(runtime.PagingHandler[RabbitMQQueuesClientListByScopeResponse]{ + More: func(page RabbitMQQueuesClientListByScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, - Fetcher: func(ctx context.Context, page *RabbitMqQueuesClientListByScopeResponse) (RabbitMqQueuesClientListByScopeResponse, error) { + Fetcher: func(ctx context.Context, page *RabbitMQQueuesClientListByScopeResponse) (RabbitMQQueuesClientListByScopeResponse, error) { nextLink := "" if page != nil { nextLink = *page.NextLink @@ -252,16 +252,16 @@ func (client *RabbitMqQueuesClient) NewListByScopePager(options *RabbitMqQueuesC return client.listByScopeCreateRequest(ctx, options) }, nil) if err != nil { - return RabbitMqQueuesClientListByScopeResponse{}, err + return RabbitMQQueuesClientListByScopeResponse{}, err } return client.listByScopeHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } // listByScopeCreateRequest creates the ListByScope request. -func (client *RabbitMqQueuesClient) listByScopeCreateRequest(ctx context.Context, _ *RabbitMqQueuesClientListByScopeOptions) (*policy.Request, error) { +func (client *RabbitMQQueuesClient) listByScopeCreateRequest(ctx context.Context, _ *RabbitMQQueuesClientListByScopeOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) @@ -276,10 +276,10 @@ func (client *RabbitMqQueuesClient) listByScopeCreateRequest(ctx context.Context } // listByScopeHandleResponse handles the ListByScope response. -func (client *RabbitMqQueuesClient) listByScopeHandleResponse(resp *http.Response) (RabbitMqQueuesClientListByScopeResponse, error) { - result := RabbitMqQueuesClientListByScopeResponse{} +func (client *RabbitMQQueuesClient) listByScopeHandleResponse(resp *http.Response) (RabbitMQQueuesClientListByScopeResponse, error) { + result := RabbitMQQueuesClientListByScopeResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RabbitMQQueueResourceListResult); err != nil { - return RabbitMqQueuesClientListByScopeResponse{}, err + return RabbitMQQueuesClientListByScopeResponse{}, err } return result, nil } @@ -290,30 +290,30 @@ func (client *RabbitMqQueuesClient) listByScopeHandleResponse(resp *http.Respons // Generated from API version 2023-10-01-preview // - rabbitMQQueueName - The name of the RabbitMQQueue portable resource resource // - body - The content of the action request -// - options - RabbitMqQueuesClientListSecretsOptions contains the optional parameters for the RabbitMqQueuesClient.ListSecrets +// - options - RabbitMQQueuesClientListSecretsOptions contains the optional parameters for the RabbitMQQueuesClient.ListSecrets // method. -func (client *RabbitMqQueuesClient) ListSecrets(ctx context.Context, rabbitMQQueueName string, body map[string]any, options *RabbitMqQueuesClientListSecretsOptions) (RabbitMqQueuesClientListSecretsResponse, error) { +func (client *RabbitMQQueuesClient) ListSecrets(ctx context.Context, rabbitMQQueueName string, body map[string]any, options *RabbitMQQueuesClientListSecretsOptions) (RabbitMQQueuesClientListSecretsResponse, error) { var err error - ctx, endSpan := runtime.StartSpan(ctx, "RabbitMqQueuesClient.ListSecrets", client.internal.Tracer(), nil) + ctx, endSpan := runtime.StartSpan(ctx, "RabbitMQQueuesClient.ListSecrets", client.internal.Tracer(), nil) defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, rabbitMQQueueName, body, options) if err != nil { - return RabbitMqQueuesClientListSecretsResponse{}, err + return RabbitMQQueuesClientListSecretsResponse{}, err } httpResp, err := client.internal.Pipeline().Do(req) if err != nil { - return RabbitMqQueuesClientListSecretsResponse{}, err + return RabbitMQQueuesClientListSecretsResponse{}, err } if !runtime.HasStatusCode(httpResp, http.StatusOK) { err = runtime.NewResponseError(httpResp) - return RabbitMqQueuesClientListSecretsResponse{}, err + return RabbitMQQueuesClientListSecretsResponse{}, err } resp, err := client.listSecretsHandleResponse(httpResp) return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *RabbitMqQueuesClient) listSecretsCreateRequest(ctx context.Context, rabbitMQQueueName string, body map[string]any, _ *RabbitMqQueuesClientListSecretsOptions) (*policy.Request, error) { +func (client *RabbitMQQueuesClient) listSecretsCreateRequest(ctx context.Context, rabbitMQQueueName string, body map[string]any, _ *RabbitMQQueuesClientListSecretsOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}/listSecrets" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) if rabbitMQQueueName == "" { @@ -329,16 +329,16 @@ func (client *RabbitMqQueuesClient) listSecretsCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // listSecretsHandleResponse handles the ListSecrets response. -func (client *RabbitMqQueuesClient) listSecretsHandleResponse(resp *http.Response) (RabbitMqQueuesClientListSecretsResponse, error) { - result := RabbitMqQueuesClientListSecretsResponse{} +func (client *RabbitMQQueuesClient) listSecretsHandleResponse(resp *http.Response) (RabbitMQQueuesClientListSecretsResponse, error) { + result := RabbitMQQueuesClientListSecretsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RabbitMQListSecretsResult); err != nil { - return RabbitMqQueuesClientListSecretsResponse{}, err + return RabbitMQQueuesClientListSecretsResponse{}, err } return result, nil } @@ -349,21 +349,21 @@ func (client *RabbitMqQueuesClient) listSecretsHandleResponse(resp *http.Respons // Generated from API version 2023-10-01-preview // - rabbitMQQueueName - The name of the RabbitMQQueue portable resource resource // - properties - The resource properties to be updated. -// - options - RabbitMqQueuesClientBeginUpdateOptions contains the optional parameters for the RabbitMqQueuesClient.BeginUpdate +// - options - RabbitMQQueuesClientBeginUpdateOptions contains the optional parameters for the RabbitMQQueuesClient.BeginUpdate // method. -func (client *RabbitMqQueuesClient) BeginUpdate(ctx context.Context, rabbitMQQueueName string, properties RabbitMQQueueResourceUpdate, options *RabbitMqQueuesClientBeginUpdateOptions) (*runtime.Poller[RabbitMqQueuesClientUpdateResponse], error) { +func (client *RabbitMQQueuesClient) BeginUpdate(ctx context.Context, rabbitMQQueueName string, properties RabbitMQQueueResourceUpdate, options *RabbitMQQueuesClientBeginUpdateOptions) (*runtime.Poller[RabbitMQQueuesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, rabbitMQQueueName, properties, options) if err != nil { return nil, err } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RabbitMqQueuesClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RabbitMQQueuesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RabbitMqQueuesClientUpdateResponse]{ + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RabbitMQQueuesClientUpdateResponse]{ Tracer: client.internal.Tracer(), }) } @@ -373,9 +373,9 @@ func (client *RabbitMqQueuesClient) BeginUpdate(ctx context.Context, rabbitMQQue // If the operation fails it returns an *azcore.ResponseError type. // // Generated from API version 2023-10-01-preview -func (client *RabbitMqQueuesClient) update(ctx context.Context, rabbitMQQueueName string, properties RabbitMQQueueResourceUpdate, options *RabbitMqQueuesClientBeginUpdateOptions) (*http.Response, error) { +func (client *RabbitMQQueuesClient) update(ctx context.Context, rabbitMQQueueName string, properties RabbitMQQueueResourceUpdate, options *RabbitMQQueuesClientBeginUpdateOptions) (*http.Response, error) { var err error - ctx, endSpan := runtime.StartSpan(ctx, "RabbitMqQueuesClient.BeginUpdate", client.internal.Tracer(), nil) + ctx, endSpan := runtime.StartSpan(ctx, "RabbitMQQueuesClient.BeginUpdate", client.internal.Tracer(), nil) defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, rabbitMQQueueName, properties, options) if err != nil { @@ -393,7 +393,7 @@ func (client *RabbitMqQueuesClient) update(ctx context.Context, rabbitMQQueueNam } // updateCreateRequest creates the Update request. -func (client *RabbitMqQueuesClient) updateCreateRequest(ctx context.Context, rabbitMQQueueName string, properties RabbitMQQueueResourceUpdate, _ *RabbitMqQueuesClientBeginUpdateOptions) (*policy.Request, error) { +func (client *RabbitMQQueuesClient) updateCreateRequest(ctx context.Context, rabbitMQQueueName string, properties RabbitMQQueueResourceUpdate, _ *RabbitMQQueuesClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}" urlPath = strings.ReplaceAll(urlPath, "{rootScope}", client.rootScope) if rabbitMQQueueName == "" { @@ -409,8 +409,7 @@ func (client *RabbitMqQueuesClient) updateCreateRequest(ctx context.Context, rab req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_responses.go b/pkg/messagingrp/api/v20231001preview/zz_generated_responses.go index d97790328b..303968bab1 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_responses.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_responses.go @@ -6,42 +6,41 @@ package v20231001preview // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { -// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult } -// RabbitMqQueuesClientCreateOrUpdateResponse contains the response from method RabbitMqQueuesClient.BeginCreateOrUpdate. -type RabbitMqQueuesClientCreateOrUpdateResponse struct { -// RabbitMQQueue portable resource +// RabbitMQQueuesClientCreateOrUpdateResponse contains the response from method RabbitMQQueuesClient.BeginCreateOrUpdate. +type RabbitMQQueuesClientCreateOrUpdateResponse struct { + // RabbitMQQueue portable resource RabbitMQQueueResource } -// RabbitMqQueuesClientDeleteResponse contains the response from method RabbitMqQueuesClient.BeginDelete. -type RabbitMqQueuesClientDeleteResponse struct { +// RabbitMQQueuesClientDeleteResponse contains the response from method RabbitMQQueuesClient.BeginDelete. +type RabbitMQQueuesClientDeleteResponse struct { // placeholder for future response values } -// RabbitMqQueuesClientGetResponse contains the response from method RabbitMqQueuesClient.Get. -type RabbitMqQueuesClientGetResponse struct { -// RabbitMQQueue portable resource +// RabbitMQQueuesClientGetResponse contains the response from method RabbitMQQueuesClient.Get. +type RabbitMQQueuesClientGetResponse struct { + // RabbitMQQueue portable resource RabbitMQQueueResource } -// RabbitMqQueuesClientListByScopeResponse contains the response from method RabbitMqQueuesClient.NewListByScopePager. -type RabbitMqQueuesClientListByScopeResponse struct { -// The response of a RabbitMQQueueResource list operation. +// RabbitMQQueuesClientListByScopeResponse contains the response from method RabbitMQQueuesClient.NewListByScopePager. +type RabbitMQQueuesClientListByScopeResponse struct { + // The response of a RabbitMQQueueResource list operation. RabbitMQQueueResourceListResult } -// RabbitMqQueuesClientListSecretsResponse contains the response from method RabbitMqQueuesClient.ListSecrets. -type RabbitMqQueuesClientListSecretsResponse struct { -// The secret values for the given RabbitMQQueue resource +// RabbitMQQueuesClientListSecretsResponse contains the response from method RabbitMQQueuesClient.ListSecrets. +type RabbitMQQueuesClientListSecretsResponse struct { + // The secret values for the given RabbitMQQueue resource RabbitMQListSecretsResult } -// RabbitMqQueuesClientUpdateResponse contains the response from method RabbitMqQueuesClient.BeginUpdate. -type RabbitMqQueuesClientUpdateResponse struct { -// RabbitMQQueue portable resource +// RabbitMQQueuesClientUpdateResponse contains the response from method RabbitMQQueuesClient.BeginUpdate. +type RabbitMQQueuesClientUpdateResponse struct { + // RabbitMQQueue portable resource RabbitMQQueueResource } - diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_time_rfc3339.go b/pkg/messagingrp/api/v20231001preview/zz_generated_time_rfc3339.go index bbe5fcce12..04527d297f 100644 --- a/pkg/messagingrp/api/v20231001preview/zz_generated_time_rfc3339.go +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_time_rfc3339.go @@ -4,8 +4,6 @@ package v20231001preview - - import ( "encoding/json" "fmt" @@ -16,8 +14,6 @@ import ( "time" ) - - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) @@ -88,7 +84,6 @@ func (t dateTimeRFC3339) String() string { return time.Time(t).Format(time.RFC3339Nano) } - func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return diff --git a/pkg/messagingrp/api/v20231001preview/zz_generated_version.go b/pkg/messagingrp/api/v20231001preview/zz_generated_version.go new file mode 100644 index 0000000000..1b3137ee34 --- /dev/null +++ b/pkg/messagingrp/api/v20231001preview/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package v20231001preview + +const ( + moduleName = "github.com/radius-project/radius/pkg/messagingrp/api/v20231001preview" + moduleVersion = "v0.1.0" +) diff --git a/pkg/recipes/configloader/environment.go b/pkg/recipes/configloader/environment.go index 646fd337f9..a4d77aab7c 100644 --- a/pkg/recipes/configloader/environment.go +++ b/pkg/recipes/configloader/environment.go @@ -20,19 +20,23 @@ import ( "context" "errors" "fmt" + "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" "github.com/radius-project/radius/pkg/corerp/datamodel" "github.com/radius-project/radius/pkg/recipes" recipes_util "github.com/radius-project/radius/pkg/recipes/util" "github.com/radius-project/radius/pkg/rp/kube" "github.com/radius-project/radius/pkg/rp/util" "github.com/radius-project/radius/pkg/ucp/resources" + "github.com/radius-project/radius/pkg/ucp/resources/radius" ) var ( ErrUnsupportedComputeKind = errors.New("unsupported compute kind in environment resource") + ErrBadEnvID = errors.New("could not parse environment ID") ) //go:generate mockgen -typed -destination=./mock_config_loader.go -package=configloader -self_package github.com/radius-project/radius/pkg/recipes/configloader github.com/radius-project/radius/pkg/recipes/configloader ConfigurationLoader @@ -53,20 +57,36 @@ type environmentLoader struct { // LoadConfiguration fetches an environment and an application (if provided) and returns a configuration based on them. It returns // an error if either the environment or the application (if provided) cannot be fetched. func (e *environmentLoader) LoadConfiguration(ctx context.Context, recipe recipes.ResourceMetadata) (*recipes.Configuration, error) { - environment, err := util.FetchEnvironment(ctx, recipe.EnvironmentID, e.ArmClientOptions) + envID, err := resources.Parse(recipe.EnvironmentID) if err != nil { - return nil, err + return nil, ErrBadEnvID } - var application *v20231001preview.ApplicationResource - if recipe.ApplicationID != "" { - application, err = util.FetchApplication(ctx, recipe.ApplicationID, e.ArmClientOptions) + var environment *v20231001preview.EnvironmentResource + if strings.EqualFold(envID.ProviderNamespace(), radius.NamespaceApplicationsCore) { + environment, err = util.FetchEnvironment(ctx, recipe.EnvironmentID, e.ArmClientOptions) if err != nil { return nil, err } + + var application *v20231001preview.ApplicationResource + if recipe.ApplicationID != "" { + application, err = util.FetchApplication(ctx, recipe.ApplicationID, e.ArmClientOptions) + if err != nil { + return nil, err + } + } + + return getConfiguration(environment, application) + } else { + envV20250801, err := util.FetchEnvironmentV20250801(ctx, recipe.EnvironmentID, e.ArmClientOptions) + if err != nil { + return nil, err + } + + return getConfigurationV20250801(envV20250801) } - return getConfiguration(environment, application) } func getConfiguration(environment *v20231001preview.EnvironmentResource, application *v20231001preview.ApplicationResource) (*recipes.Configuration, error) { @@ -96,6 +116,7 @@ func getConfiguration(environment *v20231001preview.EnvironmentResource, applica // Use environment-scoped namespace if application is not set. config.Runtime.Kubernetes.Namespace = config.Runtime.Kubernetes.EnvironmentNamespace } + case *v20231001preview.AzureContainerInstanceCompute: config.Runtime.AzureContainerInstances = &recipes.AzureContainerInstancesRuntime{} default: @@ -124,18 +145,77 @@ func getConfiguration(environment *v20231001preview.EnvironmentResource, applica return &config, nil } -// LoadRecipe fetches the recipe information from the environment. It returns an error if the environment cannot be fetched. -func (e *environmentLoader) LoadRecipe(ctx context.Context, recipe *recipes.ResourceMetadata) (*recipes.EnvironmentDefinition, error) { - environment, err := util.FetchEnvironment(ctx, recipe.EnvironmentID, e.ArmClientOptions) +func getConfigurationV20250801(environment *v20250801preview.EnvironmentResource) (*recipes.Configuration, error) { + config := recipes.Configuration{ + Runtime: recipes.RuntimeConfiguration{}, + Providers: datamodel.Providers{}, + RecipeConfig: datamodel.RecipeConfigProperties{}, + } + + config.Runtime.Kubernetes = &recipes.KubernetesRuntime{} + var err error + + env, err := environment.ConvertTo() if err != nil { return nil, err } - envDefinition, err := getRecipeDefinition(environment, recipe) + envDatamodel := env.(*datamodel.Environment_v20250801preview) + if envDatamodel.Properties.Providers != nil { + if envDatamodel.Properties.Providers.Azure != nil { + config.Providers.Azure = datamodel.ProvidersAzure{ + Scope: envDatamodel.Properties.Providers.Azure.SubscriptionId, + } + } + if envDatamodel.Properties.Providers.AWS != nil { + config.Providers.AWS = datamodel.ProvidersAWS{ + Scope: envDatamodel.Properties.Providers.AWS.Scope, + } + } + } + // Radius enables keying in of a preexisting namespace for kubernetes resources using + // properties.providers.kubernetes.namespace. However, it does not mandate configuring a + // Kubernetes provider since the recipe can have the namespace details and deploy resources successfully. + // We should converge EnvironmentNamespace and Namespace once we remove Applications.Core support, since + // We no longer have Application Namespaces. + config.Runtime.Kubernetes.EnvironmentNamespace = kube.FetchNamespaceFromEnvironmentResourceV20250801(environment) + config.Runtime.Kubernetes.Namespace = config.Runtime.Kubernetes.EnvironmentNamespace + + if envDatamodel.Properties.Simulated { + config.Simulated = true + } + + return &config, nil +} + +// LoadRecipe fetches the recipe information from the environment. It returns an error if the environment cannot be fetched. +func (e *environmentLoader) LoadRecipe(ctx context.Context, recipe *recipes.ResourceMetadata) (*recipes.EnvironmentDefinition, error) { + envID, err := resources.Parse(recipe.EnvironmentID) if err != nil { - return nil, err + return nil, ErrBadEnvID } + var envDefinition *recipes.EnvironmentDefinition + if strings.EqualFold(envID.ProviderNamespace(), radius.NamespaceApplicationsCore) { + environment, err := util.FetchEnvironment(ctx, recipe.EnvironmentID, e.ArmClientOptions) + if err != nil { + return nil, err + } + envDefinition, err = getRecipeDefinition(environment, recipe) + if err != nil { + return nil, err + } + } else { + environment, err := util.FetchEnvironmentV20250801(ctx, recipe.EnvironmentID, e.ArmClientOptions) + if err != nil { + return nil, err + } + envDefinition, err = getRecipeDefinitionFromEnvironmentV20250801(ctx, environment, recipe, e.ArmClientOptions) + if err != nil { + return nil, err + } + + } return envDefinition, err } @@ -175,3 +255,68 @@ func getRecipeDefinition(environment *v20231001preview.EnvironmentResource, reci return definition, nil } + +func getRecipeDefinitionFromEnvironmentV20250801(ctx context.Context, environment *v20250801preview.EnvironmentResource, recipe *recipes.ResourceMetadata, armOptions *arm.ClientOptions) (*recipes.EnvironmentDefinition, error) { + resource, err := resources.ParseResource(recipe.ResourceID) + if err != nil { + err := fmt.Errorf("failed to parse resourceID: %q %w", recipe.ResourceID, err) + return nil, recipes.NewRecipeError(recipes.RecipeValidationFailed, err.Error(), recipes_util.RecipeSetupError, recipes.GetErrorDetails(err)) + } + + // First try to find recipe in environment's recipe packs + env, err := environment.ConvertTo() + if err != nil { + return nil, err + } + envDatamodel := env.(*datamodel.Environment_v20250801preview) + + if envDatamodel.Properties.RecipePacks != nil { + recipePackDefinition, err := fetchRecipePacks(ctx, envDatamodel.Properties.RecipePacks, armOptions, resource.Type()) + if err != nil { + return nil, err + } + // TODO: For now, we can set it to default as recipe packs don't have named recipes. + // We will remove this field from EnvironmentDefinition once we deprecate Applications.Core. + definition := &recipes.EnvironmentDefinition{ + Name: "default", + Driver: recipePackDefinition.RecipeKind, + ResourceType: resource.Type(), + Parameters: recipePackDefinition.Parameters, + TemplatePath: recipePackDefinition.RecipeLocation, + } + return definition, nil + } + + return nil, fmt.Errorf("could not find any recipe pack for %q in environment %q", resource.Type(), recipe.EnvironmentID) +} + +// fetchRecipePacks fetches recipe pack resources from the given recipe pack IDs and returns the first recipe pack that has a recipe for the specified resource type. +func fetchRecipePacks(ctx context.Context, recipePackIDs []string, armOptions *arm.ClientOptions, resourceType string) (*recipes.RecipePackDefinition, error) { + if recipePackIDs == nil { + return nil, fmt.Errorf("no recipe packs configured") + } + + if resourceType == "" { + return nil, fmt.Errorf("resource type cannot be empty") + } + + for _, recipePackID := range recipePackIDs { + recipePackResource, err := FetchRecipePack(ctx, recipePackID, armOptions) + if err != nil { + return nil, err + } + + // Convert recipes map + for recipePackResourceType, definition := range recipePackResource.Properties.Recipes { + if strings.EqualFold(recipePackResourceType, resourceType) { + return &recipes.RecipePackDefinition{ + RecipeKind: string(*definition.RecipeKind), + RecipeLocation: string(*definition.RecipeLocation), + Parameters: definition.Parameters, + }, nil + } + } + } + + return nil, fmt.Errorf("no recipe pack found with recipe for resource type %q", resourceType) +} diff --git a/pkg/recipes/configloader/environment_test.go b/pkg/recipes/configloader/environment_test.go index 3aa04c1054..3c753e44f3 100644 --- a/pkg/recipes/configloader/environment_test.go +++ b/pkg/recipes/configloader/environment_test.go @@ -17,9 +17,12 @@ limitations under the License. package configloader import ( + "context" "testing" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" model "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + modelv20250801 "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" "github.com/radius-project/radius/pkg/corerp/datamodel" "github.com/radius-project/radius/pkg/recipes" "github.com/radius-project/radius/pkg/to" @@ -386,3 +389,169 @@ func TestGetRecipeDefinition(t *testing.T) { require.Contains(t, err.Error(), "could not find recipe") }) } + +func TestGetConfigurationV20250801(t *testing.T) { + configTests := []struct { + name string + envResource *modelv20250801.EnvironmentResource + appResource *model.ApplicationResource + expectedConfig *recipes.Configuration + errString string + }{ + { + name: "azure provider with env resource v20250801", + envResource: &modelv20250801.EnvironmentResource{ + Properties: &modelv20250801.EnvironmentProperties{ + Providers: &modelv20250801.Providers{ + Azure: &modelv20250801.ProvidersAzure{ + SubscriptionID: to.Ptr("test-subscription-id"), + }, + Kubernetes: &modelv20250801.ProvidersKubernetes{ + Namespace: to.Ptr(envNamespace), + }, + }, + Simulated: to.Ptr(false), + }, + }, + appResource: nil, + expectedConfig: &recipes.Configuration{ + Runtime: recipes.RuntimeConfiguration{ + Kubernetes: &recipes.KubernetesRuntime{ + Namespace: envNamespace, + EnvironmentNamespace: envNamespace, + }, + }, + Providers: datamodel.Providers{ + Azure: datamodel.ProvidersAzure{ + Scope: "test-subscription-id", + }, + }, + Simulated: false, + }, + }, + { + name: "aws provider with env resource v20250801", + envResource: &modelv20250801.EnvironmentResource{ + Properties: &modelv20250801.EnvironmentProperties{ + Providers: &modelv20250801.Providers{ + Aws: &modelv20250801.ProvidersAws{ + Scope: to.Ptr(awsScope), + }, + Kubernetes: &modelv20250801.ProvidersKubernetes{ + Namespace: to.Ptr(envNamespace), + }, + }, + Simulated: to.Ptr(false), + }, + }, + appResource: nil, + expectedConfig: &recipes.Configuration{ + Runtime: recipes.RuntimeConfiguration{ + Kubernetes: &recipes.KubernetesRuntime{ + Namespace: envNamespace, + EnvironmentNamespace: envNamespace, + }, + }, + Providers: datamodel.Providers{ + AWS: datamodel.ProvidersAWS{ + Scope: awsScope, + }, + }, + Simulated: false, + }, + }, + { + name: "simulated env v20250801", + envResource: &modelv20250801.EnvironmentResource{ + Properties: &modelv20250801.EnvironmentProperties{ + Providers: &modelv20250801.Providers{ + Kubernetes: &modelv20250801.ProvidersKubernetes{ + Namespace: to.Ptr(envNamespace), + }, + }, + Simulated: to.Ptr(true), + }, + }, + appResource: nil, + expectedConfig: &recipes.Configuration{ + Runtime: recipes.RuntimeConfiguration{ + Kubernetes: &recipes.KubernetesRuntime{ + Namespace: envNamespace, + EnvironmentNamespace: envNamespace, + }, + }, + Simulated: true, + }, + }, + { + name: "environment with recipe packs v20250801", + envResource: &modelv20250801.EnvironmentResource{ + Properties: &modelv20250801.EnvironmentProperties{ + Providers: &modelv20250801.Providers{ + Kubernetes: &modelv20250801.ProvidersKubernetes{ + Namespace: to.Ptr(envNamespace), + }, + }, + RecipePacks: []*string{ + to.Ptr("/planes/radius/local/providers/Radius.Core/recipePacks/kubernetes-pack"), + }, + }, + }, + appResource: nil, + expectedConfig: &recipes.Configuration{ + Runtime: recipes.RuntimeConfiguration{ + Kubernetes: &recipes.KubernetesRuntime{ + Namespace: envNamespace, + EnvironmentNamespace: envNamespace, + }, + }, + Simulated: false, + }, + }, + } + + for _, tc := range configTests { + t.Run(tc.name, func(t *testing.T) { + result, err := getConfigurationV20250801(tc.envResource) + if tc.errString != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.errString) + } else { + require.NoError(t, err) + require.Equal(t, tc.expectedConfig, result) + } + }) + } +} + +func TestGetRecipeDefinitionFromEnvironmentV20250801(t *testing.T) { + ctx := context.Background() + armOptions := &arm.ClientOptions{} + + envResource := &modelv20250801.EnvironmentResource{ + Properties: &modelv20250801.EnvironmentProperties{ + Providers: &modelv20250801.Providers{ + Kubernetes: &modelv20250801.ProvidersKubernetes{ + Namespace: to.Ptr(envNamespace), + }, + }, + RecipePacks: []*string{ + to.Ptr("/planes/radius/local/providers/Radius.Core/recipePacks/kubernetes-pack"), + }, + }, + } + + recipeMetadata := recipes.ResourceMetadata{ + Name: recipeName, + EnvironmentID: envResourceId, + ResourceID: mongoResourceID, + } + + t.Run("invalid resource id", func(t *testing.T) { + metadata := recipeMetadata + metadata.ResourceID = "invalid-id" + _, err := getRecipeDefinitionFromEnvironmentV20250801(ctx, envResource, &metadata, armOptions) + require.Error(t, err) + require.Contains(t, err.Error(), "'invalid-id' is not a valid resource id") + }) +} diff --git a/pkg/recipes/configloader/recipepacks.go b/pkg/recipes/configloader/recipepacks.go new file mode 100644 index 0000000000..d4285a2c1b --- /dev/null +++ b/pkg/recipes/configloader/recipepacks.go @@ -0,0 +1,69 @@ +/* +Copyright 2023 The Radius Authors. + +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 configloader + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + aztoken "github.com/radius-project/radius/pkg/azure/tokencredentials" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" + resources "github.com/radius-project/radius/pkg/ucp/resources" +) + +// FetchRecipePack fetches a recipe pack resource using the provided recipePackID and ClientOptions, +// and returns the RecipePackResource or an error. +func FetchRecipePack(ctx context.Context, recipePackID string, ucpOptions *arm.ClientOptions) (*v20250801preview.RecipePackResource, error) { + rpID, err := resources.ParseResource(recipePackID) + if err != nil { + return nil, err + } + + client, err := v20250801preview.NewRecipePacksClient(rpID.RootScope(), &aztoken.AnonymousCredential{}, ucpOptions) + if err != nil { + return nil, err + } + + response, err := client.Get(ctx, rpID.Name(), nil) + if err != nil { + return nil, err + } + + return &response.RecipePackResource, nil +} + +// ListRecipePacks fetches all recipe pack resources in the given scope using the provided ClientOptions, +// and returns a slice of RecipePackResource or an error. +func ListRecipePacks(ctx context.Context, scope string, ucpOptions *arm.ClientOptions) ([]*v20250801preview.RecipePackResource, error) { + client, err := v20250801preview.NewRecipePacksClient(scope, &aztoken.AnonymousCredential{}, ucpOptions) + if err != nil { + return nil, err + } + + var recipePacks []*v20250801preview.RecipePackResource + pager := client.NewListByScopePager(nil) + + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + return nil, err + } + recipePacks = append(recipePacks, page.Value...) + } + + return recipePacks, nil +} diff --git a/pkg/recipes/types.go b/pkg/recipes/types.go index b751b5627a..9ab0fe4e9c 100644 --- a/pkg/recipes/types.go +++ b/pkg/recipes/types.go @@ -45,7 +45,7 @@ type RuntimeConfiguration struct { // KubernetesRuntime represents application and environment namespaces. type KubernetesRuntime struct { // Namespace is set to the application namespace when the portable resource is application-scoped, and set to the environment namespace when it is environment scoped - Namespace string `json:"namespace,omitempty"` + Namespace string `json:"namespace"` // EnvironmentNamespace is set to environment namespace. EnvironmentNamespace string `json:"environmentNamespace"` } @@ -127,6 +127,28 @@ type SecretData struct { Data map[string]string `json:"data"` } +// RecipePackResource represents a recipe pack resource with its recipes. +type RecipePackResource struct { + // ID represents the fully qualified resource ID of the recipe pack + ID string + // Name represents the name of the recipe pack + Name string + // Description represents the description of the recipe pack + Description string + // Recipes represents the recipes available in this recipe pack + Recipes map[string]RecipePackDefinition +} + +// RecipePackDefinition represents a recipe definition for a specific resource type in a recipe pack. +type RecipePackDefinition struct { + // RecipeKind represents the type of recipe (e.g., terraform, bicep) + RecipeKind string + // RecipeLocation represents URL or path to the recipe source + RecipeLocation string + // Parameters represents parameters to pass to the recipe + Parameters map[string]any +} + // PrepareRecipeOutput populates the recipe output from the recipe deployment output stored in the "result" object. // outputs map is the value of "result" output from the recipe deployment response. func (ro *RecipeOutput) PrepareRecipeResponse(resultValue map[string]any) error { diff --git a/pkg/rp/kube/resources.go b/pkg/rp/kube/resources.go index c05d8e4841..fc28f278a2 100644 --- a/pkg/rp/kube/resources.go +++ b/pkg/rp/kube/resources.go @@ -24,6 +24,7 @@ import ( v1 "github.com/radius-project/radius/pkg/armrpc/api/v1" "github.com/radius-project/radius/pkg/components/database" "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" cdm "github.com/radius-project/radius/pkg/corerp/datamodel" rpv1 "github.com/radius-project/radius/pkg/rp/v1" "github.com/radius-project/radius/pkg/ucp/resources" @@ -31,6 +32,7 @@ import ( var ( ErrNonKubernetesEnvironment = errors.New("cannot get namespace because the current environment is not Kubernetes") + ErrNoNamespaceInEnvironment = errors.New("no namespace found in the environment resource. Please configure providers.kubernetes.namespace in the environment resource") ) // FindNamespaceByEnvID finds the environment-scope Kubernetes namespace. If the environment ID is invalid or the environment is not a Kubernetes @@ -41,31 +43,45 @@ func FindNamespaceByEnvID(ctx context.Context, databaseClient database.Client, e return } - if !strings.EqualFold(id.Type(), "Applications.Core/environments") { - err = errors.New("invalid Applications.Core/environments resource id") - return - } + if strings.EqualFold(id.Type(), "Applications.Core/environments") { + env := &cdm.Environment{} + res, err := databaseClient.Get(ctx, id.String()) + if err != nil { + return "", err + } + if err = res.As(env); err != nil { + return "", err + } - env := &cdm.Environment{} - res, err := databaseClient.Get(ctx, id.String()) - if err != nil { - return - } - if err = res.As(env); err != nil { - return - } + if env.Properties.Compute.Kind != rpv1.KubernetesComputeKind { + return "", ErrNonKubernetesEnvironment + } - if env.Properties.Compute.Kind != rpv1.KubernetesComputeKind { - err = ErrNonKubernetesEnvironment - return - } + namespace = id.Name() + if env.Properties.Compute.KubernetesCompute.Namespace != "" { + namespace = env.Properties.Compute.KubernetesCompute.Namespace + } + + return namespace, nil + } else if strings.EqualFold(id.Type(), "Radius.Core/environments") { + // Handle Radius.Core/environments (v20250801preview) + env := &cdm.Environment_v20250801preview{} + res, err := databaseClient.Get(ctx, id.String()) + if err != nil { + return "", err + } + if err = res.As(env); err != nil { + return "", err + } - namespace = id.Name() - if env.Properties.Compute.KubernetesCompute.Namespace != "" { - namespace = env.Properties.Compute.KubernetesCompute.Namespace + if env.Properties.Providers != nil && env.Properties.Providers.Kubernetes != nil { + namespace = env.Properties.Providers.Kubernetes.Namespace + return namespace, nil + } + return namespace, nil } - return + return "", errors.New("invalid environment resource id - must be Applications.Core/environments or Radius.Core/environments") } // FetchNamespaceFromEnvironmentResource finds the environment-scope Kubernetes namespace from EnvironmentResource. @@ -79,7 +95,17 @@ func FetchNamespaceFromEnvironmentResource(environment *v20231001preview.Environ return *kubernetes.Namespace, nil } return "", errors.New("unable to fetch namespace information") +} +// FetchNamespaceFromEnvironmentResourceV20250801 finds the environment-scope Kubernetes namespace from v20250801preview EnvironmentResource. +// If no namespace is found, it returns "" instead of error. This is because, Radius might still be able to deploy resources if recipe handles the namespace. +func FetchNamespaceFromEnvironmentResourceV20250801(environment *v20250801preview.EnvironmentResource) string { + if environment.Properties.Providers != nil && environment.Properties.Providers.Kubernetes != nil { + if environment.Properties.Providers.Kubernetes.Namespace != nil { + return *environment.Properties.Providers.Kubernetes.Namespace + } + } + return "" } // FetchNamespaceFromApplicationResource finds the application-scope Kubernetes namespace from ApplicationResource. diff --git a/pkg/rp/kube/resources_test.go b/pkg/rp/kube/resources_test.go index d2ba20aca9..f673fdc694 100644 --- a/pkg/rp/kube/resources_test.go +++ b/pkg/rp/kube/resources_test.go @@ -24,6 +24,7 @@ import ( v1 "github.com/radius-project/radius/pkg/armrpc/api/v1" "github.com/radius-project/radius/pkg/components/database" model "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" "github.com/radius-project/radius/pkg/corerp/datamodel" rpv1 "github.com/radius-project/radius/pkg/rp/v1" "github.com/radius-project/radius/pkg/to" @@ -32,9 +33,11 @@ import ( ) const ( - testEnvID = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/environments/env" - namespace = "default" - appNamespace = "app-default" + testAppCoreEnvID = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/environments/env" + testRadiusCoreEnvID = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Radius.Core/environments/env" + namespace = "default" + appNamespace = "app-default" + customNamespace = "custom-ns" ) func fakeStoreObject(dm v1.DataModelInterface) *database.Object { @@ -64,13 +67,13 @@ func TestFindNamespaceByEnvID(t *testing.T) { prop: rpv1.KubernetesComputeProperties{ Namespace: "default-ns", }, - id: testEnvID, + id: testAppCoreEnvID, out: "default-ns", }, { desc: "undefined namespace", prop: rpv1.KubernetesComputeProperties{}, - id: testEnvID, + id: testAppCoreEnvID, out: "env", }, } @@ -89,7 +92,7 @@ func TestFindNamespaceByEnvID(t *testing.T) { mockSC := database.NewMockClient(mctrl) mockSC.EXPECT().Get(gomock.Any(), tc.id, gomock.Any()).Return(fakeStoreObject(envdm), nil).Times(1) - ns, err := FindNamespaceByEnvID(context.Background(), mockSC, testEnvID) + ns, err := FindNamespaceByEnvID(context.Background(), mockSC, testAppCoreEnvID) require.NoError(t, err) require.Equal(t, tc.out, ns) }) @@ -146,3 +149,169 @@ func TestFetchNameSpaceFromApplicationResource(t *testing.T) { require.Equal(t, err.Error(), "unable to fetch namespace information") } + +func TestFindNamespaceByEnvID_V20250801Preview(t *testing.T) { + mctrl := gomock.NewController(t) + + tests := []struct { + desc string + environment *datamodel.Environment_v20250801preview + expectedNamespace string + expectedError string + }{ + { + desc: "namespace is defined in kubernetes provider", + environment: &datamodel.Environment_v20250801preview{ + Properties: datamodel.EnvironmentProperties_v20250801preview{ + Providers: &datamodel.Providers_v20250801preview{ + Kubernetes: &datamodel.ProvidersKubernetes_v20250801preview{ + Namespace: customNamespace, + }, + }, + }, + }, + expectedNamespace: customNamespace, + }, + { + desc: "kubernetes provider is nil - returns empty string", + environment: &datamodel.Environment_v20250801preview{ + Properties: datamodel.EnvironmentProperties_v20250801preview{ + Providers: &datamodel.Providers_v20250801preview{ + Kubernetes: nil, + }, + }, + }, + expectedNamespace: "", + }, + { + desc: "providers is nil - returns empty string", + environment: &datamodel.Environment_v20250801preview{ + Properties: datamodel.EnvironmentProperties_v20250801preview{ + Providers: nil, + }, + }, + expectedNamespace: "", + }, + { + desc: "kubernetes provider exists but namespace is empty - returns empty string", + environment: &datamodel.Environment_v20250801preview{ + Properties: datamodel.EnvironmentProperties_v20250801preview{ + Providers: &datamodel.Providers_v20250801preview{ + Kubernetes: &datamodel.ProvidersKubernetes_v20250801preview{ + Namespace: "", + }, + }, + }, + }, + expectedNamespace: "", + }, + } + + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + mockSC := database.NewMockClient(mctrl) + mockSC.EXPECT().Get(gomock.Any(), testRadiusCoreEnvID, gomock.Any()).Return(fakeStoreObject(tc.environment), nil).Times(1) + + ns, err := FindNamespaceByEnvID(context.Background(), mockSC, testRadiusCoreEnvID) + if tc.expectedError != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expectedError) + } else { + require.NoError(t, err) + require.Equal(t, tc.expectedNamespace, ns) + } + }) + } +} + +func TestFindNamespaceByEnvID_InvalidResourceType(t *testing.T) { + mctrl := gomock.NewController(t) + mockSC := database.NewMockClient(mctrl) + + invalidEnvID := "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Invalid.Type/environments/env" + + _, err := FindNamespaceByEnvID(context.Background(), mockSC, invalidEnvID) + require.Error(t, err) + require.Equal(t, "invalid environment resource id - must be Applications.Core/environments or Radius.Core/environments", err.Error()) +} + +func TestFindNamespaceByEnvID_NonKubernetesEnvironment(t *testing.T) { + mctrl := gomock.NewController(t) + + envdm := &datamodel.Environment{ + Properties: datamodel.EnvironmentProperties{ + Compute: rpv1.EnvironmentCompute{ + Kind: "NonKubernetes", + }, + }, + } + + mockSC := database.NewMockClient(mctrl) + mockSC.EXPECT().Get(gomock.Any(), testAppCoreEnvID, gomock.Any()).Return(fakeStoreObject(envdm), nil).Times(1) + + _, err := FindNamespaceByEnvID(context.Background(), mockSC, testAppCoreEnvID) + require.Error(t, err) + require.Equal(t, ErrNonKubernetesEnvironment, err) +} + +func TestFetchNamespaceFromEnvironmentResourceV20250801(t *testing.T) { + tests := []struct { + desc string + environment *v20250801preview.EnvironmentResource + expectedNamespace string + }{ + { + desc: "namespace is defined in kubernetes provider", + environment: &v20250801preview.EnvironmentResource{ + Properties: &v20250801preview.EnvironmentProperties{ + Providers: &v20250801preview.Providers{ + Kubernetes: &v20250801preview.ProvidersKubernetes{ + Namespace: to.Ptr(customNamespace), + }, + }, + }, + }, + expectedNamespace: customNamespace, + }, + { + desc: "kubernetes provider is nil - returns empty string", + environment: &v20250801preview.EnvironmentResource{ + Properties: &v20250801preview.EnvironmentProperties{ + Providers: &v20250801preview.Providers{ + Kubernetes: nil, + }, + }, + }, + expectedNamespace: "", + }, + { + desc: "providers is nil - returns empty string", + environment: &v20250801preview.EnvironmentResource{ + Properties: &v20250801preview.EnvironmentProperties{ + Providers: nil, + }, + }, + expectedNamespace: "", + }, + { + desc: "kubernetes provider exists but namespace is nil - returns empty string", + environment: &v20250801preview.EnvironmentResource{ + Properties: &v20250801preview.EnvironmentProperties{ + Providers: &v20250801preview.Providers{ + Kubernetes: &v20250801preview.ProvidersKubernetes{ + Namespace: nil, + }, + }, + }, + }, + expectedNamespace: "", + }, + } + + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + ns := FetchNamespaceFromEnvironmentResourceV20250801(tc.environment) + require.Equal(t, tc.expectedNamespace, ns) + }) + } +} diff --git a/pkg/rp/util/environment.go b/pkg/rp/util/environment.go index 30ddd55eb3..dc8196f883 100644 --- a/pkg/rp/util/environment.go +++ b/pkg/rp/util/environment.go @@ -22,6 +22,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" aztoken "github.com/radius-project/radius/pkg/azure/tokencredentials" "github.com/radius-project/radius/pkg/corerp/api/v20231001preview" + "github.com/radius-project/radius/pkg/corerp/api/v20250801preview" resources "github.com/radius-project/radius/pkg/ucp/resources" ) @@ -45,3 +46,24 @@ func FetchEnvironment(ctx context.Context, environmentID string, ucpOptions *arm return &response.EnvironmentResource, nil } + +// FetchEnvironment fetches an environment resource using the provided environmentID and ClientOptions, +// and returns the EnvironmentResource or an error. +func FetchEnvironmentV20250801(ctx context.Context, environmentID string, ucpOptions *arm.ClientOptions) (*v20250801preview.EnvironmentResource, error) { + envID, err := resources.ParseResource(environmentID) + if err != nil { + return nil, err + } + + client, err := v20250801preview.NewEnvironmentsClient(envID.RootScope(), &aztoken.AnonymousCredential{}, ucpOptions) + if err != nil { + return nil, err + } + + response, err := client.Get(ctx, envID.Name(), nil) + if err != nil { + return nil, err + } + + return &response.EnvironmentResource, nil +} diff --git a/pkg/ucp/api/README.md b/pkg/ucp/api/README.md index 169ee1afa6..e2a2086f50 100644 --- a/pkg/ucp/api/README.md +++ b/pkg/ucp/api/README.md @@ -3,20 +3,25 @@ This directory includes API version specific models from open api specs. The models in this directory is used for serializing/deserializing request and response. [datamodels](../datamodel/) has the converters to convert between version specific models and datamodels. datamodels will be used for internal controller and datastorage. ## Generate new models + ### Prerequisites + 1. Install [NodeJS](https://nodejs.org/) 2. Install [AutoRest](http://aka.ms/autorest) -``` -npm install -g autorest -``` + + ```shell + npm install -g autorest@3.7.2 + ``` ### Add new api-version 1. Add api version tags and openapi file below in this README.md 2. Run autorest. -```bash -autorest README.md --tag=ucp-2023-10-01-preview -``` + + ```shell + autorest README.md --tag=ucp-2023-10-01-preview + ``` + 3. Create or modify the corresponding datamodels in [datamodel](../datamodel/) 4. Add the converter between versioned model and datamodel in [converter](../datamodel/converter/) @@ -45,9 +50,8 @@ The following configuration generates track2 go models and client. ```yaml $(tag) != '' version: 3.*.* -use: "@autorest/go@4.0.0-preview.69" +use: "@autorest/go@4.0.0-preview.74" module: "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" -module-version: 0.0.1 file-prefix: zz_generated_ license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated." azure-arm: true diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_apiversions_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_apiversions_server.go index 0050096780..8acfad0a03 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_apiversions_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_apiversions_server.go @@ -19,7 +19,7 @@ import ( ) // APIVersionsServer is a fake server for instances of the v20231001preview.APIVersionsClient type. -type APIVersionsServer struct{ +type APIVersionsServer struct { // BeginCreateOrUpdate is the fake for method APIVersionsClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resourceProviderName string, resourceTypeName string, apiVersionName string, resource v20231001preview.APIVersionResource, options *v20231001preview.APIVersionsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.APIVersionsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -35,7 +35,6 @@ type APIVersionsServer struct{ // NewListPager is the fake for method APIVersionsClient.NewListPager // HTTP status codes to indicate success: http.StatusOK NewListPager func(planeName string, resourceProviderName string, resourceTypeName string, options *v20231001preview.APIVersionsClientListOptions) (resp azfake.PagerResponder[v20231001preview.APIVersionsClientListResponse]) - } // NewAPIVersionsServerTransport creates a new instance of APIVersionsServerTransport with the provided implementation. @@ -43,20 +42,20 @@ type APIVersionsServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAPIVersionsServerTransport(srv *APIVersionsServer) *APIVersionsServerTransport { return &APIVersionsServerTransport{ - srv: srv, + srv: srv, beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.APIVersionsClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.APIVersionsClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.APIVersionsClientListResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.APIVersionsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.APIVersionsClientListResponse]](), } } // APIVersionsServerTransport connects instances of v20231001preview.APIVersionsClient to instances of APIVersionsServer. // Don't use this type directly, use NewAPIVersionsServerTransport instead. type APIVersionsServerTransport struct { - srv *APIVersionsServer + srv *APIVersionsServer beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.APIVersionsClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.APIVersionsClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.APIVersionsClientListResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.APIVersionsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.APIVersionsClientListResponse]] } // Do implements the policy.Transporter interface for APIVersionsServerTransport. @@ -77,8 +76,8 @@ func (a *APIVersionsServerTransport) dispatchToMethodFake(req *http.Request, met go func() { var intercepted bool var res result - if apiVersionsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = apiVersionsServerTransportInterceptor.Do(req) + if apiVersionsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = apiVersionsServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -90,8 +89,8 @@ func (a *APIVersionsServerTransport) dispatchToMethodFake(req *http.Request, met res.resp, res.err = a.dispatchGet(req) case "APIVersionsClient.NewListPager": res.resp, res.err = a.dispatchNewListPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -115,36 +114,36 @@ func (a *APIVersionsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.APIVersionResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) - if err != nil { - return nil, err - } - apiVersionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("apiVersionName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, apiVersionNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.APIVersionResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) + if err != nil { + return nil, err + } + apiVersionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("apiVersionName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, apiVersionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr a.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -171,32 +170,32 @@ func (a *APIVersionsServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) - if err != nil { - return nil, err - } - apiVersionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("apiVersionName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, apiVersionNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) + if err != nil { + return nil, err + } + apiVersionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("apiVersionName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, apiVersionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr a.beginDelete.add(req, beginDelete) } @@ -224,7 +223,7 @@ func (a *APIVersionsServerTransport) dispatchGet(req *http.Request) (*http.Respo const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -264,25 +263,25 @@ func (a *APIVersionsServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) - if err != nil { - return nil, err - } -resp := a.srv.NewListPager(planeNameParam, resourceProviderNameParam, resourceTypeNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/apiversions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) + if err != nil { + return nil, err + } + resp := a.srv.NewListPager(planeNameParam, resourceProviderNameParam, resourceTypeNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.APIVersionsClientListResponse, createLink func() string) { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_awscredentials_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_awscredentials_server.go index bad6241902..695a6127c6 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_awscredentials_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_awscredentials_server.go @@ -19,7 +19,7 @@ import ( ) // AwsCredentialsServer is a fake server for instances of the v20231001preview.AwsCredentialsClient type. -type AwsCredentialsServer struct{ +type AwsCredentialsServer struct { // CreateOrUpdate is the fake for method AwsCredentialsClient.CreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated CreateOrUpdate func(ctx context.Context, planeName string, credentialName string, resource v20231001preview.AwsCredentialResource, options *v20231001preview.AwsCredentialsClientCreateOrUpdateOptions) (resp azfake.Responder[v20231001preview.AwsCredentialsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -39,7 +39,6 @@ type AwsCredentialsServer struct{ // Update is the fake for method AwsCredentialsClient.Update // HTTP status codes to indicate success: http.StatusOK Update func(ctx context.Context, planeName string, credentialName string, properties v20231001preview.AwsCredentialResourceTagsUpdate, options *v20231001preview.AwsCredentialsClientUpdateOptions) (resp azfake.Responder[v20231001preview.AwsCredentialsClientUpdateResponse], errResp azfake.ErrorResponder) - } // NewAwsCredentialsServerTransport creates a new instance of AwsCredentialsServerTransport with the provided implementation. @@ -47,7 +46,7 @@ type AwsCredentialsServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAwsCredentialsServerTransport(srv *AwsCredentialsServer) *AwsCredentialsServerTransport { return &AwsCredentialsServerTransport{ - srv: srv, + srv: srv, newListPager: newTracker[azfake.PagerResponder[v20231001preview.AwsCredentialsClientListResponse]](), } } @@ -55,7 +54,7 @@ func NewAwsCredentialsServerTransport(srv *AwsCredentialsServer) *AwsCredentials // AwsCredentialsServerTransport connects instances of v20231001preview.AwsCredentialsClient to instances of AwsCredentialsServer. // Don't use this type directly, use NewAwsCredentialsServerTransport instead. type AwsCredentialsServerTransport struct { - srv *AwsCredentialsServer + srv *AwsCredentialsServer newListPager *tracker[azfake.PagerResponder[v20231001preview.AwsCredentialsClientListResponse]] } @@ -77,8 +76,8 @@ func (a *AwsCredentialsServerTransport) dispatchToMethodFake(req *http.Request, go func() { var intercepted bool var res result - if awsCredentialsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = awsCredentialsServerTransportInterceptor.Do(req) + if awsCredentialsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = awsCredentialsServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -92,8 +91,8 @@ func (a *AwsCredentialsServerTransport) dispatchToMethodFake(req *http.Request, res.resp, res.err = a.dispatchNewListPager(req) case "AwsCredentialsClient.Update": res.resp, res.err = a.dispatchUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -118,7 +117,7 @@ func (a *AwsCredentialsServerTransport) dispatchCreateOrUpdate(req *http.Request const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.AWS/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[v20231001preview.AwsCredentialResource](req) @@ -155,7 +154,7 @@ func (a *AwsCredentialsServerTransport) dispatchDelete(req *http.Request) (*http const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.AWS/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -188,7 +187,7 @@ func (a *AwsCredentialsServerTransport) dispatchGet(req *http.Request) (*http.Re const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.AWS/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -220,17 +219,17 @@ func (a *AwsCredentialsServerTransport) dispatchNewListPager(req *http.Request) } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.AWS/credentials` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } -resp := a.srv.NewListPager(planeNameParam, nil) + const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.AWS/credentials` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resp := a.srv.NewListPager(planeNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.AwsCredentialsClientListResponse, createLink func() string) { @@ -258,7 +257,7 @@ func (a *AwsCredentialsServerTransport) dispatchUpdate(req *http.Request) (*http const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.AWS/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[v20231001preview.AwsCredentialResourceTagsUpdate](req) diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_awsplanes_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_awsplanes_server.go index ccb43ad22e..72402552ef 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_awsplanes_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_awsplanes_server.go @@ -19,7 +19,7 @@ import ( ) // AwsPlanesServer is a fake server for instances of the v20231001preview.AwsPlanesClient type. -type AwsPlanesServer struct{ +type AwsPlanesServer struct { // BeginCreateOrUpdate is the fake for method AwsPlanesClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resource v20231001preview.AwsPlaneResource, options *v20231001preview.AwsPlanesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.AwsPlanesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -39,7 +39,6 @@ type AwsPlanesServer struct{ // BeginUpdate is the fake for method AwsPlanesClient.BeginUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdate func(ctx context.Context, planeName string, properties v20231001preview.AwsPlaneResourceTagsUpdate, options *v20231001preview.AwsPlanesClientBeginUpdateOptions) (resp azfake.PollerResponder[v20231001preview.AwsPlanesClientUpdateResponse], errResp azfake.ErrorResponder) - } // NewAwsPlanesServerTransport creates a new instance of AwsPlanesServerTransport with the provided implementation. @@ -47,22 +46,22 @@ type AwsPlanesServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAwsPlanesServerTransport(srv *AwsPlanesServer) *AwsPlanesServerTransport { return &AwsPlanesServerTransport{ - srv: srv, + srv: srv, beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.AwsPlanesClientListResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.AwsPlanesClientListResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientUpdateResponse]](), } } // AwsPlanesServerTransport connects instances of v20231001preview.AwsPlanesClient to instances of AwsPlanesServer. // Don't use this type directly, use NewAwsPlanesServerTransport instead. type AwsPlanesServerTransport struct { - srv *AwsPlanesServer + srv *AwsPlanesServer beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.AwsPlanesClientListResponse]] - beginUpdate *tracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.AwsPlanesClientListResponse]] + beginUpdate *tracker[azfake.PollerResponder[v20231001preview.AwsPlanesClientUpdateResponse]] } // Do implements the policy.Transporter interface for AwsPlanesServerTransport. @@ -83,8 +82,8 @@ func (a *AwsPlanesServerTransport) dispatchToMethodFake(req *http.Request, metho go func() { var intercepted bool var res result - if awsPlanesServerTransportInterceptor != nil { - res.resp, res.err, intercepted = awsPlanesServerTransportInterceptor.Do(req) + if awsPlanesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = awsPlanesServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -98,8 +97,8 @@ func (a *AwsPlanesServerTransport) dispatchToMethodFake(req *http.Request, metho res.resp, res.err = a.dispatchNewListPager(req) case "AwsPlanesClient.BeginUpdate": res.resp, res.err = a.dispatchBeginUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -123,24 +122,24 @@ func (a *AwsPlanesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request } beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.AwsPlaneResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.AwsPlaneResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr a.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -167,20 +166,20 @@ func (a *AwsPlanesServerTransport) dispatchBeginDelete(req *http.Request) (*http } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginDelete(req.Context(), planeNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginDelete(req.Context(), planeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr a.beginDelete.add(req, beginDelete) } @@ -208,7 +207,7 @@ func (a *AwsPlanesServerTransport) dispatchGet(req *http.Request) (*http.Respons const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -236,7 +235,7 @@ func (a *AwsPlanesServerTransport) dispatchNewListPager(req *http.Request) (*htt } newListPager := a.newListPager.get(req) if newListPager == nil { -resp := a.srv.NewListPager(nil) + resp := a.srv.NewListPager(nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.AwsPlanesClientListResponse, createLink func() string) { @@ -263,24 +262,24 @@ func (a *AwsPlanesServerTransport) dispatchBeginUpdate(req *http.Request) (*http } beginUpdate := a.beginUpdate.get(req) if beginUpdate == nil { - const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.AwsPlaneResourceTagsUpdate](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginUpdate(req.Context(), planeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/aws/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.AwsPlaneResourceTagsUpdate](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginUpdate(req.Context(), planeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginUpdate = &respr a.beginUpdate.add(req, beginUpdate) } diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_azurecredentials_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_azurecredentials_server.go index e4151d61d5..716ca67cce 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_azurecredentials_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_azurecredentials_server.go @@ -19,7 +19,7 @@ import ( ) // AzureCredentialsServer is a fake server for instances of the v20231001preview.AzureCredentialsClient type. -type AzureCredentialsServer struct{ +type AzureCredentialsServer struct { // CreateOrUpdate is the fake for method AzureCredentialsClient.CreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated CreateOrUpdate func(ctx context.Context, planeName string, credentialName string, resource v20231001preview.AzureCredentialResource, options *v20231001preview.AzureCredentialsClientCreateOrUpdateOptions) (resp azfake.Responder[v20231001preview.AzureCredentialsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -39,7 +39,6 @@ type AzureCredentialsServer struct{ // Update is the fake for method AzureCredentialsClient.Update // HTTP status codes to indicate success: http.StatusOK Update func(ctx context.Context, planeName string, credentialName string, properties v20231001preview.AzureCredentialResourceTagsUpdate, options *v20231001preview.AzureCredentialsClientUpdateOptions) (resp azfake.Responder[v20231001preview.AzureCredentialsClientUpdateResponse], errResp azfake.ErrorResponder) - } // NewAzureCredentialsServerTransport creates a new instance of AzureCredentialsServerTransport with the provided implementation. @@ -47,7 +46,7 @@ type AzureCredentialsServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAzureCredentialsServerTransport(srv *AzureCredentialsServer) *AzureCredentialsServerTransport { return &AzureCredentialsServerTransport{ - srv: srv, + srv: srv, newListPager: newTracker[azfake.PagerResponder[v20231001preview.AzureCredentialsClientListResponse]](), } } @@ -55,7 +54,7 @@ func NewAzureCredentialsServerTransport(srv *AzureCredentialsServer) *AzureCrede // AzureCredentialsServerTransport connects instances of v20231001preview.AzureCredentialsClient to instances of AzureCredentialsServer. // Don't use this type directly, use NewAzureCredentialsServerTransport instead. type AzureCredentialsServerTransport struct { - srv *AzureCredentialsServer + srv *AzureCredentialsServer newListPager *tracker[azfake.PagerResponder[v20231001preview.AzureCredentialsClientListResponse]] } @@ -77,8 +76,8 @@ func (a *AzureCredentialsServerTransport) dispatchToMethodFake(req *http.Request go func() { var intercepted bool var res result - if azureCredentialsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = azureCredentialsServerTransportInterceptor.Do(req) + if azureCredentialsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = azureCredentialsServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -92,8 +91,8 @@ func (a *AzureCredentialsServerTransport) dispatchToMethodFake(req *http.Request res.resp, res.err = a.dispatchNewListPager(req) case "AzureCredentialsClient.Update": res.resp, res.err = a.dispatchUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -118,7 +117,7 @@ func (a *AzureCredentialsServerTransport) dispatchCreateOrUpdate(req *http.Reque const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Azure/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[v20231001preview.AzureCredentialResource](req) @@ -155,7 +154,7 @@ func (a *AzureCredentialsServerTransport) dispatchDelete(req *http.Request) (*ht const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Azure/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -188,7 +187,7 @@ func (a *AzureCredentialsServerTransport) dispatchGet(req *http.Request) (*http. const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Azure/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -220,17 +219,17 @@ func (a *AzureCredentialsServerTransport) dispatchNewListPager(req *http.Request } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Azure/credentials` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } -resp := a.srv.NewListPager(planeNameParam, nil) + const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Azure/credentials` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resp := a.srv.NewListPager(planeNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.AzureCredentialsClientListResponse, createLink func() string) { @@ -258,7 +257,7 @@ func (a *AzureCredentialsServerTransport) dispatchUpdate(req *http.Request) (*ht const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Azure/credentials/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[v20231001preview.AzureCredentialResourceTagsUpdate](req) diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_azureplanes_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_azureplanes_server.go index 13f7a03c9a..f6e2441176 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_azureplanes_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_azureplanes_server.go @@ -19,7 +19,7 @@ import ( ) // AzurePlanesServer is a fake server for instances of the v20231001preview.AzurePlanesClient type. -type AzurePlanesServer struct{ +type AzurePlanesServer struct { // BeginCreateOrUpdate is the fake for method AzurePlanesClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resource v20231001preview.AzurePlaneResource, options *v20231001preview.AzurePlanesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.AzurePlanesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -39,7 +39,6 @@ type AzurePlanesServer struct{ // BeginUpdate is the fake for method AzurePlanesClient.BeginUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdate func(ctx context.Context, planeName string, properties v20231001preview.AzurePlaneResourceTagsUpdate, options *v20231001preview.AzurePlanesClientBeginUpdateOptions) (resp azfake.PollerResponder[v20231001preview.AzurePlanesClientUpdateResponse], errResp azfake.ErrorResponder) - } // NewAzurePlanesServerTransport creates a new instance of AzurePlanesServerTransport with the provided implementation. @@ -47,22 +46,22 @@ type AzurePlanesServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAzurePlanesServerTransport(srv *AzurePlanesServer) *AzurePlanesServerTransport { return &AzurePlanesServerTransport{ - srv: srv, + srv: srv, beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.AzurePlanesClientListResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.AzurePlanesClientListResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientUpdateResponse]](), } } // AzurePlanesServerTransport connects instances of v20231001preview.AzurePlanesClient to instances of AzurePlanesServer. // Don't use this type directly, use NewAzurePlanesServerTransport instead. type AzurePlanesServerTransport struct { - srv *AzurePlanesServer + srv *AzurePlanesServer beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.AzurePlanesClientListResponse]] - beginUpdate *tracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.AzurePlanesClientListResponse]] + beginUpdate *tracker[azfake.PollerResponder[v20231001preview.AzurePlanesClientUpdateResponse]] } // Do implements the policy.Transporter interface for AzurePlanesServerTransport. @@ -83,8 +82,8 @@ func (a *AzurePlanesServerTransport) dispatchToMethodFake(req *http.Request, met go func() { var intercepted bool var res result - if azurePlanesServerTransportInterceptor != nil { - res.resp, res.err, intercepted = azurePlanesServerTransportInterceptor.Do(req) + if azurePlanesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = azurePlanesServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -98,8 +97,8 @@ func (a *AzurePlanesServerTransport) dispatchToMethodFake(req *http.Request, met res.resp, res.err = a.dispatchNewListPager(req) case "AzurePlanesClient.BeginUpdate": res.resp, res.err = a.dispatchBeginUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -123,24 +122,24 @@ func (a *AzurePlanesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.AzurePlaneResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.AzurePlaneResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr a.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -167,20 +166,20 @@ func (a *AzurePlanesServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginDelete(req.Context(), planeNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginDelete(req.Context(), planeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr a.beginDelete.add(req, beginDelete) } @@ -208,7 +207,7 @@ func (a *AzurePlanesServerTransport) dispatchGet(req *http.Request) (*http.Respo const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -236,7 +235,7 @@ func (a *AzurePlanesServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := a.newListPager.get(req) if newListPager == nil { -resp := a.srv.NewListPager(nil) + resp := a.srv.NewListPager(nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.AzurePlanesClientListResponse, createLink func() string) { @@ -263,24 +262,24 @@ func (a *AzurePlanesServerTransport) dispatchBeginUpdate(req *http.Request) (*ht } beginUpdate := a.beginUpdate.get(req) if beginUpdate == nil { - const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.AzurePlaneResourceTagsUpdate](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginUpdate(req.Context(), planeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/azure/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.AzurePlaneResourceTagsUpdate](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginUpdate(req.Context(), planeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginUpdate = &respr a.beginUpdate.add(req, beginUpdate) } diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_internal.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_internal.go index 0c62457a83..936b2c6560 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_internal.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_internal.go @@ -10,10 +10,9 @@ import ( "sync" ) - type result struct { resp *http.Response - err error + err error } type nonRetriableError struct { @@ -41,7 +40,7 @@ func newTracker[T any]() *tracker[T] { type tracker[T any] struct { items map[string]*T - mu sync.Mutex + mu sync.Mutex } func (p *tracker[T]) get(req *http.Request) *T { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_locations_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_locations_server.go index cf97d09ddd..e062c4e964 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_locations_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_locations_server.go @@ -19,7 +19,7 @@ import ( ) // LocationsServer is a fake server for instances of the v20231001preview.LocationsClient type. -type LocationsServer struct{ +type LocationsServer struct { // BeginCreateOrUpdate is the fake for method LocationsClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resourceProviderName string, locationName string, resource v20231001preview.LocationResource, options *v20231001preview.LocationsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.LocationsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -35,7 +35,6 @@ type LocationsServer struct{ // NewListPager is the fake for method LocationsClient.NewListPager // HTTP status codes to indicate success: http.StatusOK NewListPager func(planeName string, resourceProviderName string, options *v20231001preview.LocationsClientListOptions) (resp azfake.PagerResponder[v20231001preview.LocationsClientListResponse]) - } // NewLocationsServerTransport creates a new instance of LocationsServerTransport with the provided implementation. @@ -43,20 +42,20 @@ type LocationsServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLocationsServerTransport(srv *LocationsServer) *LocationsServerTransport { return &LocationsServerTransport{ - srv: srv, + srv: srv, beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.LocationsClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.LocationsClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.LocationsClientListResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.LocationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.LocationsClientListResponse]](), } } // LocationsServerTransport connects instances of v20231001preview.LocationsClient to instances of LocationsServer. // Don't use this type directly, use NewLocationsServerTransport instead. type LocationsServerTransport struct { - srv *LocationsServer + srv *LocationsServer beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.LocationsClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.LocationsClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.LocationsClientListResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.LocationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.LocationsClientListResponse]] } // Do implements the policy.Transporter interface for LocationsServerTransport. @@ -77,8 +76,8 @@ func (l *LocationsServerTransport) dispatchToMethodFake(req *http.Request, metho go func() { var intercepted bool var res result - if locationsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = locationsServerTransportInterceptor.Do(req) + if locationsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = locationsServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -90,8 +89,8 @@ func (l *LocationsServerTransport) dispatchToMethodFake(req *http.Request, metho res.resp, res.err = l.dispatchGet(req) case "LocationsClient.NewListPager": res.resp, res.err = l.dispatchNewListPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -115,32 +114,32 @@ func (l *LocationsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request } beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.LocationResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - locationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")]) - if err != nil { - return nil, err - } - respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, locationNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.LocationResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + locationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")]) + if err != nil { + return nil, err + } + respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, locationNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr l.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -167,28 +166,28 @@ func (l *LocationsServerTransport) dispatchBeginDelete(req *http.Request) (*http } beginDelete := l.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - locationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")]) - if err != nil { - return nil, err - } - respr, errRespr := l.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, locationNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + locationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")]) + if err != nil { + return nil, err + } + respr, errRespr := l.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, locationNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr l.beginDelete.add(req, beginDelete) } @@ -216,7 +215,7 @@ func (l *LocationsServerTransport) dispatchGet(req *http.Request) (*http.Respons const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -252,21 +251,21 @@ func (l *LocationsServerTransport) dispatchNewListPager(req *http.Request) (*htt } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } -resp := l.srv.NewListPager(planeNameParam, resourceProviderNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resp := l.srv.NewListPager(planeNameParam, resourceProviderNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.LocationsClientListResponse, createLink func() string) { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_planes_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_planes_server.go index b361998914..4004574995 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_planes_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_planes_server.go @@ -16,11 +16,10 @@ import ( ) // PlanesServer is a fake server for instances of the v20231001preview.PlanesClient type. -type PlanesServer struct{ +type PlanesServer struct { // NewListPlanesPager is the fake for method PlanesClient.NewListPlanesPager // HTTP status codes to indicate success: http.StatusOK NewListPlanesPager func(options *v20231001preview.PlanesClientListPlanesOptions) (resp azfake.PagerResponder[v20231001preview.PlanesClientListPlanesResponse]) - } // NewPlanesServerTransport creates a new instance of PlanesServerTransport with the provided implementation. @@ -28,7 +27,7 @@ type PlanesServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPlanesServerTransport(srv *PlanesServer) *PlanesServerTransport { return &PlanesServerTransport{ - srv: srv, + srv: srv, newListPlanesPager: newTracker[azfake.PagerResponder[v20231001preview.PlanesClientListPlanesResponse]](), } } @@ -36,7 +35,7 @@ func NewPlanesServerTransport(srv *PlanesServer) *PlanesServerTransport { // PlanesServerTransport connects instances of v20231001preview.PlanesClient to instances of PlanesServer. // Don't use this type directly, use NewPlanesServerTransport instead. type PlanesServerTransport struct { - srv *PlanesServer + srv *PlanesServer newListPlanesPager *tracker[azfake.PagerResponder[v20231001preview.PlanesClientListPlanesResponse]] } @@ -58,15 +57,15 @@ func (p *PlanesServerTransport) dispatchToMethodFake(req *http.Request, method s go func() { var intercepted bool var res result - if planesServerTransportInterceptor != nil { - res.resp, res.err, intercepted = planesServerTransportInterceptor.Do(req) + if planesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = planesServerTransportInterceptor.Do(req) } if !intercepted { switch method { case "PlanesClient.NewListPlanesPager": res.resp, res.err = p.dispatchNewListPlanesPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -90,7 +89,7 @@ func (p *PlanesServerTransport) dispatchNewListPlanesPager(req *http.Request) (* } newListPlanesPager := p.newListPlanesPager.get(req) if newListPlanesPager == nil { -resp := p.srv.NewListPlanesPager(nil) + resp := p.srv.NewListPlanesPager(nil) newListPlanesPager = &resp p.newListPlanesPager.add(req, newListPlanesPager) server.PagerResponderInjectNextLinks(newListPlanesPager, req, func(page *v20231001preview.PlanesClientListPlanesResponse, createLink func() string) { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_radiusplanes_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_radiusplanes_server.go index 3271c005e4..5007a2f39e 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_radiusplanes_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_radiusplanes_server.go @@ -19,7 +19,7 @@ import ( ) // RadiusPlanesServer is a fake server for instances of the v20231001preview.RadiusPlanesClient type. -type RadiusPlanesServer struct{ +type RadiusPlanesServer struct { // BeginCreateOrUpdate is the fake for method RadiusPlanesClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resource v20231001preview.RadiusPlaneResource, options *v20231001preview.RadiusPlanesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.RadiusPlanesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -39,7 +39,6 @@ type RadiusPlanesServer struct{ // BeginUpdate is the fake for method RadiusPlanesClient.BeginUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdate func(ctx context.Context, planeName string, properties v20231001preview.RadiusPlaneResourceTagsUpdate, options *v20231001preview.RadiusPlanesClientBeginUpdateOptions) (resp azfake.PollerResponder[v20231001preview.RadiusPlanesClientUpdateResponse], errResp azfake.ErrorResponder) - } // NewRadiusPlanesServerTransport creates a new instance of RadiusPlanesServerTransport with the provided implementation. @@ -47,22 +46,22 @@ type RadiusPlanesServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRadiusPlanesServerTransport(srv *RadiusPlanesServer) *RadiusPlanesServerTransport { return &RadiusPlanesServerTransport{ - srv: srv, + srv: srv, beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.RadiusPlanesClientListResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.RadiusPlanesClientListResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientUpdateResponse]](), } } // RadiusPlanesServerTransport connects instances of v20231001preview.RadiusPlanesClient to instances of RadiusPlanesServer. // Don't use this type directly, use NewRadiusPlanesServerTransport instead. type RadiusPlanesServerTransport struct { - srv *RadiusPlanesServer + srv *RadiusPlanesServer beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.RadiusPlanesClientListResponse]] - beginUpdate *tracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.RadiusPlanesClientListResponse]] + beginUpdate *tracker[azfake.PollerResponder[v20231001preview.RadiusPlanesClientUpdateResponse]] } // Do implements the policy.Transporter interface for RadiusPlanesServerTransport. @@ -83,8 +82,8 @@ func (r *RadiusPlanesServerTransport) dispatchToMethodFake(req *http.Request, me go func() { var intercepted bool var res result - if radiusPlanesServerTransportInterceptor != nil { - res.resp, res.err, intercepted = radiusPlanesServerTransportInterceptor.Do(req) + if radiusPlanesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = radiusPlanesServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -98,8 +97,8 @@ func (r *RadiusPlanesServerTransport) dispatchToMethodFake(req *http.Request, me res.resp, res.err = r.dispatchNewListPager(req) case "RadiusPlanesClient.BeginUpdate": res.resp, res.err = r.dispatchBeginUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -123,24 +122,24 @@ func (r *RadiusPlanesServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.RadiusPlaneResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.RadiusPlaneResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -167,20 +166,20 @@ func (r *RadiusPlanesServerTransport) dispatchBeginDelete(req *http.Request) (*h } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginDelete(req.Context(), planeNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginDelete(req.Context(), planeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr r.beginDelete.add(req, beginDelete) } @@ -208,7 +207,7 @@ func (r *RadiusPlanesServerTransport) dispatchGet(req *http.Request) (*http.Resp const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -236,7 +235,7 @@ func (r *RadiusPlanesServerTransport) dispatchNewListPager(req *http.Request) (* } newListPager := r.newListPager.get(req) if newListPager == nil { -resp := r.srv.NewListPager(nil) + resp := r.srv.NewListPager(nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.RadiusPlanesClientListResponse, createLink func() string) { @@ -263,24 +262,24 @@ func (r *RadiusPlanesServerTransport) dispatchBeginUpdate(req *http.Request) (*h } beginUpdate := r.beginUpdate.get(req) if beginUpdate == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.RadiusPlaneResourceTagsUpdate](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginUpdate(req.Context(), planeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.RadiusPlaneResourceTagsUpdate](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginUpdate(req.Context(), planeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginUpdate = &respr r.beginUpdate.add(req, beginUpdate) } diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcegroups_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcegroups_server.go index c66d567bcd..a13900b926 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcegroups_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcegroups_server.go @@ -19,7 +19,7 @@ import ( ) // ResourceGroupsServer is a fake server for instances of the v20231001preview.ResourceGroupsClient type. -type ResourceGroupsServer struct{ +type ResourceGroupsServer struct { // CreateOrUpdate is the fake for method ResourceGroupsClient.CreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated CreateOrUpdate func(ctx context.Context, planeName string, resourceGroupName string, resource v20231001preview.ResourceGroupResource, options *v20231001preview.ResourceGroupsClientCreateOrUpdateOptions) (resp azfake.Responder[v20231001preview.ResourceGroupsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -39,7 +39,6 @@ type ResourceGroupsServer struct{ // Update is the fake for method ResourceGroupsClient.Update // HTTP status codes to indicate success: http.StatusOK Update func(ctx context.Context, planeName string, resourceGroupName string, properties v20231001preview.ResourceGroupResourceTagsUpdate, options *v20231001preview.ResourceGroupsClientUpdateOptions) (resp azfake.Responder[v20231001preview.ResourceGroupsClientUpdateResponse], errResp azfake.ErrorResponder) - } // NewResourceGroupsServerTransport creates a new instance of ResourceGroupsServerTransport with the provided implementation. @@ -47,7 +46,7 @@ type ResourceGroupsServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewResourceGroupsServerTransport(srv *ResourceGroupsServer) *ResourceGroupsServerTransport { return &ResourceGroupsServerTransport{ - srv: srv, + srv: srv, newListPager: newTracker[azfake.PagerResponder[v20231001preview.ResourceGroupsClientListResponse]](), } } @@ -55,7 +54,7 @@ func NewResourceGroupsServerTransport(srv *ResourceGroupsServer) *ResourceGroups // ResourceGroupsServerTransport connects instances of v20231001preview.ResourceGroupsClient to instances of ResourceGroupsServer. // Don't use this type directly, use NewResourceGroupsServerTransport instead. type ResourceGroupsServerTransport struct { - srv *ResourceGroupsServer + srv *ResourceGroupsServer newListPager *tracker[azfake.PagerResponder[v20231001preview.ResourceGroupsClientListResponse]] } @@ -77,8 +76,8 @@ func (r *ResourceGroupsServerTransport) dispatchToMethodFake(req *http.Request, go func() { var intercepted bool var res result - if resourceGroupsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = resourceGroupsServerTransportInterceptor.Do(req) + if resourceGroupsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = resourceGroupsServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -92,8 +91,8 @@ func (r *ResourceGroupsServerTransport) dispatchToMethodFake(req *http.Request, res.resp, res.err = r.dispatchNewListPager(req) case "ResourceGroupsClient.Update": res.resp, res.err = r.dispatchUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -118,7 +117,7 @@ func (r *ResourceGroupsServerTransport) dispatchCreateOrUpdate(req *http.Request const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[v20231001preview.ResourceGroupResource](req) @@ -155,7 +154,7 @@ func (r *ResourceGroupsServerTransport) dispatchDelete(req *http.Request) (*http const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -188,7 +187,7 @@ func (r *ResourceGroupsServerTransport) dispatchGet(req *http.Request) (*http.Re const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -220,17 +219,17 @@ func (r *ResourceGroupsServerTransport) dispatchNewListPager(req *http.Request) } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } -resp := r.srv.NewListPager(planeNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListPager(planeNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.ResourceGroupsClientListResponse, createLink func() string) { @@ -258,7 +257,7 @@ func (r *ResourceGroupsServerTransport) dispatchUpdate(req *http.Request) (*http const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[v20231001preview.ResourceGroupResourceTagsUpdate](req) diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_resourceproviders_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_resourceproviders_server.go index 138f9aaceb..b5b62a011d 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_resourceproviders_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_resourceproviders_server.go @@ -19,7 +19,7 @@ import ( ) // ResourceProvidersServer is a fake server for instances of the v20231001preview.ResourceProvidersClient type. -type ResourceProvidersServer struct{ +type ResourceProvidersServer struct { // BeginCreateOrUpdate is the fake for method ResourceProvidersClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resourceProviderName string, resource v20231001preview.ResourceProviderResource, options *v20231001preview.ResourceProvidersClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.ResourceProvidersClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -43,7 +43,6 @@ type ResourceProvidersServer struct{ // NewListProviderSummariesPager is the fake for method ResourceProvidersClient.NewListProviderSummariesPager // HTTP status codes to indicate success: http.StatusOK NewListProviderSummariesPager func(planeName string, options *v20231001preview.ResourceProvidersClientListProviderSummariesOptions) (resp azfake.PagerResponder[v20231001preview.ResourceProvidersClientListProviderSummariesResponse]) - } // NewResourceProvidersServerTransport creates a new instance of ResourceProvidersServerTransport with the provided implementation. @@ -51,10 +50,10 @@ type ResourceProvidersServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewResourceProvidersServerTransport(srv *ResourceProvidersServer) *ResourceProvidersServerTransport { return &ResourceProvidersServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.ResourceProvidersClientListResponse]](), + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.ResourceProvidersClientListResponse]](), newListProviderSummariesPager: newTracker[azfake.PagerResponder[v20231001preview.ResourceProvidersClientListProviderSummariesResponse]](), } } @@ -62,10 +61,10 @@ func NewResourceProvidersServerTransport(srv *ResourceProvidersServer) *Resource // ResourceProvidersServerTransport connects instances of v20231001preview.ResourceProvidersClient to instances of ResourceProvidersServer. // Don't use this type directly, use NewResourceProvidersServerTransport instead. type ResourceProvidersServerTransport struct { - srv *ResourceProvidersServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.ResourceProvidersClientListResponse]] + srv *ResourceProvidersServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.ResourceProvidersClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.ResourceProvidersClientListResponse]] newListProviderSummariesPager *tracker[azfake.PagerResponder[v20231001preview.ResourceProvidersClientListProviderSummariesResponse]] } @@ -87,8 +86,8 @@ func (r *ResourceProvidersServerTransport) dispatchToMethodFake(req *http.Reques go func() { var intercepted bool var res result - if resourceProvidersServerTransportInterceptor != nil { - res.resp, res.err, intercepted = resourceProvidersServerTransportInterceptor.Do(req) + if resourceProvidersServerTransportInterceptor != nil { + res.resp, res.err, intercepted = resourceProvidersServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -104,8 +103,8 @@ func (r *ResourceProvidersServerTransport) dispatchToMethodFake(req *http.Reques res.resp, res.err = r.dispatchNewListPager(req) case "ResourceProvidersClient.NewListProviderSummariesPager": res.resp, res.err = r.dispatchNewListProviderSummariesPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -129,28 +128,28 @@ func (r *ResourceProvidersServerTransport) dispatchBeginCreateOrUpdate(req *http } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.ResourceProviderResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.ResourceProviderResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -177,24 +176,24 @@ func (r *ResourceProvidersServerTransport) dispatchBeginDelete(req *http.Request } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr r.beginDelete.add(req, beginDelete) } @@ -222,7 +221,7 @@ func (r *ResourceProvidersServerTransport) dispatchGet(req *http.Request) (*http const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -255,7 +254,7 @@ func (r *ResourceProvidersServerTransport) dispatchGetProviderSummary(req *http. const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -287,17 +286,17 @@ func (r *ResourceProvidersServerTransport) dispatchNewListPager(req *http.Reques } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } -resp := r.srv.NewListPager(planeNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListPager(planeNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.ResourceProvidersClientListResponse, createLink func() string) { @@ -324,17 +323,17 @@ func (r *ResourceProvidersServerTransport) dispatchNewListProviderSummariesPager } newListProviderSummariesPager := r.newListProviderSummariesPager.get(req) if newListProviderSummariesPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } -resp := r.srv.NewListProviderSummariesPager(planeNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListProviderSummariesPager(planeNameParam, nil) newListProviderSummariesPager = &resp r.newListProviderSummariesPager.add(req, newListProviderSummariesPager) server.PagerResponderInjectNextLinks(newListProviderSummariesPager, req, func(page *v20231001preview.ResourceProvidersClientListProviderSummariesResponse, createLink func() string) { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_resources_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_resources_server.go index 39f575e452..ccbe72d1bd 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_resources_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_resources_server.go @@ -18,11 +18,10 @@ import ( ) // ResourcesServer is a fake server for instances of the v20231001preview.ResourcesClient type. -type ResourcesServer struct{ +type ResourcesServer struct { // NewListPager is the fake for method ResourcesClient.NewListPager // HTTP status codes to indicate success: http.StatusOK NewListPager func(planeName string, resourceGroupName string, options *v20231001preview.ResourcesClientListOptions) (resp azfake.PagerResponder[v20231001preview.ResourcesClientListResponse]) - } // NewResourcesServerTransport creates a new instance of ResourcesServerTransport with the provided implementation. @@ -30,7 +29,7 @@ type ResourcesServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewResourcesServerTransport(srv *ResourcesServer) *ResourcesServerTransport { return &ResourcesServerTransport{ - srv: srv, + srv: srv, newListPager: newTracker[azfake.PagerResponder[v20231001preview.ResourcesClientListResponse]](), } } @@ -38,7 +37,7 @@ func NewResourcesServerTransport(srv *ResourcesServer) *ResourcesServerTransport // ResourcesServerTransport connects instances of v20231001preview.ResourcesClient to instances of ResourcesServer. // Don't use this type directly, use NewResourcesServerTransport instead. type ResourcesServerTransport struct { - srv *ResourcesServer + srv *ResourcesServer newListPager *tracker[azfake.PagerResponder[v20231001preview.ResourcesClientListResponse]] } @@ -60,15 +59,15 @@ func (r *ResourcesServerTransport) dispatchToMethodFake(req *http.Request, metho go func() { var intercepted bool var res result - if resourcesServerTransportInterceptor != nil { - res.resp, res.err, intercepted = resourcesServerTransportInterceptor.Do(req) + if resourcesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = resourcesServerTransportInterceptor.Do(req) } if !intercepted { switch method { case "ResourcesClient.NewListPager": res.resp, res.err = r.dispatchNewListPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -92,21 +91,21 @@ func (r *ResourcesServerTransport) dispatchNewListPager(req *http.Request) (*htt } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resources` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } -resp := r.srv.NewListPager(planeNameParam, resourceGroupNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListPager(planeNameParam, resourceGroupNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.ResourcesClientListResponse, createLink func() string) { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcetypes_server.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcetypes_server.go index d745f522d0..22733ae014 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcetypes_server.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_resourcetypes_server.go @@ -19,7 +19,7 @@ import ( ) // ResourceTypesServer is a fake server for instances of the v20231001preview.ResourceTypesClient type. -type ResourceTypesServer struct{ +type ResourceTypesServer struct { // BeginCreateOrUpdate is the fake for method ResourceTypesClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, planeName string, resourceProviderName string, resourceTypeName string, resource v20231001preview.ResourceTypeResource, options *v20231001preview.ResourceTypesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[v20231001preview.ResourceTypesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -35,7 +35,6 @@ type ResourceTypesServer struct{ // NewListPager is the fake for method ResourceTypesClient.NewListPager // HTTP status codes to indicate success: http.StatusOK NewListPager func(planeName string, resourceProviderName string, options *v20231001preview.ResourceTypesClientListOptions) (resp azfake.PagerResponder[v20231001preview.ResourceTypesClientListResponse]) - } // NewResourceTypesServerTransport creates a new instance of ResourceTypesServerTransport with the provided implementation. @@ -43,20 +42,20 @@ type ResourceTypesServer struct{ // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewResourceTypesServerTransport(srv *ResourceTypesServer) *ResourceTypesServerTransport { return &ResourceTypesServerTransport{ - srv: srv, + srv: srv, beginCreateOrUpdate: newTracker[azfake.PollerResponder[v20231001preview.ResourceTypesClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[v20231001preview.ResourceTypesClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[v20231001preview.ResourceTypesClientListResponse]](), + beginDelete: newTracker[azfake.PollerResponder[v20231001preview.ResourceTypesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[v20231001preview.ResourceTypesClientListResponse]](), } } // ResourceTypesServerTransport connects instances of v20231001preview.ResourceTypesClient to instances of ResourceTypesServer. // Don't use this type directly, use NewResourceTypesServerTransport instead. type ResourceTypesServerTransport struct { - srv *ResourceTypesServer + srv *ResourceTypesServer beginCreateOrUpdate *tracker[azfake.PollerResponder[v20231001preview.ResourceTypesClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[v20231001preview.ResourceTypesClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[v20231001preview.ResourceTypesClientListResponse]] + beginDelete *tracker[azfake.PollerResponder[v20231001preview.ResourceTypesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[v20231001preview.ResourceTypesClientListResponse]] } // Do implements the policy.Transporter interface for ResourceTypesServerTransport. @@ -77,8 +76,8 @@ func (r *ResourceTypesServerTransport) dispatchToMethodFake(req *http.Request, m go func() { var intercepted bool var res result - if resourceTypesServerTransportInterceptor != nil { - res.resp, res.err, intercepted = resourceTypesServerTransportInterceptor.Do(req) + if resourceTypesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = resourceTypesServerTransportInterceptor.Do(req) } if !intercepted { switch method { @@ -90,8 +89,8 @@ func (r *ResourceTypesServerTransport) dispatchToMethodFake(req *http.Request, m res.resp, res.err = r.dispatchGet(req) case "ResourceTypesClient.NewListPager": res.resp, res.err = r.dispatchNewListPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) + default: + res.err = fmt.Errorf("unhandled API %s", method) } } @@ -115,32 +114,32 @@ func (r *ResourceTypesServerTransport) dispatchBeginCreateOrUpdate(req *http.Req } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[v20231001preview.ResourceTypeResource](req) - if err != nil { - return nil, err - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[v20231001preview.ResourceTypeResource](req) + if err != nil { + return nil, err + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginCreateOrUpdate = &respr r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } @@ -167,28 +166,28 @@ func (r *ResourceTypesServerTransport) dispatchBeginDelete(req *http.Request) (* } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } - resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) - if err != nil { - return nil, err - } - respr, errRespr := r.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resourceTypeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceTypeName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.BeginDelete(req.Context(), planeNameParam, resourceProviderNameParam, resourceTypeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } beginDelete = &respr r.beginDelete.add(req, beginDelete) } @@ -216,7 +215,7 @@ func (r *ResourceTypesServerTransport) dispatchGet(req *http.Request) (*http.Res const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) @@ -252,21 +251,21 @@ func (r *ResourceTypesServerTransport) dispatchNewListPager(req *http.Request) ( } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) - if err != nil { - return nil, err - } - resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) - if err != nil { - return nil, err - } -resp := r.srv.NewListPager(planeNameParam, resourceProviderNameParam, nil) + const regexStr = `/planes/radius/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/System\.Resources/resourceproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcetypes` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + planeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("planeName")]) + if err != nil { + return nil, err + } + resourceProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderName")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListPager(planeNameParam, resourceProviderNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *v20231001preview.ResourceTypesClientListResponse, createLink func() string) { diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_server_factory.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_server_factory.go index 90ceab79c8..7320189411 100644 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_server_factory.go +++ b/pkg/ucp/api/v20231001preview/fake/zz_generated_server_factory.go @@ -50,7 +50,6 @@ type ServerFactory struct { // ResourcesServer contains the fakes for client ResourcesClient ResourcesServer ResourcesServer - } // NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. @@ -65,20 +64,20 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { // ServerFactoryTransport connects instances of v20231001preview.ClientFactory to instances of ServerFactory. // Don't use this type directly, use NewServerFactoryTransport instead. type ServerFactoryTransport struct { - srv *ServerFactory - trMu sync.Mutex - trAPIVersionsServer *APIVersionsServerTransport - trAwsCredentialsServer *AwsCredentialsServerTransport - trAwsPlanesServer *AwsPlanesServerTransport - trAzureCredentialsServer *AzureCredentialsServerTransport - trAzurePlanesServer *AzurePlanesServerTransport - trLocationsServer *LocationsServerTransport - trPlanesServer *PlanesServerTransport - trRadiusPlanesServer *RadiusPlanesServerTransport - trResourceGroupsServer *ResourceGroupsServerTransport + srv *ServerFactory + trMu sync.Mutex + trAPIVersionsServer *APIVersionsServerTransport + trAwsCredentialsServer *AwsCredentialsServerTransport + trAwsPlanesServer *AwsPlanesServerTransport + trAzureCredentialsServer *AzureCredentialsServerTransport + trAzurePlanesServer *AzurePlanesServerTransport + trLocationsServer *LocationsServerTransport + trPlanesServer *PlanesServerTransport + trRadiusPlanesServer *RadiusPlanesServerTransport + trResourceGroupsServer *ResourceGroupsServerTransport trResourceProvidersServer *ResourceProvidersServerTransport - trResourceTypesServer *ResourceTypesServerTransport - trResourcesServer *ResourcesServerTransport + trResourceTypesServer *ResourceTypesServerTransport + trResourcesServer *ResourcesServerTransport } // Do implements the policy.Transporter interface for ServerFactoryTransport. @@ -98,13 +97,17 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { initServer(s, &s.trAPIVersionsServer, func() *APIVersionsServerTransport { return NewAPIVersionsServerTransport(&s.srv.APIVersionsServer) }) resp, err = s.trAPIVersionsServer.Do(req) case "AwsCredentialsClient": - initServer(s, &s.trAwsCredentialsServer, func() *AwsCredentialsServerTransport { return NewAwsCredentialsServerTransport(&s.srv.AwsCredentialsServer) }) + initServer(s, &s.trAwsCredentialsServer, func() *AwsCredentialsServerTransport { + return NewAwsCredentialsServerTransport(&s.srv.AwsCredentialsServer) + }) resp, err = s.trAwsCredentialsServer.Do(req) case "AwsPlanesClient": initServer(s, &s.trAwsPlanesServer, func() *AwsPlanesServerTransport { return NewAwsPlanesServerTransport(&s.srv.AwsPlanesServer) }) resp, err = s.trAwsPlanesServer.Do(req) case "AzureCredentialsClient": - initServer(s, &s.trAzureCredentialsServer, func() *AzureCredentialsServerTransport { return NewAzureCredentialsServerTransport(&s.srv.AzureCredentialsServer) }) + initServer(s, &s.trAzureCredentialsServer, func() *AzureCredentialsServerTransport { + return NewAzureCredentialsServerTransport(&s.srv.AzureCredentialsServer) + }) resp, err = s.trAzureCredentialsServer.Do(req) case "AzurePlanesClient": initServer(s, &s.trAzurePlanesServer, func() *AzurePlanesServerTransport { return NewAzurePlanesServerTransport(&s.srv.AzurePlanesServer) }) @@ -119,13 +122,19 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { initServer(s, &s.trRadiusPlanesServer, func() *RadiusPlanesServerTransport { return NewRadiusPlanesServerTransport(&s.srv.RadiusPlanesServer) }) resp, err = s.trRadiusPlanesServer.Do(req) case "ResourceGroupsClient": - initServer(s, &s.trResourceGroupsServer, func() *ResourceGroupsServerTransport { return NewResourceGroupsServerTransport(&s.srv.ResourceGroupsServer) }) + initServer(s, &s.trResourceGroupsServer, func() *ResourceGroupsServerTransport { + return NewResourceGroupsServerTransport(&s.srv.ResourceGroupsServer) + }) resp, err = s.trResourceGroupsServer.Do(req) case "ResourceProvidersClient": - initServer(s, &s.trResourceProvidersServer, func() *ResourceProvidersServerTransport { return NewResourceProvidersServerTransport(&s.srv.ResourceProvidersServer) }) + initServer(s, &s.trResourceProvidersServer, func() *ResourceProvidersServerTransport { + return NewResourceProvidersServerTransport(&s.srv.ResourceProvidersServer) + }) resp, err = s.trResourceProvidersServer.Do(req) case "ResourceTypesClient": - initServer(s, &s.trResourceTypesServer, func() *ResourceTypesServerTransport { return NewResourceTypesServerTransport(&s.srv.ResourceTypesServer) }) + initServer(s, &s.trResourceTypesServer, func() *ResourceTypesServerTransport { + return NewResourceTypesServerTransport(&s.srv.ResourceTypesServer) + }) resp, err = s.trResourceTypesServer.Do(req) case "ResourcesClient": initServer(s, &s.trResourcesServer, func() *ResourcesServerTransport { return NewResourcesServerTransport(&s.srv.ResourcesServer) }) diff --git a/pkg/ucp/api/v20231001preview/fake/zz_generated_time_rfc3339.go b/pkg/ucp/api/v20231001preview/fake/zz_generated_time_rfc3339.go deleted file mode 100644 index 83c75cddc6..0000000000 --- a/pkg/ucp/api/v20231001preview/fake/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - - - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - - - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) - -const ( - utcDateTime = "2006-01-02T15:04:05.999999999" - utcDateTimeJSON = `"` + utcDateTime + `"` - utcDateTimeNoT = "2006-01-02 15:04:05.999999999" - utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` - dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` - dateTimeJSON = `"` + time.RFC3339Nano + `"` - dateTimeJSONNoT = `"` + dateTimeNoT + `"` -) - -type dateTimeRFC3339 time.Time - -func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t dateTimeRFC3339) MarshalText() ([]byte, error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - tzOffset := tzOffsetRegex.Match(data) - hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") - var layout string - if tzOffset && hasT { - layout = dateTimeJSON - } else if tzOffset { - layout = dateTimeJSONNoT - } else if hasT { - layout = utcDateTimeJSON - } else { - layout = utcDateTimeJSONNoT - } - return t.Parse(layout, string(data)) -} - -func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - if len(data) == 0 { - return nil - } - tzOffset := tzOffsetRegex.Match(data) - hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") - var layout string - if tzOffset && hasT { - layout = time.RFC3339Nano - } else if tzOffset { - layout = dateTimeNoT - } else if hasT { - layout = utcDateTime - } else { - layout = utcDateTimeNoT - } - return t.Parse(layout, string(data)) -} - -func (t *dateTimeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = dateTimeRFC3339(p) - return err -} - -func (t dateTimeRFC3339) String() string { - return time.Time(t).Format(time.RFC3339Nano) -} - - -func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*dateTimeRFC3339)(t) -} - -func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || string(data) == "null" { - return nil - } - var aux dateTimeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/pkg/ucp/api/v20231001preview/zz_generated_apiversions_client.go b/pkg/ucp/api/v20231001preview/zz_generated_apiversions_client.go index 7910252031..d22226180e 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_apiversions_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_apiversions_client.go @@ -31,7 +31,7 @@ func NewAPIVersionsClient(credential azcore.TokenCredential, options *arm.Client return nil, err } client := &APIVersionsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -55,7 +55,7 @@ func (client *APIVersionsClient) BeginCreateOrUpdate(ctx context.Context, planeN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIVersionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -118,9 +118,9 @@ func (client *APIVersionsClient) createOrUpdateCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete an API version. @@ -140,7 +140,7 @@ func (client *APIVersionsClient) BeginDelete(ctx context.Context, planeName stri } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIVersionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -282,13 +282,13 @@ func (client *APIVersionsClient) getHandleResponse(resp *http.Response) (APIVers // - resourceProviderName - The resource provider name. This is also the resource provider namespace. Example: 'Applications.Datastores'. // - resourceTypeName - The resource type name. // - options - APIVersionsClientListOptions contains the optional parameters for the APIVersionsClient.NewListPager method. -func (client *APIVersionsClient) NewListPager(planeName string, resourceProviderName string, resourceTypeName string, options *APIVersionsClientListOptions) (*runtime.Pager[APIVersionsClientListResponse]) { +func (client *APIVersionsClient) NewListPager(planeName string, resourceProviderName string, resourceTypeName string, options *APIVersionsClientListOptions) *runtime.Pager[APIVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[APIVersionsClientListResponse]{ More: func(page APIVersionsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIVersionsClientListResponse) (APIVersionsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIVersionsClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIVersionsClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -300,7 +300,7 @@ func (client *APIVersionsClient) NewListPager(planeName string, resourceProvider return APIVersionsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -339,4 +339,3 @@ func (client *APIVersionsClient) listHandleResponse(resp *http.Response) (APIVer } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_awscredentials_client.go b/pkg/ucp/api/v20231001preview/zz_generated_awscredentials_client.go index 20c91b7411..3e1d3bf569 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_awscredentials_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_awscredentials_client.go @@ -31,7 +31,7 @@ func NewAwsCredentialsClient(credential azcore.TokenCredential, options *arm.Cli return nil, err } client := &AwsCredentialsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -84,9 +84,9 @@ func (client *AwsCredentialsClient) createOrUpdateCreateRequest(ctx context.Cont req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -207,13 +207,13 @@ func (client *AwsCredentialsClient) getHandleResponse(resp *http.Response) (AwsC // Generated from API version 2023-10-01-preview // - planeName - The name of AWS plane // - options - AwsCredentialsClientListOptions contains the optional parameters for the AwsCredentialsClient.NewListPager method. -func (client *AwsCredentialsClient) NewListPager(planeName string, options *AwsCredentialsClientListOptions) (*runtime.Pager[AwsCredentialsClientListResponse]) { +func (client *AwsCredentialsClient) NewListPager(planeName string, options *AwsCredentialsClientListOptions) *runtime.Pager[AwsCredentialsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AwsCredentialsClientListResponse]{ More: func(page AwsCredentialsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AwsCredentialsClientListResponse) (AwsCredentialsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AwsCredentialsClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AwsCredentialsClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -225,7 +225,7 @@ func (client *AwsCredentialsClient) NewListPager(planeName string, options *AwsC return AwsCredentialsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -301,9 +301,9 @@ func (client *AwsCredentialsClient) updateCreateRequest(ctx context.Context, pla req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -314,4 +314,3 @@ func (client *AwsCredentialsClient) updateHandleResponse(resp *http.Response) (A } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_awsplanes_client.go b/pkg/ucp/api/v20231001preview/zz_generated_awsplanes_client.go index 18444b3475..c67ae8f31d 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_awsplanes_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_awsplanes_client.go @@ -31,7 +31,7 @@ func NewAwsPlanesClient(credential azcore.TokenCredential, options *arm.ClientOp return nil, err } client := &AwsPlanesClient{ - internal: cl, + internal: cl, } return client, nil } @@ -52,7 +52,7 @@ func (client *AwsPlanesClient) BeginCreateOrUpdate(ctx context.Context, planeNam } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AwsPlanesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -103,9 +103,9 @@ func (client *AwsPlanesClient) createOrUpdateCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a plane @@ -122,7 +122,7 @@ func (client *AwsPlanesClient) BeginDelete(ctx context.Context, planeName string } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AwsPlanesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -234,13 +234,13 @@ func (client *AwsPlanesClient) getHandleResponse(resp *http.Response) (AwsPlanes // // Generated from API version 2023-10-01-preview // - options - AwsPlanesClientListOptions contains the optional parameters for the AwsPlanesClient.NewListPager method. -func (client *AwsPlanesClient) NewListPager(options *AwsPlanesClientListOptions) (*runtime.Pager[AwsPlanesClientListResponse]) { +func (client *AwsPlanesClient) NewListPager(options *AwsPlanesClientListOptions) *runtime.Pager[AwsPlanesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AwsPlanesClientListResponse]{ More: func(page AwsPlanesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AwsPlanesClientListResponse) (AwsPlanesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AwsPlanesClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AwsPlanesClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -252,7 +252,7 @@ func (client *AwsPlanesClient) NewListPager(options *AwsPlanesClientListOptions) return AwsPlanesClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -295,7 +295,7 @@ func (client *AwsPlanesClient) BeginUpdate(ctx context.Context, planeName string } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AwsPlanesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -346,8 +346,7 @@ func (client *AwsPlanesClient) updateCreateRequest(ctx context.Context, planeNam req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_azurecredentials_client.go b/pkg/ucp/api/v20231001preview/zz_generated_azurecredentials_client.go index 10e95efd04..71e35a75a1 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_azurecredentials_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_azurecredentials_client.go @@ -31,7 +31,7 @@ func NewAzureCredentialsClient(credential azcore.TokenCredential, options *arm.C return nil, err } client := &AzureCredentialsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -84,9 +84,9 @@ func (client *AzureCredentialsClient) createOrUpdateCreateRequest(ctx context.Co req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -208,13 +208,13 @@ func (client *AzureCredentialsClient) getHandleResponse(resp *http.Response) (Az // - planeName - The name of the plane // - options - AzureCredentialsClientListOptions contains the optional parameters for the AzureCredentialsClient.NewListPager // method. -func (client *AzureCredentialsClient) NewListPager(planeName string, options *AzureCredentialsClientListOptions) (*runtime.Pager[AzureCredentialsClientListResponse]) { +func (client *AzureCredentialsClient) NewListPager(planeName string, options *AzureCredentialsClientListOptions) *runtime.Pager[AzureCredentialsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AzureCredentialsClientListResponse]{ More: func(page AzureCredentialsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AzureCredentialsClientListResponse) (AzureCredentialsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureCredentialsClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureCredentialsClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -226,7 +226,7 @@ func (client *AzureCredentialsClient) NewListPager(planeName string, options *Az return AzureCredentialsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -302,9 +302,9 @@ func (client *AzureCredentialsClient) updateCreateRequest(ctx context.Context, p req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -315,4 +315,3 @@ func (client *AzureCredentialsClient) updateHandleResponse(resp *http.Response) } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_azureplanes_client.go b/pkg/ucp/api/v20231001preview/zz_generated_azureplanes_client.go index aa247ba136..40dc97a231 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_azureplanes_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_azureplanes_client.go @@ -31,7 +31,7 @@ func NewAzurePlanesClient(credential azcore.TokenCredential, options *arm.Client return nil, err } client := &AzurePlanesClient{ - internal: cl, + internal: cl, } return client, nil } @@ -52,7 +52,7 @@ func (client *AzurePlanesClient) BeginCreateOrUpdate(ctx context.Context, planeN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzurePlanesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -103,9 +103,9 @@ func (client *AzurePlanesClient) createOrUpdateCreateRequest(ctx context.Context req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a plane @@ -122,7 +122,7 @@ func (client *AzurePlanesClient) BeginDelete(ctx context.Context, planeName stri } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzurePlanesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -234,13 +234,13 @@ func (client *AzurePlanesClient) getHandleResponse(resp *http.Response) (AzurePl // // Generated from API version 2023-10-01-preview // - options - AzurePlanesClientListOptions contains the optional parameters for the AzurePlanesClient.NewListPager method. -func (client *AzurePlanesClient) NewListPager(options *AzurePlanesClientListOptions) (*runtime.Pager[AzurePlanesClientListResponse]) { +func (client *AzurePlanesClient) NewListPager(options *AzurePlanesClientListOptions) *runtime.Pager[AzurePlanesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AzurePlanesClientListResponse]{ More: func(page AzurePlanesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AzurePlanesClientListResponse) (AzurePlanesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzurePlanesClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzurePlanesClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -252,7 +252,7 @@ func (client *AzurePlanesClient) NewListPager(options *AzurePlanesClientListOpti return AzurePlanesClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -295,7 +295,7 @@ func (client *AzurePlanesClient) BeginUpdate(ctx context.Context, planeName stri } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzurePlanesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -346,8 +346,7 @@ func (client *AzurePlanesClient) updateCreateRequest(ctx context.Context, planeN req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_client_factory.go b/pkg/ucp/api/v20231001preview/zz_generated_client_factory.go index 7c853971e7..475d154095 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_client_factory.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_client_factory.go @@ -19,7 +19,7 @@ type ClientFactory struct { // The parameter values will be propagated to any client created from this factory. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. -func NewClientFactory( credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { +func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err @@ -112,4 +112,3 @@ func (c *ClientFactory) NewResourcesClient() *ResourcesClient { internal: c.internal, } } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_constants.go b/pkg/ucp/api/v20231001preview/zz_generated_constants.go index d33f42c138..547fbf0d2c 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_constants.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_constants.go @@ -4,24 +4,19 @@ package v20231001preview -const ( - moduleName = "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" - moduleVersion = "v0.0.1" -) - // AWSCredentialKind - AWS credential kind type AWSCredentialKind string const ( -// AWSCredentialKindAccessKey - The AWS Access Key credential + // AWSCredentialKindAccessKey - The AWS Access Key credential AWSCredentialKindAccessKey AWSCredentialKind = "AccessKey" -// AWSCredentialKindIRSA - AWS IAM roles for service accounts. For more information, please see: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html + // AWSCredentialKindIRSA - AWS IAM roles for service accounts. For more information, please see: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html AWSCredentialKindIRSA AWSCredentialKind = "IRSA" ) // PossibleAWSCredentialKindValues returns the possible values for the AWSCredentialKind const type. func PossibleAWSCredentialKindValues() []AWSCredentialKind { - return []AWSCredentialKind{ + return []AWSCredentialKind{ AWSCredentialKindAccessKey, AWSCredentialKindIRSA, } @@ -31,15 +26,15 @@ func PossibleAWSCredentialKindValues() []AWSCredentialKind { type AzureCredentialKind string const ( -// AzureCredentialKindServicePrincipal - The Service Principal Credential + // AzureCredentialKindServicePrincipal - The Service Principal Credential AzureCredentialKindServicePrincipal AzureCredentialKind = "ServicePrincipal" -// AzureCredentialKindWorkloadIdentity - The Workload Identity Credential + // AzureCredentialKindWorkloadIdentity - The Workload Identity Credential AzureCredentialKindWorkloadIdentity AzureCredentialKind = "WorkloadIdentity" ) // PossibleAzureCredentialKindValues returns the possible values for the AzureCredentialKind const type. func PossibleAzureCredentialKindValues() []AzureCredentialKind { - return []AzureCredentialKind{ + return []AzureCredentialKind{ AzureCredentialKindServicePrincipal, AzureCredentialKindWorkloadIdentity, } @@ -49,15 +44,15 @@ func PossibleAzureCredentialKindValues() []AzureCredentialKind { type CreatedByType string const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" + CreatedByTypeUser CreatedByType = "User" ) // PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ + return []CreatedByType{ CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, @@ -69,14 +64,14 @@ func PossibleCreatedByTypeValues() []CreatedByType { type CredentialStorageKind string const ( -// CredentialStorageKindInternal - Internal credential storage + // CredentialStorageKindInternal - Internal credential storage CredentialStorageKindInternal CredentialStorageKind = "Internal" - CredentialStorageKindString CredentialStorageKind = "string" + CredentialStorageKindString CredentialStorageKind = "string" ) // PossibleCredentialStorageKindValues returns the possible values for the CredentialStorageKind const type. func PossibleCredentialStorageKindValues() []CredentialStorageKind { - return []CredentialStorageKind{ + return []CredentialStorageKind{ CredentialStorageKindInternal, CredentialStorageKindString, } @@ -86,27 +81,27 @@ func PossibleCredentialStorageKindValues() []CredentialStorageKind { type ProvisioningState string const ( -// ProvisioningStateAccepted - The resource create request has been accepted + // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" -// ProvisioningStateCanceled - The resource provisioning has been canceled + // ProvisioningStateCanceled - The resource provisioning has been canceled ProvisioningStateCanceled ProvisioningState = "Canceled" -// ProvisioningStateCreating - The resource is being created + // ProvisioningStateCreating - The resource is being created ProvisioningStateCreating ProvisioningState = "Creating" -// ProvisioningStateDeleting - The resource is being deleted + // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" -// ProvisioningStateFailed - The resource provisioning has failed + // ProvisioningStateFailed - The resource provisioning has failed ProvisioningStateFailed ProvisioningState = "Failed" -// ProvisioningStateProvisioning - The resource is being provisioned + // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" -// ProvisioningStateSucceeded - The resource has been successfully provisioned + // ProvisioningStateSucceeded - The resource has been successfully provisioned ProvisioningStateSucceeded ProvisioningState = "Succeeded" -// ProvisioningStateUpdating - The resource is being updated + // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ + return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, @@ -117,4 +112,3 @@ func PossibleProvisioningStateValues() []ProvisioningState { ProvisioningStateUpdating, } } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_interfaces.go b/pkg/ucp/api/v20231001preview/zz_generated_interfaces.go index 5a6e4bf4d0..ad128b32d7 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_interfaces.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_interfaces.go @@ -30,4 +30,3 @@ type CredentialStoragePropertiesClassification interface { // GetCredentialStorageProperties returns the CredentialStorageProperties content of the underlying type. GetCredentialStorageProperties() *CredentialStorageProperties } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_locations_client.go b/pkg/ucp/api/v20231001preview/zz_generated_locations_client.go index 69cd3764d6..9f0c69cbd1 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_locations_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_locations_client.go @@ -31,7 +31,7 @@ func NewLocationsClient(credential azcore.TokenCredential, options *arm.ClientOp return nil, err } client := &LocationsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -55,7 +55,7 @@ func (client *LocationsClient) BeginCreateOrUpdate(ctx context.Context, planeNam } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocationsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -115,9 +115,9 @@ func (client *LocationsClient) createOrUpdateCreateRequest(ctx context.Context, req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a location. The location resource represents a logical location where the resource provider operates. @@ -136,7 +136,7 @@ func (client *LocationsClient) BeginDelete(ctx context.Context, planeName string } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -268,13 +268,13 @@ func (client *LocationsClient) getHandleResponse(resp *http.Response) (Locations // - planeName - The plane name. // - resourceProviderName - The resource provider name. This is also the resource provider namespace. Example: 'Applications.Datastores'. // - options - LocationsClientListOptions contains the optional parameters for the LocationsClient.NewListPager method. -func (client *LocationsClient) NewListPager(planeName string, resourceProviderName string, options *LocationsClientListOptions) (*runtime.Pager[LocationsClientListResponse]) { +func (client *LocationsClient) NewListPager(planeName string, resourceProviderName string, options *LocationsClientListOptions) *runtime.Pager[LocationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LocationsClientListResponse]{ More: func(page LocationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LocationsClientListResponse) (LocationsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocationsClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocationsClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -286,7 +286,7 @@ func (client *LocationsClient) NewListPager(planeName string, resourceProviderNa return LocationsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -321,4 +321,3 @@ func (client *LocationsClient) listHandleResponse(resp *http.Response) (Location } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_models.go b/pkg/ucp/api/v20231001preview/zz_generated_models.go index 8edde1aabf..c1a70f5650 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_models.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_models.go @@ -8,73 +8,73 @@ import "time" // APIVersionProperties - The properties of an API version. type APIVersionProperties struct { -// Schema is the schema for the resource type. + // Schema is the schema for the resource type. Schema map[string]any -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // APIVersionResource - The resource type for defining an API version of a resource type supported by the containing resource // provider. type APIVersionResource struct { -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties *APIVersionProperties -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // APIVersionResourceListResult - The response of a ApiVersionResource list operation. type APIVersionResourceListResult struct { -// REQUIRED; The ApiVersionResource items on this page + // REQUIRED; The ApiVersionResource items on this page Value []*APIVersionResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // AwsAccessKeyCredentialProperties - AWS credential properties for Access Key type AwsAccessKeyCredentialProperties struct { -// REQUIRED; Access key ID for AWS identity + // REQUIRED; Access key ID for AWS identity AccessKeyID *string -// REQUIRED; The AWS credential kind + // REQUIRED; The AWS credential kind Kind *AWSCredentialKind -// REQUIRED; Secret Access Key for AWS identity + // REQUIRED; Secret Access Key for AWS identity SecretAccessKey *string -// REQUIRED; The storage properties + // REQUIRED; The storage properties Storage CredentialStoragePropertiesClassification -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // GetAwsCredentialProperties implements the AwsCredentialPropertiesClassification interface for type AwsAccessKeyCredentialProperties. func (a *AwsAccessKeyCredentialProperties) GetAwsCredentialProperties() *AwsCredentialProperties { return &AwsCredentialProperties{ - Kind: a.Kind, + Kind: a.Kind, ProvisioningState: a.ProvisioningState, } } // AwsCredentialProperties - AWS Credential properties type AwsCredentialProperties struct { -// REQUIRED; The AWS credential kind + // REQUIRED; The AWS credential kind Kind *AWSCredentialKind -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } @@ -84,261 +84,263 @@ func (a *AwsCredentialProperties) GetAwsCredentialProperties() *AwsCredentialPro // AwsCredentialResource - Concrete tracked resource types can be created by aliasing this type using a specific property // type. type AwsCredentialResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties AwsCredentialPropertiesClassification -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // AwsCredentialResourceListResult - The response of a AwsCredentialResource list operation. type AwsCredentialResourceListResult struct { -// REQUIRED; The AwsCredentialResource items on this page + // REQUIRED; The AwsCredentialResource items on this page Value []*AwsCredentialResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // AwsCredentialResourceTagsUpdate - The type used for updating tags in AwsCredentialResource resources. type AwsCredentialResourceTagsUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string } // AwsIRSACredentialProperties - AWS credential properties for IAM Roles for Service Accounts (IRSA) type AwsIRSACredentialProperties struct { -// REQUIRED; The AWS credential kind + // REQUIRED; The AWS credential kind Kind *AWSCredentialKind -// REQUIRED; RoleARN for AWS IRSA identity + // REQUIRED; RoleARN for AWS IRSA identity RoleARN *string -// REQUIRED; The storage properties + // REQUIRED; The storage properties Storage CredentialStoragePropertiesClassification -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // GetAwsCredentialProperties implements the AwsCredentialPropertiesClassification interface for type AwsIRSACredentialProperties. func (a *AwsIRSACredentialProperties) GetAwsCredentialProperties() *AwsCredentialProperties { return &AwsCredentialProperties{ - Kind: a.Kind, + Kind: a.Kind, ProvisioningState: a.ProvisioningState, } } // AwsPlaneResource - The AWS plane resource type AwsPlaneResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *AwsPlaneResourceProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // AwsPlaneResourceListResult - The response of a AwsPlaneResource list operation. type AwsPlaneResourceListResult struct { -// REQUIRED; The AwsPlaneResource items on this page + // REQUIRED; The AwsPlaneResource items on this page Value []*AwsPlaneResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // AwsPlaneResourceProperties - The Plane properties. type AwsPlaneResourceProperties struct { -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // AwsPlaneResourceTagsUpdate - The type used for updating tags in AwsPlaneResource resources. type AwsPlaneResourceTagsUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string } // AzureCredentialProperties - The base properties of Azure Credential type AzureCredentialProperties struct { -// REQUIRED; The kind of Azure credential + // REQUIRED; The kind of Azure credential Kind *AzureCredentialKind -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // GetAzureCredentialProperties implements the AzureCredentialPropertiesClassification interface for type AzureCredentialProperties. -func (a *AzureCredentialProperties) GetAzureCredentialProperties() *AzureCredentialProperties { return a } +func (a *AzureCredentialProperties) GetAzureCredentialProperties() *AzureCredentialProperties { + return a +} // AzureCredentialResource - Represents Azure Credential Resource type AzureCredentialResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties AzureCredentialPropertiesClassification -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // AzureCredentialResourceListResult - The response of a AzureCredentialResource list operation. type AzureCredentialResourceListResult struct { -// REQUIRED; The AzureCredentialResource items on this page + // REQUIRED; The AzureCredentialResource items on this page Value []*AzureCredentialResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // AzureCredentialResourceTagsUpdate - The type used for updating tags in AzureCredentialResource resources. type AzureCredentialResourceTagsUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string } // AzurePlaneResource - The Azure plane resource. type AzurePlaneResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *AzurePlaneResourceProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // AzurePlaneResourceListResult - The response of a AzurePlaneResource list operation. type AzurePlaneResourceListResult struct { -// REQUIRED; The AzurePlaneResource items on this page + // REQUIRED; The AzurePlaneResource items on this page Value []*AzurePlaneResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // AzurePlaneResourceProperties - The Plane properties. type AzurePlaneResourceProperties struct { -// REQUIRED; The URL used to proxy requests. + // REQUIRED; The URL used to proxy requests. URL *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // AzurePlaneResourceTagsUpdate - The type used for updating tags in AzurePlaneResource resources. type AzurePlaneResourceTagsUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string } // AzureServicePrincipalProperties - The properties of Azure Service Principal credential storage type AzureServicePrincipalProperties struct { -// REQUIRED; clientId for ServicePrincipal + // REQUIRED; clientId for ServicePrincipal ClientID *string -// REQUIRED; secret for ServicePrincipal + // REQUIRED; secret for ServicePrincipal ClientSecret *string -// REQUIRED; The kind of Azure credential + // REQUIRED; The kind of Azure credential Kind *AzureCredentialKind -// REQUIRED; The storage properties + // REQUIRED; The storage properties Storage CredentialStoragePropertiesClassification -// REQUIRED; tenantId for ServicePrincipal + // REQUIRED; tenantId for ServicePrincipal TenantID *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // GetAzureCredentialProperties implements the AzureCredentialPropertiesClassification interface for type AzureServicePrincipalProperties. func (a *AzureServicePrincipalProperties) GetAzureCredentialProperties() *AzureCredentialProperties { return &AzureCredentialProperties{ - Kind: a.Kind, + Kind: a.Kind, ProvisioningState: a.ProvisioningState, } } // AzureWorkloadIdentityProperties - The properties of Azure Workload Identity credential storage type AzureWorkloadIdentityProperties struct { -// REQUIRED; clientId for WorkloadIdentity + // REQUIRED; clientId for WorkloadIdentity ClientID *string -// REQUIRED; The kind of Azure credential + // REQUIRED; The kind of Azure credential Kind *AzureCredentialKind -// REQUIRED; The storage properties + // REQUIRED; The storage properties Storage CredentialStoragePropertiesClassification -// REQUIRED; tenantId for WorkloadIdentity + // REQUIRED; tenantId for WorkloadIdentity TenantID *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // GetAzureCredentialProperties implements the AzureCredentialPropertiesClassification interface for type AzureWorkloadIdentityProperties. func (a *AzureWorkloadIdentityProperties) GetAzureCredentialProperties() *AzureCredentialProperties { return &AzureCredentialProperties{ - Kind: a.Kind, + Kind: a.Kind, ProvisioningState: a.ProvisioningState, } } @@ -346,137 +348,139 @@ func (a *AzureWorkloadIdentityProperties) GetAzureCredentialProperties() *AzureC // ComponentsKhmx01SchemasGenericresourceAllof0 - Concrete proxy resource types can be created by aliasing this type using // a specific property type. type ComponentsKhmx01SchemasGenericresourceAllof0 struct { -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties map[string]any -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // CredentialStorageProperties - The base credential storage properties type CredentialStorageProperties struct { -// REQUIRED; The kind of credential storage + // REQUIRED; The kind of credential storage Kind *CredentialStorageKind } // GetCredentialStorageProperties implements the CredentialStoragePropertiesClassification interface for type CredentialStorageProperties. -func (c *CredentialStorageProperties) GetCredentialStorageProperties() *CredentialStorageProperties { return c } +func (c *CredentialStorageProperties) GetCredentialStorageProperties() *CredentialStorageProperties { + return c +} // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { -// READ-ONLY; The additional info. + // READ-ONLY; The additional info. Info map[string]any -// READ-ONLY; The additional info type. + // READ-ONLY; The additional info type. Type *string } // ErrorDetail - The error detail. type ErrorDetail struct { -// READ-ONLY; The error additional info. + // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo -// READ-ONLY; The error code. + // READ-ONLY; The error code. Code *string -// READ-ONLY; The error details. + // READ-ONLY; The error details. Details []*ErrorDetail -// READ-ONLY; The error message. + // READ-ONLY; The error message. Message *string -// READ-ONLY; The error target. + // READ-ONLY; The error target. Target *string } // ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. // (This also follows the OData error response format.). type ErrorResponse struct { -// The error object. + // The error object. Error *ErrorDetail } // GenericPlaneResource - The generic representation of a plane resource type GenericPlaneResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *GenericPlaneResourceProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // GenericPlaneResourceListResult - The response of a GenericPlaneResource list operation. type GenericPlaneResourceListResult struct { -// REQUIRED; The GenericPlaneResource items on this page + // REQUIRED; The GenericPlaneResource items on this page Value []*GenericPlaneResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // GenericPlaneResourceProperties - The properties of the generic representation of a plane resource. type GenericPlaneResourceProperties struct { -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // GenericResource - Represents resource data. type GenericResource struct { -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties map[string]any -// READ-ONLY; The name of resource + // READ-ONLY; The name of resource Name *string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // GenericResourceListResult - The response of a GenericResource list operation. type GenericResourceListResult struct { -// REQUIRED; The GenericResource items on this page + // REQUIRED; The GenericResource items on this page Value []*GenericResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // InternalCredentialStorageProperties - Internal credential storage properties type InternalCredentialStorageProperties struct { -// REQUIRED; The kind of credential storage + // REQUIRED; The kind of credential storage Kind *CredentialStorageKind -// READ-ONLY; The name of secret stored. + // READ-ONLY; The name of secret stored. SecretName *string } @@ -489,344 +493,343 @@ func (i *InternalCredentialStorageProperties) GetCredentialStorageProperties() * // LocationProperties - The properties of a location. type LocationProperties struct { -// Address of a resource provider implementation. + // Address of a resource provider implementation. Address *string -// Configuration for resource types supported by the location. + // Configuration for resource types supported by the location. ResourceTypes map[string]*LocationResourceType -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // LocationResource - The resource type for defining a location of the containing resource provider. The location resource // represents a logical location where the resource provider operates. type LocationResource struct { -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties *LocationProperties -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // LocationResourceListResult - The response of a LocationResource list operation. type LocationResourceListResult struct { -// REQUIRED; The LocationResource items on this page + // REQUIRED; The LocationResource items on this page Value []*LocationResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // LocationResourceType - The configuration for a resource type in a specific location. type LocationResourceType struct { -// The configuration for API versions of a resource type supported by the location. + // The configuration for API versions of a resource type supported by the location. APIVersions map[string]map[string]any } // PagedResourceProviderSummary - Paged collection of ResourceProviderSummary items type PagedResourceProviderSummary struct { -// REQUIRED; The ResourceProviderSummary items on this page + // REQUIRED; The ResourceProviderSummary items on this page Value []*ResourceProviderSummary -// The link to the next page of items + // The link to the next page of items NextLink *string } // PlaneNameParameter - The Plane Name parameter. type PlaneNameParameter struct { -// REQUIRED; The name of the plane + // REQUIRED; The name of the plane PlaneName *string } // ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a // location type ProxyResource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RadiusPlaneResource - The Radius plane resource. type RadiusPlaneResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// REQUIRED; The resource-specific properties for this resource. + // REQUIRED; The resource-specific properties for this resource. Properties *RadiusPlaneResourceProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // RadiusPlaneResourceListResult - The response of a RadiusPlaneResource list operation. type RadiusPlaneResourceListResult struct { -// REQUIRED; The RadiusPlaneResource items on this page + // REQUIRED; The RadiusPlaneResource items on this page Value []*RadiusPlaneResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // RadiusPlaneResourceProperties - The Plane properties. type RadiusPlaneResourceProperties struct { -// REQUIRED; Resource Providers for UCP Native Plane + // REQUIRED; Resource Providers for UCP Native Plane ResourceProviders map[string]*string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // RadiusPlaneResourceTagsUpdate - The type used for updating tags in RadiusPlaneResource resources. type RadiusPlaneResourceTagsUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceGroupProperties - The resource group resource properties type ResourceGroupProperties struct { -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // ResourceGroupResource - The resource group resource type ResourceGroupResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties *ResourceGroupProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceGroupResourceListResult - The response of a ResourceGroupResource list operation. type ResourceGroupResourceListResult struct { -// REQUIRED; The ResourceGroupResource items on this page + // REQUIRED; The ResourceGroupResource items on this page Value []*ResourceGroupResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ResourceGroupResourceTagsUpdate - The type used for updating tags in ResourceGroupResource resources. type ResourceGroupResourceTagsUpdate struct { -// Resource tags. + // Resource tags. Tags map[string]*string } // ResourceProviderProperties - The properties of a resource provider. type ResourceProviderProperties struct { -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // ResourceProviderResource - The resource type for defining a resource provider. type ResourceProviderResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties *ResourceProviderProperties -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceProviderResourceListResult - The response of a ResourceProviderResource list operation. type ResourceProviderResourceListResult struct { -// REQUIRED; The ResourceProviderResource items on this page + // REQUIRED; The ResourceProviderResource items on this page Value []*ResourceProviderResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ResourceProviderSummary - The summary of a resource provider configuration. This type is optimized for querying resource // providers and supported types. type ResourceProviderSummary struct { -// REQUIRED; The resource provider locations. + // REQUIRED; The resource provider locations. Locations map[string]map[string]any -// REQUIRED; The resource provider name. + // REQUIRED; The resource provider name. Name *string -// REQUIRED; The resource types supported by the resource provider. + // REQUIRED; The resource types supported by the resource provider. ResourceTypes map[string]*ResourceProviderSummaryResourceType } // ResourceProviderSummaryResourceType - A resource type and its versions. type ResourceProviderSummaryResourceType struct { -// REQUIRED; API versions supported by the resource type. + // REQUIRED; API versions supported by the resource type. APIVersions map[string]*ResourceTypeSummaryResultAPIVersion -// The resource type capabilities. + // The resource type capabilities. Capabilities []*string -// The default api version for the resource type. + // The default api version for the resource type. DefaultAPIVersion *string -// Description of the resource type. + // Description of the resource type. Description *string } // ResourceTypeProperties - The properties of a resource type. type ResourceTypeProperties struct { -// The resource type capabilities. + // The resource type capabilities. Capabilities []*string -// The default api version for the resource type. + // The default api version for the resource type. DefaultAPIVersion *string -// Description of the resource type. + // Description of the resource type. Description *string -// READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; The status of the asynchronous operation. ProvisioningState *ProvisioningState } // ResourceTypeResource - The resource type for defining a resource type supported by the containing resource provider. type ResourceTypeResource struct { -// The resource-specific properties for this resource. + // The resource-specific properties for this resource. Properties *ResourceTypeProperties -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } // ResourceTypeResourceListResult - The response of a ResourceTypeResource list operation. type ResourceTypeResourceListResult struct { -// REQUIRED; The ResourceTypeResource items on this page + // REQUIRED; The ResourceTypeResource items on this page Value []*ResourceTypeResource -// The link to the next page of items + // The link to the next page of items NextLink *string } // ResourceTypeSummaryResultAPIVersion - The configuration of a resource type API version. type ResourceTypeSummaryResultAPIVersion struct { -// Schema holds the resource type definitions for this API version. + // Schema holds the resource type definitions for this API version. Schema map[string]any } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { -// The timestamp of resource creation (UTC). + // The timestamp of resource creation (UTC). CreatedAt *time.Time -// The identity that created the resource. + // The identity that created the resource. CreatedBy *string -// The type of identity that created the resource. + // The type of identity that created the resource. CreatedByType *CreatedByType -// The timestamp of resource last modification (UTC) + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time -// The identity that last modified the resource. + // The identity that last modified the resource. LastModifiedBy *string -// The type of identity that last modified the resource. + // The type of identity that last modified the resource. LastModifiedByType *CreatedByType } // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { -// REQUIRED; The geo-location where the resource lives + // REQUIRED; The geo-location where the resource lives Location *string -// Resource tags. + // Resource tags. Tags map[string]*string -// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string -// READ-ONLY; The name of the resource + // READ-ONLY; The name of the resource Name *string -// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData -// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_models_serde.go b/pkg/ucp/api/v20231001preview/zz_generated_models_serde.go index e1a8e7cfd8..eef8cacd0e 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_models_serde.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_models_serde.go @@ -29,10 +29,10 @@ func (a *APIVersionProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "schema": - err = unpopulate(val, "Schema", &a.Schema) + err = unpopulate(val, "Schema", &a.Schema) delete(rawMsg, key) } if err != nil { @@ -63,19 +63,19 @@ func (a *APIVersionResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -103,10 +103,10 @@ func (a *APIVersionResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -137,16 +137,16 @@ func (a *AwsAccessKeyCredentialProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "accessKeyId": - err = unpopulate(val, "AccessKeyID", &a.AccessKeyID) + err = unpopulate(val, "AccessKeyID", &a.AccessKeyID) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "secretAccessKey": - err = unpopulate(val, "SecretAccessKey", &a.SecretAccessKey) + err = unpopulate(val, "SecretAccessKey", &a.SecretAccessKey) delete(rawMsg, key) case "storage": a.Storage, err = unmarshalCredentialStoragePropertiesClassification(val) @@ -177,10 +177,10 @@ func (a *AwsCredentialProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -213,25 +213,25 @@ func (a *AwsCredentialResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": a.Properties, err = unmarshalAwsCredentialPropertiesClassification(val) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -259,10 +259,10 @@ func (a *AwsCredentialResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -289,7 +289,7 @@ func (a *AwsCredentialResourceTagsUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) } if err != nil { @@ -319,13 +319,13 @@ func (a *AwsIRSACredentialProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "roleARN": - err = unpopulate(val, "RoleARN", &a.RoleARN) + err = unpopulate(val, "RoleARN", &a.RoleARN) delete(rawMsg, key) case "storage": a.Storage, err = unmarshalCredentialStoragePropertiesClassification(val) @@ -361,25 +361,25 @@ func (a *AwsPlaneResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -407,10 +407,10 @@ func (a *AwsPlaneResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -437,7 +437,7 @@ func (a *AwsPlaneResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -464,7 +464,7 @@ func (a *AwsPlaneResourceTagsUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) } if err != nil { @@ -492,10 +492,10 @@ func (a *AzureCredentialProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -528,25 +528,25 @@ func (a *AzureCredentialResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": a.Properties, err = unmarshalAzureCredentialPropertiesClassification(val) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -574,10 +574,10 @@ func (a *AzureCredentialResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -604,7 +604,7 @@ func (a *AzureCredentialResourceTagsUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) } if err != nil { @@ -637,25 +637,25 @@ func (a *AzurePlaneResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &a.Location) + err = unpopulate(val, "Location", &a.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &a.Properties) + err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { @@ -683,10 +683,10 @@ func (a *AzurePlaneResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &a.Value) + err = unpopulate(val, "Value", &a.Value) delete(rawMsg, key) } if err != nil { @@ -714,10 +714,10 @@ func (a *AzurePlaneResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "url": - err = unpopulate(val, "URL", &a.URL) + err = unpopulate(val, "URL", &a.URL) delete(rawMsg, key) } if err != nil { @@ -744,7 +744,7 @@ func (a *AzurePlaneResourceTagsUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "tags": - err = unpopulate(val, "Tags", &a.Tags) + err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) } if err != nil { @@ -776,22 +776,22 @@ func (a *AzureServicePrincipalProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "clientId": - err = unpopulate(val, "ClientID", &a.ClientID) + err = unpopulate(val, "ClientID", &a.ClientID) delete(rawMsg, key) case "clientSecret": - err = unpopulate(val, "ClientSecret", &a.ClientSecret) + err = unpopulate(val, "ClientSecret", &a.ClientSecret) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "storage": a.Storage, err = unmarshalCredentialStoragePropertiesClassification(val) delete(rawMsg, key) case "tenantId": - err = unpopulate(val, "TenantID", &a.TenantID) + err = unpopulate(val, "TenantID", &a.TenantID) delete(rawMsg, key) } if err != nil { @@ -822,19 +822,19 @@ func (a *AzureWorkloadIdentityProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "clientId": - err = unpopulate(val, "ClientID", &a.ClientID) + err = unpopulate(val, "ClientID", &a.ClientID) delete(rawMsg, key) case "kind": - err = unpopulate(val, "Kind", &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) case "storage": a.Storage, err = unmarshalCredentialStoragePropertiesClassification(val) delete(rawMsg, key) case "tenantId": - err = unpopulate(val, "TenantID", &a.TenantID) + err = unpopulate(val, "TenantID", &a.TenantID) delete(rawMsg, key) } if err != nil { @@ -865,19 +865,19 @@ func (c *ComponentsKhmx01SchemasGenericresourceAllof0) UnmarshalJSON(data []byte var err error switch key { case "id": - err = unpopulate(val, "ID", &c.ID) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &c.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &c.Properties) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &c.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -904,7 +904,7 @@ func (c *CredentialStorageProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &c.Kind) + err = unpopulate(val, "Kind", &c.Kind) delete(rawMsg, key) } if err != nil { @@ -932,10 +932,10 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { var err error switch key { case "info": - err = unpopulate(val, "Info", &e.Info) + err = unpopulate(val, "Info", &e.Info) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &e.Type) + err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) } if err != nil { @@ -966,19 +966,19 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { var err error switch key { case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) delete(rawMsg, key) case "code": - err = unpopulate(val, "Code", &e.Code) + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) case "details": - err = unpopulate(val, "Details", &e.Details) + err = unpopulate(val, "Details", &e.Details) delete(rawMsg, key) case "message": - err = unpopulate(val, "Message", &e.Message) + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) case "target": - err = unpopulate(val, "Target", &e.Target) + err = unpopulate(val, "Target", &e.Target) delete(rawMsg, key) } if err != nil { @@ -1005,7 +1005,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "error": - err = unpopulate(val, "Error", &e.Error) + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -1038,25 +1038,25 @@ func (g *GenericPlaneResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &g.ID) + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &g.Location) + err = unpopulate(val, "Location", &g.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &g.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &g.Tags) + err = unpopulate(val, "Tags", &g.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) } if err != nil { @@ -1084,10 +1084,10 @@ func (g *GenericPlaneResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) + err = unpopulate(val, "NextLink", &g.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) + err = unpopulate(val, "Value", &g.Value) delete(rawMsg, key) } if err != nil { @@ -1114,7 +1114,7 @@ func (g *GenericPlaneResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -1145,19 +1145,19 @@ func (g *GenericResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &g.ID) + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &g.Name) + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &g.Properties) + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + err = unpopulate(val, "SystemData", &g.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &g.Type) + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) } if err != nil { @@ -1185,10 +1185,10 @@ func (g *GenericResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) + err = unpopulate(val, "NextLink", &g.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &g.Value) + err = unpopulate(val, "Value", &g.Value) delete(rawMsg, key) } if err != nil { @@ -1216,10 +1216,10 @@ func (i *InternalCredentialStorageProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "kind": - err = unpopulate(val, "Kind", &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "secretName": - err = unpopulate(val, "SecretName", &i.SecretName) + err = unpopulate(val, "SecretName", &i.SecretName) delete(rawMsg, key) } if err != nil { @@ -1248,13 +1248,13 @@ func (l *LocationProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "address": - err = unpopulate(val, "Address", &l.Address) + err = unpopulate(val, "Address", &l.Address) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) delete(rawMsg, key) case "resourceTypes": - err = unpopulate(val, "ResourceTypes", &l.ResourceTypes) + err = unpopulate(val, "ResourceTypes", &l.ResourceTypes) delete(rawMsg, key) } if err != nil { @@ -1285,19 +1285,19 @@ func (l *LocationResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &l.ID) + err = unpopulate(val, "ID", &l.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &l.Name) + err = unpopulate(val, "Name", &l.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &l.Properties) + err = unpopulate(val, "Properties", &l.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &l.SystemData) + err = unpopulate(val, "SystemData", &l.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &l.Type) + err = unpopulate(val, "Type", &l.Type) delete(rawMsg, key) } if err != nil { @@ -1325,10 +1325,10 @@ func (l *LocationResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) + err = unpopulate(val, "NextLink", &l.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &l.Value) + err = unpopulate(val, "Value", &l.Value) delete(rawMsg, key) } if err != nil { @@ -1355,7 +1355,7 @@ func (l *LocationResourceType) UnmarshalJSON(data []byte) error { var err error switch key { case "apiVersions": - err = unpopulate(val, "APIVersions", &l.APIVersions) + err = unpopulate(val, "APIVersions", &l.APIVersions) delete(rawMsg, key) } if err != nil { @@ -1383,10 +1383,10 @@ func (p *PagedResourceProviderSummary) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) + err = unpopulate(val, "NextLink", &p.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &p.Value) + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { @@ -1413,7 +1413,7 @@ func (p *PlaneNameParameter) UnmarshalJSON(data []byte) error { var err error switch key { case "planeName": - err = unpopulate(val, "PlaneName", &p.PlaneName) + err = unpopulate(val, "PlaneName", &p.PlaneName) delete(rawMsg, key) } if err != nil { @@ -1443,16 +1443,16 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &p.ID) + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &p.Name) + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) + err = unpopulate(val, "SystemData", &p.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &p.Type) + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { @@ -1485,25 +1485,25 @@ func (r *RadiusPlaneResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &r.Location) + err = unpopulate(val, "Location", &r.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1531,10 +1531,10 @@ func (r *RadiusPlaneResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -1562,10 +1562,10 @@ func (r *RadiusPlaneResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) case "resourceProviders": - err = unpopulate(val, "ResourceProviders", &r.ResourceProviders) + err = unpopulate(val, "ResourceProviders", &r.ResourceProviders) delete(rawMsg, key) } if err != nil { @@ -1592,7 +1592,7 @@ func (r *RadiusPlaneResourceTagsUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) } if err != nil { @@ -1622,16 +1622,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1658,7 +1658,7 @@ func (r *ResourceGroupProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -1691,25 +1691,25 @@ func (r *ResourceGroupResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &r.Location) + err = unpopulate(val, "Location", &r.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1737,10 +1737,10 @@ func (r *ResourceGroupResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -1767,7 +1767,7 @@ func (r *ResourceGroupResourceTagsUpdate) UnmarshalJSON(data []byte) error { var err error switch key { case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) } if err != nil { @@ -1794,7 +1794,7 @@ func (r *ResourceProviderProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -1827,25 +1827,25 @@ func (r *ResourceProviderResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &r.Location) + err = unpopulate(val, "Location", &r.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &r.Tags) + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -1873,10 +1873,10 @@ func (r *ResourceProviderResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -1905,13 +1905,13 @@ func (r *ResourceProviderSummary) UnmarshalJSON(data []byte) error { var err error switch key { case "locations": - err = unpopulate(val, "Locations", &r.Locations) + err = unpopulate(val, "Locations", &r.Locations) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "resourceTypes": - err = unpopulate(val, "ResourceTypes", &r.ResourceTypes) + err = unpopulate(val, "ResourceTypes", &r.ResourceTypes) delete(rawMsg, key) } if err != nil { @@ -1941,16 +1941,16 @@ func (r *ResourceProviderSummaryResourceType) UnmarshalJSON(data []byte) error { var err error switch key { case "apiVersions": - err = unpopulate(val, "APIVersions", &r.APIVersions) + err = unpopulate(val, "APIVersions", &r.APIVersions) delete(rawMsg, key) case "capabilities": - err = unpopulate(val, "Capabilities", &r.Capabilities) + err = unpopulate(val, "Capabilities", &r.Capabilities) delete(rawMsg, key) case "defaultApiVersion": - err = unpopulate(val, "DefaultAPIVersion", &r.DefaultAPIVersion) + err = unpopulate(val, "DefaultAPIVersion", &r.DefaultAPIVersion) delete(rawMsg, key) case "description": - err = unpopulate(val, "Description", &r.Description) + err = unpopulate(val, "Description", &r.Description) delete(rawMsg, key) } if err != nil { @@ -1980,16 +1980,16 @@ func (r *ResourceTypeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "capabilities": - err = unpopulate(val, "Capabilities", &r.Capabilities) + err = unpopulate(val, "Capabilities", &r.Capabilities) delete(rawMsg, key) case "defaultApiVersion": - err = unpopulate(val, "DefaultAPIVersion", &r.DefaultAPIVersion) + err = unpopulate(val, "DefaultAPIVersion", &r.DefaultAPIVersion) delete(rawMsg, key) case "description": - err = unpopulate(val, "Description", &r.Description) + err = unpopulate(val, "Description", &r.Description) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -2020,19 +2020,19 @@ func (r *ResourceTypeResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &r.ID) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &r.Properties) + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &r.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { @@ -2060,10 +2060,10 @@ func (r *ResourceTypeResourceListResult) UnmarshalJSON(data []byte) error { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &r.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { @@ -2090,7 +2090,7 @@ func (r *ResourceTypeSummaryResultAPIVersion) UnmarshalJSON(data []byte) error { var err error switch key { case "schema": - err = unpopulate(val, "Schema", &r.Schema) + err = unpopulate(val, "Schema", &r.Schema) delete(rawMsg, key) } if err != nil { @@ -2122,22 +2122,22 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { @@ -2169,22 +2169,22 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { var err error switch key { case "id": - err = unpopulate(val, "ID", &t.ID) + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &t.Location) + err = unpopulate(val, "Location", &t.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &t.Name) + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) + err = unpopulate(val, "SystemData", &t.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &t.Tags) + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &t.Type) + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -2213,4 +2213,3 @@ func unpopulate(data json.RawMessage, fn string, v any) error { } return nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_options.go b/pkg/ucp/api/v20231001preview/zz_generated_options.go index 328b389ef5..62c3f69e9c 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_options.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_options.go @@ -7,13 +7,13 @@ package v20231001preview // APIVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIVersionsClient.BeginCreateOrUpdate // method. type APIVersionsClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // APIVersionsClientBeginDeleteOptions contains the optional parameters for the APIVersionsClient.BeginDelete method. type APIVersionsClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -56,19 +56,19 @@ type AwsCredentialsClientUpdateOptions struct { // AwsPlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the AwsPlanesClient.BeginCreateOrUpdate // method. type AwsPlanesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // AwsPlanesClientBeginDeleteOptions contains the optional parameters for the AwsPlanesClient.BeginDelete method. type AwsPlanesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // AwsPlanesClientBeginUpdateOptions contains the optional parameters for the AwsPlanesClient.BeginUpdate method. type AwsPlanesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -111,19 +111,19 @@ type AzureCredentialsClientUpdateOptions struct { // AzurePlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the AzurePlanesClient.BeginCreateOrUpdate // method. type AzurePlanesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // AzurePlanesClientBeginDeleteOptions contains the optional parameters for the AzurePlanesClient.BeginDelete method. type AzurePlanesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // AzurePlanesClientBeginUpdateOptions contains the optional parameters for the AzurePlanesClient.BeginUpdate method. type AzurePlanesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -140,13 +140,13 @@ type AzurePlanesClientListOptions struct { // LocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the LocationsClient.BeginCreateOrUpdate // method. type LocationsClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // LocationsClientBeginDeleteOptions contains the optional parameters for the LocationsClient.BeginDelete method. type LocationsClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -168,19 +168,19 @@ type PlanesClientListPlanesOptions struct { // RadiusPlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the RadiusPlanesClient.BeginCreateOrUpdate // method. type RadiusPlanesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // RadiusPlanesClientBeginDeleteOptions contains the optional parameters for the RadiusPlanesClient.BeginDelete method. type RadiusPlanesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // RadiusPlanesClientBeginUpdateOptions contains the optional parameters for the RadiusPlanesClient.BeginUpdate method. type RadiusPlanesClientBeginUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -223,14 +223,14 @@ type ResourceGroupsClientUpdateOptions struct { // ResourceProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceProvidersClient.BeginCreateOrUpdate // method. type ResourceProvidersClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ResourceProvidersClientBeginDeleteOptions contains the optional parameters for the ResourceProvidersClient.BeginDelete // method. type ResourceProvidersClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -259,13 +259,13 @@ type ResourceProvidersClientListProviderSummariesOptions struct { // ResourceTypesClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceTypesClient.BeginCreateOrUpdate // method. type ResourceTypesClientBeginCreateOrUpdateOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ResourceTypesClientBeginDeleteOptions contains the optional parameters for the ResourceTypesClient.BeginDelete method. type ResourceTypesClientBeginDeleteOptions struct { -// Resumes the long-running operation from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -283,4 +283,3 @@ type ResourceTypesClientListOptions struct { type ResourcesClientListOptions struct { // placeholder for future optional parameters } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_planes_client.go b/pkg/ucp/api/v20231001preview/zz_generated_planes_client.go index 3b17a63a8f..2f4d1c0658 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_planes_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_planes_client.go @@ -28,7 +28,7 @@ func NewPlanesClient(credential azcore.TokenCredential, options *arm.ClientOptio return nil, err } client := &PlanesClient{ - internal: cl, + internal: cl, } return client, nil } @@ -37,13 +37,13 @@ func NewPlanesClient(credential azcore.TokenCredential, options *arm.ClientOptio // // Generated from API version 2023-10-01-preview // - options - PlanesClientListPlanesOptions contains the optional parameters for the PlanesClient.NewListPlanesPager method. -func (client *PlanesClient) NewListPlanesPager(options *PlanesClientListPlanesOptions) (*runtime.Pager[PlanesClientListPlanesResponse]) { +func (client *PlanesClient) NewListPlanesPager(options *PlanesClientListPlanesOptions) *runtime.Pager[PlanesClientListPlanesResponse] { return runtime.NewPager(runtime.PagingHandler[PlanesClientListPlanesResponse]{ More: func(page PlanesClientListPlanesResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlanesClientListPlanesResponse) (PlanesClientListPlanesResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlanesClient.NewListPlanesPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlanesClient.NewListPlanesPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -55,7 +55,7 @@ func (client *PlanesClient) NewListPlanesPager(options *PlanesClientListPlanesOp return PlanesClientListPlanesResponse{}, err } return client.listPlanesHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -82,4 +82,3 @@ func (client *PlanesClient) listPlanesHandleResponse(resp *http.Response) (Plane } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_polymorphic_helpers.go b/pkg/ucp/api/v20231001preview/zz_generated_polymorphic_helpers.go index 18232f5f30..835b7ab396 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_polymorphic_helpers.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_polymorphic_helpers.go @@ -72,4 +72,3 @@ func unmarshalCredentialStoragePropertiesClassification(rawMsg json.RawMessage) } return b, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_radiusplanes_client.go b/pkg/ucp/api/v20231001preview/zz_generated_radiusplanes_client.go index cc2b4d362f..c363165baf 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_radiusplanes_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_radiusplanes_client.go @@ -31,7 +31,7 @@ func NewRadiusPlanesClient(credential azcore.TokenCredential, options *arm.Clien return nil, err } client := &RadiusPlanesClient{ - internal: cl, + internal: cl, } return client, nil } @@ -52,7 +52,7 @@ func (client *RadiusPlanesClient) BeginCreateOrUpdate(ctx context.Context, plane } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RadiusPlanesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -103,9 +103,9 @@ func (client *RadiusPlanesClient) createOrUpdateCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a plane @@ -123,7 +123,7 @@ func (client *RadiusPlanesClient) BeginDelete(ctx context.Context, planeName str } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RadiusPlanesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -235,13 +235,13 @@ func (client *RadiusPlanesClient) getHandleResponse(resp *http.Response) (Radius // // Generated from API version 2023-10-01-preview // - options - RadiusPlanesClientListOptions contains the optional parameters for the RadiusPlanesClient.NewListPager method. -func (client *RadiusPlanesClient) NewListPager(options *RadiusPlanesClientListOptions) (*runtime.Pager[RadiusPlanesClientListResponse]) { +func (client *RadiusPlanesClient) NewListPager(options *RadiusPlanesClientListOptions) *runtime.Pager[RadiusPlanesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RadiusPlanesClientListResponse]{ More: func(page RadiusPlanesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RadiusPlanesClientListResponse) (RadiusPlanesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RadiusPlanesClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RadiusPlanesClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -253,7 +253,7 @@ func (client *RadiusPlanesClient) NewListPager(options *RadiusPlanesClientListOp return RadiusPlanesClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -297,7 +297,7 @@ func (client *RadiusPlanesClient) BeginUpdate(ctx context.Context, planeName str } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RadiusPlanesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -348,8 +348,7 @@ func (client *RadiusPlanesClient) updateCreateRequest(ctx context.Context, plane req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_resourcegroups_client.go b/pkg/ucp/api/v20231001preview/zz_generated_resourcegroups_client.go index 04d4d452e6..3796ab933f 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_resourcegroups_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_resourcegroups_client.go @@ -31,7 +31,7 @@ func NewResourceGroupsClient(credential azcore.TokenCredential, options *arm.Cli return nil, err } client := &ResourceGroupsClient{ - internal: cl, + internal: cl, } return client, nil } @@ -87,9 +87,9 @@ func (client *ResourceGroupsClient) createOrUpdateCreateRequest(ctx context.Cont req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -216,13 +216,13 @@ func (client *ResourceGroupsClient) getHandleResponse(resp *http.Response) (Reso // Generated from API version 2023-10-01-preview // - planeName - The plane name. // - options - ResourceGroupsClientListOptions contains the optional parameters for the ResourceGroupsClient.NewListPager method. -func (client *ResourceGroupsClient) NewListPager(planeName string, options *ResourceGroupsClientListOptions) (*runtime.Pager[ResourceGroupsClientListResponse]) { +func (client *ResourceGroupsClient) NewListPager(planeName string, options *ResourceGroupsClientListOptions) *runtime.Pager[ResourceGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ResourceGroupsClientListResponse]{ More: func(page ResourceGroupsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceGroupsClientListResponse) (ResourceGroupsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGroupsClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGroupsClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -234,7 +234,7 @@ func (client *ResourceGroupsClient) NewListPager(planeName string, options *Reso return ResourceGroupsClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -316,9 +316,9 @@ func (client *ResourceGroupsClient) updateCreateRequest(ctx context.Context, pla req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -329,4 +329,3 @@ func (client *ResourceGroupsClient) updateHandleResponse(resp *http.Response) (R } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_resourceproviders_client.go b/pkg/ucp/api/v20231001preview/zz_generated_resourceproviders_client.go index 964c587bb8..6d8625b6e0 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_resourceproviders_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_resourceproviders_client.go @@ -31,7 +31,7 @@ func NewResourceProvidersClient(credential azcore.TokenCredential, options *arm. return nil, err } client := &ResourceProvidersClient{ - internal: cl, + internal: cl, } return client, nil } @@ -53,7 +53,7 @@ func (client *ResourceProvidersClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceProvidersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -108,9 +108,9 @@ func (client *ResourceProvidersClient) createOrUpdateCreateRequest(ctx context.C req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a resource provider @@ -129,7 +129,7 @@ func (client *ResourceProvidersClient) BeginDelete(ctx context.Context, planeNam } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceProvidersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -314,13 +314,13 @@ func (client *ResourceProvidersClient) getProviderSummaryHandleResponse(resp *ht // - planeName - The plane name. // - options - ResourceProvidersClientListOptions contains the optional parameters for the ResourceProvidersClient.NewListPager // method. -func (client *ResourceProvidersClient) NewListPager(planeName string, options *ResourceProvidersClientListOptions) (*runtime.Pager[ResourceProvidersClientListResponse]) { +func (client *ResourceProvidersClient) NewListPager(planeName string, options *ResourceProvidersClientListOptions) *runtime.Pager[ResourceProvidersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ResourceProvidersClientListResponse]{ More: func(page ResourceProvidersClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceProvidersClientListResponse) (ResourceProvidersClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceProvidersClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceProvidersClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -332,7 +332,7 @@ func (client *ResourceProvidersClient) NewListPager(planeName string, options *R return ResourceProvidersClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -371,13 +371,13 @@ func (client *ResourceProvidersClient) listHandleResponse(resp *http.Response) ( // - planeName - The plane name. // - options - ResourceProvidersClientListProviderSummariesOptions contains the optional parameters for the ResourceProvidersClient.NewListProviderSummariesPager // method. -func (client *ResourceProvidersClient) NewListProviderSummariesPager(planeName string, options *ResourceProvidersClientListProviderSummariesOptions) (*runtime.Pager[ResourceProvidersClientListProviderSummariesResponse]) { +func (client *ResourceProvidersClient) NewListProviderSummariesPager(planeName string, options *ResourceProvidersClientListProviderSummariesOptions) *runtime.Pager[ResourceProvidersClientListProviderSummariesResponse] { return runtime.NewPager(runtime.PagingHandler[ResourceProvidersClientListProviderSummariesResponse]{ More: func(page ResourceProvidersClientListProviderSummariesResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceProvidersClientListProviderSummariesResponse) (ResourceProvidersClientListProviderSummariesResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceProvidersClient.NewListProviderSummariesPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceProvidersClient.NewListProviderSummariesPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -389,7 +389,7 @@ func (client *ResourceProvidersClient) NewListProviderSummariesPager(planeName s return ResourceProvidersClientListProviderSummariesResponse{}, err } return client.listProviderSummariesHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -420,4 +420,3 @@ func (client *ResourceProvidersClient) listProviderSummariesHandleResponse(resp } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_resources_client.go b/pkg/ucp/api/v20231001preview/zz_generated_resources_client.go index 6c331970ad..fd68d294c3 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_resources_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_resources_client.go @@ -31,7 +31,7 @@ func NewResourcesClient(credential azcore.TokenCredential, options *arm.ClientOp return nil, err } client := &ResourcesClient{ - internal: cl, + internal: cl, } return client, nil } @@ -42,13 +42,13 @@ func NewResourcesClient(credential azcore.TokenCredential, options *arm.ClientOp // - planeName - The plane name. // - resourceGroupName - The name of resource group // - options - ResourcesClientListOptions contains the optional parameters for the ResourcesClient.NewListPager method. -func (client *ResourcesClient) NewListPager(planeName string, resourceGroupName string, options *ResourcesClientListOptions) (*runtime.Pager[ResourcesClientListResponse]) { +func (client *ResourcesClient) NewListPager(planeName string, resourceGroupName string, options *ResourcesClientListOptions) *runtime.Pager[ResourcesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ResourcesClientListResponse]{ More: func(page ResourcesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourcesClientListResponse) (ResourcesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourcesClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourcesClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -60,7 +60,7 @@ func (client *ResourcesClient) NewListPager(planeName string, resourceGroupName return ResourcesClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -95,4 +95,3 @@ func (client *ResourcesClient) listHandleResponse(resp *http.Response) (Resource } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_resourcetypes_client.go b/pkg/ucp/api/v20231001preview/zz_generated_resourcetypes_client.go index d3dba9d47d..63ab2b33f6 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_resourcetypes_client.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_resourcetypes_client.go @@ -31,7 +31,7 @@ func NewResourceTypesClient(credential azcore.TokenCredential, options *arm.Clie return nil, err } client := &ResourceTypesClient{ - internal: cl, + internal: cl, } return client, nil } @@ -54,7 +54,7 @@ func (client *ResourceTypesClient) BeginCreateOrUpdate(ctx context.Context, plan } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceTypesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -113,9 +113,9 @@ func (client *ResourceTypesClient) createOrUpdateCreateRequest(ctx context.Conte req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err -} -; return req, nil + return nil, err + } + return req, nil } // BeginDelete - Delete a resource type @@ -135,7 +135,7 @@ func (client *ResourceTypesClient) BeginDelete(ctx context.Context, planeName st } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceTypesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -267,13 +267,13 @@ func (client *ResourceTypesClient) getHandleResponse(resp *http.Response) (Resou // - planeName - The plane name. // - resourceProviderName - The resource provider name. This is also the resource provider namespace. Example: 'Applications.Datastores'. // - options - ResourceTypesClientListOptions contains the optional parameters for the ResourceTypesClient.NewListPager method. -func (client *ResourceTypesClient) NewListPager(planeName string, resourceProviderName string, options *ResourceTypesClientListOptions) (*runtime.Pager[ResourceTypesClientListResponse]) { +func (client *ResourceTypesClient) NewListPager(planeName string, resourceProviderName string, options *ResourceTypesClientListOptions) *runtime.Pager[ResourceTypesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ResourceTypesClientListResponse]{ More: func(page ResourceTypesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceTypesClientListResponse) (ResourceTypesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceTypesClient.NewListPager") + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceTypesClient.NewListPager") nextLink := "" if page != nil { nextLink = *page.NextLink @@ -285,7 +285,7 @@ func (client *ResourceTypesClient) NewListPager(planeName string, resourceProvid return ResourceTypesClientListResponse{}, err } return client.listHandleResponse(resp) - }, + }, Tracer: client.internal.Tracer(), }) } @@ -320,4 +320,3 @@ func (client *ResourceTypesClient) listHandleResponse(resp *http.Response) (Reso } return result, nil } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_responses.go b/pkg/ucp/api/v20231001preview/zz_generated_responses.go index 6182837a98..6d40a87ea7 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_responses.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_responses.go @@ -6,7 +6,7 @@ package v20231001preview // APIVersionsClientCreateOrUpdateResponse contains the response from method APIVersionsClient.BeginCreateOrUpdate. type APIVersionsClientCreateOrUpdateResponse struct { -// The resource type for defining an API version of a resource type supported by the containing resource provider. + // The resource type for defining an API version of a resource type supported by the containing resource provider. APIVersionResource } @@ -17,19 +17,19 @@ type APIVersionsClientDeleteResponse struct { // APIVersionsClientGetResponse contains the response from method APIVersionsClient.Get. type APIVersionsClientGetResponse struct { -// The resource type for defining an API version of a resource type supported by the containing resource provider. + // The resource type for defining an API version of a resource type supported by the containing resource provider. APIVersionResource } // APIVersionsClientListResponse contains the response from method APIVersionsClient.NewListPager. type APIVersionsClientListResponse struct { -// The response of a ApiVersionResource list operation. + // The response of a ApiVersionResource list operation. APIVersionResourceListResult } // AwsCredentialsClientCreateOrUpdateResponse contains the response from method AwsCredentialsClient.CreateOrUpdate. type AwsCredentialsClientCreateOrUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. AwsCredentialResource } @@ -40,25 +40,25 @@ type AwsCredentialsClientDeleteResponse struct { // AwsCredentialsClientGetResponse contains the response from method AwsCredentialsClient.Get. type AwsCredentialsClientGetResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. AwsCredentialResource } // AwsCredentialsClientListResponse contains the response from method AwsCredentialsClient.NewListPager. type AwsCredentialsClientListResponse struct { -// The response of a AwsCredentialResource list operation. + // The response of a AwsCredentialResource list operation. AwsCredentialResourceListResult } // AwsCredentialsClientUpdateResponse contains the response from method AwsCredentialsClient.Update. type AwsCredentialsClientUpdateResponse struct { -// Concrete tracked resource types can be created by aliasing this type using a specific property type. + // Concrete tracked resource types can be created by aliasing this type using a specific property type. AwsCredentialResource } // AwsPlanesClientCreateOrUpdateResponse contains the response from method AwsPlanesClient.BeginCreateOrUpdate. type AwsPlanesClientCreateOrUpdateResponse struct { -// The AWS plane resource + // The AWS plane resource AwsPlaneResource } @@ -69,25 +69,25 @@ type AwsPlanesClientDeleteResponse struct { // AwsPlanesClientGetResponse contains the response from method AwsPlanesClient.Get. type AwsPlanesClientGetResponse struct { -// The AWS plane resource + // The AWS plane resource AwsPlaneResource } // AwsPlanesClientListResponse contains the response from method AwsPlanesClient.NewListPager. type AwsPlanesClientListResponse struct { -// The response of a AwsPlaneResource list operation. + // The response of a AwsPlaneResource list operation. AwsPlaneResourceListResult } // AwsPlanesClientUpdateResponse contains the response from method AwsPlanesClient.BeginUpdate. type AwsPlanesClientUpdateResponse struct { -// The AWS plane resource + // The AWS plane resource AwsPlaneResource } // AzureCredentialsClientCreateOrUpdateResponse contains the response from method AzureCredentialsClient.CreateOrUpdate. type AzureCredentialsClientCreateOrUpdateResponse struct { -// Represents Azure Credential Resource + // Represents Azure Credential Resource AzureCredentialResource } @@ -98,25 +98,25 @@ type AzureCredentialsClientDeleteResponse struct { // AzureCredentialsClientGetResponse contains the response from method AzureCredentialsClient.Get. type AzureCredentialsClientGetResponse struct { -// Represents Azure Credential Resource + // Represents Azure Credential Resource AzureCredentialResource } // AzureCredentialsClientListResponse contains the response from method AzureCredentialsClient.NewListPager. type AzureCredentialsClientListResponse struct { -// The response of a AzureCredentialResource list operation. + // The response of a AzureCredentialResource list operation. AzureCredentialResourceListResult } // AzureCredentialsClientUpdateResponse contains the response from method AzureCredentialsClient.Update. type AzureCredentialsClientUpdateResponse struct { -// Represents Azure Credential Resource + // Represents Azure Credential Resource AzureCredentialResource } // AzurePlanesClientCreateOrUpdateResponse contains the response from method AzurePlanesClient.BeginCreateOrUpdate. type AzurePlanesClientCreateOrUpdateResponse struct { -// The Azure plane resource. + // The Azure plane resource. AzurePlaneResource } @@ -127,26 +127,26 @@ type AzurePlanesClientDeleteResponse struct { // AzurePlanesClientGetResponse contains the response from method AzurePlanesClient.Get. type AzurePlanesClientGetResponse struct { -// The Azure plane resource. + // The Azure plane resource. AzurePlaneResource } // AzurePlanesClientListResponse contains the response from method AzurePlanesClient.NewListPager. type AzurePlanesClientListResponse struct { -// The response of a AzurePlaneResource list operation. + // The response of a AzurePlaneResource list operation. AzurePlaneResourceListResult } // AzurePlanesClientUpdateResponse contains the response from method AzurePlanesClient.BeginUpdate. type AzurePlanesClientUpdateResponse struct { -// The Azure plane resource. + // The Azure plane resource. AzurePlaneResource } // LocationsClientCreateOrUpdateResponse contains the response from method LocationsClient.BeginCreateOrUpdate. type LocationsClientCreateOrUpdateResponse struct { -// The resource type for defining a location of the containing resource provider. The location resource represents a logical -// location where the resource provider operates. + // The resource type for defining a location of the containing resource provider. The location resource represents a logical + // location where the resource provider operates. LocationResource } @@ -157,26 +157,26 @@ type LocationsClientDeleteResponse struct { // LocationsClientGetResponse contains the response from method LocationsClient.Get. type LocationsClientGetResponse struct { -// The resource type for defining a location of the containing resource provider. The location resource represents a logical -// location where the resource provider operates. + // The resource type for defining a location of the containing resource provider. The location resource represents a logical + // location where the resource provider operates. LocationResource } // LocationsClientListResponse contains the response from method LocationsClient.NewListPager. type LocationsClientListResponse struct { -// The response of a LocationResource list operation. + // The response of a LocationResource list operation. LocationResourceListResult } // PlanesClientListPlanesResponse contains the response from method PlanesClient.NewListPlanesPager. type PlanesClientListPlanesResponse struct { -// The response of a GenericPlaneResource list operation. + // The response of a GenericPlaneResource list operation. GenericPlaneResourceListResult } // RadiusPlanesClientCreateOrUpdateResponse contains the response from method RadiusPlanesClient.BeginCreateOrUpdate. type RadiusPlanesClientCreateOrUpdateResponse struct { -// The Radius plane resource. + // The Radius plane resource. RadiusPlaneResource } @@ -187,25 +187,25 @@ type RadiusPlanesClientDeleteResponse struct { // RadiusPlanesClientGetResponse contains the response from method RadiusPlanesClient.Get. type RadiusPlanesClientGetResponse struct { -// The Radius plane resource. + // The Radius plane resource. RadiusPlaneResource } // RadiusPlanesClientListResponse contains the response from method RadiusPlanesClient.NewListPager. type RadiusPlanesClientListResponse struct { -// The response of a RadiusPlaneResource list operation. + // The response of a RadiusPlaneResource list operation. RadiusPlaneResourceListResult } // RadiusPlanesClientUpdateResponse contains the response from method RadiusPlanesClient.BeginUpdate. type RadiusPlanesClientUpdateResponse struct { -// The Radius plane resource. + // The Radius plane resource. RadiusPlaneResource } // ResourceGroupsClientCreateOrUpdateResponse contains the response from method ResourceGroupsClient.CreateOrUpdate. type ResourceGroupsClientCreateOrUpdateResponse struct { -// The resource group resource + // The resource group resource ResourceGroupResource } @@ -216,25 +216,25 @@ type ResourceGroupsClientDeleteResponse struct { // ResourceGroupsClientGetResponse contains the response from method ResourceGroupsClient.Get. type ResourceGroupsClientGetResponse struct { -// The resource group resource + // The resource group resource ResourceGroupResource } // ResourceGroupsClientListResponse contains the response from method ResourceGroupsClient.NewListPager. type ResourceGroupsClientListResponse struct { -// The response of a ResourceGroupResource list operation. + // The response of a ResourceGroupResource list operation. ResourceGroupResourceListResult } // ResourceGroupsClientUpdateResponse contains the response from method ResourceGroupsClient.Update. type ResourceGroupsClientUpdateResponse struct { -// The resource group resource + // The resource group resource ResourceGroupResource } // ResourceProvidersClientCreateOrUpdateResponse contains the response from method ResourceProvidersClient.BeginCreateOrUpdate. type ResourceProvidersClientCreateOrUpdateResponse struct { -// The resource type for defining a resource provider. + // The resource type for defining a resource provider. ResourceProviderResource } @@ -245,32 +245,32 @@ type ResourceProvidersClientDeleteResponse struct { // ResourceProvidersClientGetProviderSummaryResponse contains the response from method ResourceProvidersClient.GetProviderSummary. type ResourceProvidersClientGetProviderSummaryResponse struct { -// The summary of a resource provider configuration. This type is optimized for querying resource providers and supported -// types. + // The summary of a resource provider configuration. This type is optimized for querying resource providers and supported + // types. ResourceProviderSummary } // ResourceProvidersClientGetResponse contains the response from method ResourceProvidersClient.Get. type ResourceProvidersClientGetResponse struct { -// The resource type for defining a resource provider. + // The resource type for defining a resource provider. ResourceProviderResource } // ResourceProvidersClientListProviderSummariesResponse contains the response from method ResourceProvidersClient.NewListProviderSummariesPager. type ResourceProvidersClientListProviderSummariesResponse struct { -// Paged collection of ResourceProviderSummary items + // Paged collection of ResourceProviderSummary items PagedResourceProviderSummary } // ResourceProvidersClientListResponse contains the response from method ResourceProvidersClient.NewListPager. type ResourceProvidersClientListResponse struct { -// The response of a ResourceProviderResource list operation. + // The response of a ResourceProviderResource list operation. ResourceProviderResourceListResult } // ResourceTypesClientCreateOrUpdateResponse contains the response from method ResourceTypesClient.BeginCreateOrUpdate. type ResourceTypesClientCreateOrUpdateResponse struct { -// The resource type for defining a resource type supported by the containing resource provider. + // The resource type for defining a resource type supported by the containing resource provider. ResourceTypeResource } @@ -281,19 +281,18 @@ type ResourceTypesClientDeleteResponse struct { // ResourceTypesClientGetResponse contains the response from method ResourceTypesClient.Get. type ResourceTypesClientGetResponse struct { -// The resource type for defining a resource type supported by the containing resource provider. + // The resource type for defining a resource type supported by the containing resource provider. ResourceTypeResource } // ResourceTypesClientListResponse contains the response from method ResourceTypesClient.NewListPager. type ResourceTypesClientListResponse struct { -// The response of a ResourceTypeResource list operation. + // The response of a ResourceTypeResource list operation. ResourceTypeResourceListResult } // ResourcesClientListResponse contains the response from method ResourcesClient.NewListPager. type ResourcesClientListResponse struct { -// The response of a GenericResource list operation. + // The response of a GenericResource list operation. GenericResourceListResult } - diff --git a/pkg/ucp/api/v20231001preview/zz_generated_time_rfc3339.go b/pkg/ucp/api/v20231001preview/zz_generated_time_rfc3339.go index bbe5fcce12..04527d297f 100644 --- a/pkg/ucp/api/v20231001preview/zz_generated_time_rfc3339.go +++ b/pkg/ucp/api/v20231001preview/zz_generated_time_rfc3339.go @@ -4,8 +4,6 @@ package v20231001preview - - import ( "encoding/json" "fmt" @@ -16,8 +14,6 @@ import ( "time" ) - - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) @@ -88,7 +84,6 @@ func (t dateTimeRFC3339) String() string { return time.Time(t).Format(time.RFC3339Nano) } - func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return diff --git a/pkg/ucp/api/v20231001preview/zz_generated_version.go b/pkg/ucp/api/v20231001preview/zz_generated_version.go new file mode 100644 index 0000000000..72a9eba46d --- /dev/null +++ b/pkg/ucp/api/v20231001preview/zz_generated_version.go @@ -0,0 +1,9 @@ +// Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package v20231001preview + +const ( + moduleName = "github.com/radius-project/radius/pkg/ucp/api/v20231001preview" + moduleVersion = "v0.1.0" +) diff --git a/pkg/ucp/resources/radius/radius.go b/pkg/ucp/resources/radius/radius.go index 1cfaf5a50f..e5d35aa21f 100644 --- a/pkg/ucp/resources/radius/radius.go +++ b/pkg/ucp/resources/radius/radius.go @@ -28,6 +28,9 @@ const ( // NamespaceApplicationsCore defines the namespace for the Radius Applications.Core resource provider. NamespaceApplicationsCore = "Applications.Core" + // NamespaceRadiusCore defines the namespace for the Radius Radius.Core resource provider. + NamespaceRadiusCore = "Radius.Core" + // NamespaceApplicationsDatastores defines the namespace for the Radius Applications.Datastores resource provider. NamespaceApplicationsDatastores = "Applications.Datastores" diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json index 6f4760d64c..dc29bce36f 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json @@ -2448,6 +2448,7 @@ }, "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { "type": "object", + "title": "Tracked Resource", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", "properties": { "tags": { @@ -4738,8 +4739,7 @@ "items": { "$ref": "#/definitions/ProviderConfigProperties" }, - "type": "array", - "x-ms-identifiers": [] + "type": "array" } } } diff --git a/swagger/specification/applications/resource-manager/Applications.Dapr/preview/2023-10-01-preview/openapi.json b/swagger/specification/applications/resource-manager/Applications.Dapr/preview/2023-10-01-preview/openapi.json index 44b7e2b3d8..b448af1ae3 100644 --- a/swagger/specification/applications/resource-manager/Applications.Dapr/preview/2023-10-01-preview/openapi.json +++ b/swagger/specification/applications/resource-manager/Applications.Dapr/preview/2023-10-01-preview/openapi.json @@ -1252,6 +1252,7 @@ "definitions": { "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { "type": "object", + "title": "Tracked Resource", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", "properties": { "tags": { diff --git a/swagger/specification/applications/resource-manager/Applications.Datastores/preview/2023-10-01-preview/openapi.json b/swagger/specification/applications/resource-manager/Applications.Datastores/preview/2023-10-01-preview/openapi.json index 5a0eb760ae..09c6853072 100644 --- a/swagger/specification/applications/resource-manager/Applications.Datastores/preview/2023-10-01-preview/openapi.json +++ b/swagger/specification/applications/resource-manager/Applications.Datastores/preview/2023-10-01-preview/openapi.json @@ -1113,6 +1113,7 @@ "definitions": { "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { "type": "object", + "title": "Tracked Resource", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", "properties": { "tags": { diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_CreateOrUpdate.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_CreateOrUpdate.json index d27d1aa9de..da2f4fd085 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_CreateOrUpdate.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_CreateOrUpdate.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_CreateOrUpdate", + "operationId": "RabbitMQQueues_CreateOrUpdate", "title": "Create Or Update a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Delete.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Delete.json index 2eacd771a0..9a66ce9d67 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Delete.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Delete.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_Delete", + "operationId": "RabbitMQQueues_Delete", "title": "Delete a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Get.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Get.json index 530a7c38ce..9b84c041c3 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Get.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Get.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_Get", + "operationId": "RabbitMQQueues_Get", "title": "Get a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_List.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_List.json index d5ecd4fa43..5ec4f76da2 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_List.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_List.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_ListByScope", + "operationId": "RabbitMQQueues_ListByScope", "title": "List RabbitMQQueue resources by resource group", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListByRootScope.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListByRootScope.json index 5e4658bc45..9e4acb8f83 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListByRootScope.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListByRootScope.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_ListByScope", + "operationId": "RabbitMQQueues_ListByScope", "title": "List RabbitMQQueue resources by rootScope", "parameters": { "rootScope": "/planes/radius/local", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListSecrets.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListSecrets.json index 3be8480787..20961d606e 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListSecrets.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_ListSecrets.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_ListSecrets", + "operationId": "RabbitMQQueues_ListSecrets", "title": "List the secrets of a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Update.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Update.json index 04e9acfeca..1bf26a9fa4 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Update.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/examples/RabbitMQQueues_Update.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_Update", + "operationId": "RabbitMQQueues_Update", "title": "Update a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/openapi.json b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/openapi.json index 0c4a25c2b7..f2d18ab77d 100644 --- a/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/openapi.json +++ b/swagger/specification/applications/resource-manager/Applications.Messaging/preview/2023-10-01-preview/openapi.json @@ -49,7 +49,7 @@ "paths": { "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues": { "get": { - "operationId": "RabbitMqQueues_ListByScope", + "operationId": "RabbitMQQueues_ListByScope", "tags": [ "RabbitMQQueues" ], @@ -91,7 +91,7 @@ }, "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}": { "get": { - "operationId": "RabbitMqQueues_Get", + "operationId": "RabbitMQQueues_Get", "tags": [ "RabbitMQQueues" ], @@ -134,7 +134,7 @@ } }, "put": { - "operationId": "RabbitMqQueues_CreateOrUpdate", + "operationId": "RabbitMQQueues_CreateOrUpdate", "tags": [ "RabbitMQQueues" ], @@ -207,7 +207,7 @@ "x-ms-long-running-operation": true }, "patch": { - "operationId": "RabbitMqQueues_Update", + "operationId": "RabbitMQQueues_Update", "tags": [ "RabbitMQQueues" ], @@ -277,7 +277,7 @@ "x-ms-long-running-operation": true }, "delete": { - "operationId": "RabbitMqQueues_Delete", + "operationId": "RabbitMQQueues_Delete", "tags": [ "RabbitMQQueues" ], @@ -337,7 +337,7 @@ }, "/{rootScope}/providers/Applications.Messaging/rabbitMQQueues/{rabbitMQQueueName}/listSecrets": { "post": { - "operationId": "RabbitMqQueues_ListSecrets", + "operationId": "RabbitMQQueues_ListSecrets", "tags": [ "RabbitMQQueues" ], @@ -424,6 +424,7 @@ "definitions": { "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { "type": "object", + "title": "Tracked Resource", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", "properties": { "tags": { diff --git a/swagger/specification/applications/resource-manager/readme.md b/swagger/specification/applications/resource-manager/readme.md index 4b316ec5eb..005973b7f8 100644 --- a/swagger/specification/applications/resource-manager/readme.md +++ b/swagger/specification/applications/resource-manager/readme.md @@ -6,7 +6,7 @@ This is the AutoRest configuration file for Radius. ## Getting Started -To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest@3.7.2`) and then run: > `autorest readme.md` diff --git a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_CreateOrUpdate.json b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_CreateOrUpdate.json index 3ed71a50f3..c803d5088b 100644 --- a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_CreateOrUpdate.json +++ b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_CreateOrUpdate.json @@ -8,7 +8,6 @@ "RecipePackResource": { "location": "West US", "properties": { - "description": "Azure container recipes for common container patterns", "recipes": { "Applications.Core/containers": { "recipeKind": "bicep", @@ -39,7 +38,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-env" ], diff --git a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_Get.json b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_Get.json index 2c6d41c50e..e5c6b50be1 100644 --- a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_Get.json +++ b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_Get.json @@ -15,7 +15,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-env" ], diff --git a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_ListByScope.json b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_ListByScope.json index 53ff2db406..5f0e6e532c 100644 --- a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_ListByScope.json +++ b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_ListByScope.json @@ -16,7 +16,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-env" ], @@ -35,7 +34,6 @@ "location": "East US", "properties": { "provisioningState": "Succeeded", - "description": "Kubernetes native recipes", "referencedBy": [], "recipes": { "Applications.Core/containers": { diff --git a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json index be6565a658..3c65cec7f1 100644 --- a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json +++ b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json @@ -1011,6 +1011,7 @@ }, "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { "type": "object", + "title": "Tracked Resource", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", "properties": { "tags": { @@ -1459,10 +1460,6 @@ "description": "The status of the asynchronous operation", "readOnly": true }, - "description": { - "type": "string", - "description": "Description of what this recipe pack provides" - }, "referencedBy": { "type": "array", "description": "List of environment IDs that reference this recipe pack", diff --git a/swagger/specification/radius/resource-manager/readme.md b/swagger/specification/radius/resource-manager/readme.md new file mode 100644 index 0000000000..3630e33c1a --- /dev/null +++ b/swagger/specification/radius/resource-manager/readme.md @@ -0,0 +1,66 @@ +# applications + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Radius. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest@3.7.2`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for Radius APIs. + +``` yaml +title: ApplicationsManagementClient +openapi-type: arm +``` + +``` yaml $(package-core) +tag: package-radiuscore-2025-08-01-preview +``` + +### Tag: package-radiuscore-2025-08-01-preview + +These settings apply only when `--tag=package-radiuscore-2025-08-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-radiuscore-2025-08-01-preview' +input-file: + - Radius.Core/preview/2025-08-01-preview/openapi.json +``` + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-net + - repo: azure-sdk-for-python-track2 + after_scripts: + - python ./scripts/multiapi_init_gen.py azure-mgmt-applications#core + - repo: azure-sdk-for-python + after_scripts: + - python ./scripts/multiapi_init_gen.py azure-mgmt-applications#core + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-resource-manager-schemas + - repo: azure-cli-extensions +``` \ No newline at end of file diff --git a/swagger/specification/ucp/resource-manager/UCP/preview/2023-10-01-preview/openapi.json b/swagger/specification/ucp/resource-manager/UCP/preview/2023-10-01-preview/openapi.json index ff4f942ea1..14a29ba59f 100644 --- a/swagger/specification/ucp/resource-manager/UCP/preview/2023-10-01-preview/openapi.json +++ b/swagger/specification/ucp/resource-manager/UCP/preview/2023-10-01-preview/openapi.json @@ -3646,8 +3646,7 @@ "description": "The ResourceProviderSummary items on this page", "items": { "$ref": "#/definitions/ResourceProviderSummary" - }, - "x-ms-identifiers": [] + } }, "nextLink": { "type": "string", diff --git a/test/functional-portable/cli/noncloud/cli_test.go b/test/functional-portable/cli/noncloud/cli_test.go index 0a396fa48d..36f3e4ef16 100644 --- a/test/functional-portable/cli/noncloud/cli_test.go +++ b/test/functional-portable/cli/noncloud/cli_test.go @@ -817,3 +817,47 @@ func generateUniqueTag() string { tag := fmt.Sprintf("test-%d-%d", timestamp, random) return tag } + +func Test_RecipePack(t *testing.T) { + ctx, cancel := testcontext.NewWithCancel(t) + t.Cleanup(cancel) + + options := rp.NewRPTestOptions(t) + cli := radcli.NewCLI(t, options.ConfigFilePath) + + packName := "computeRecipePack" + templatePath := "./testdata/corerp-recipe-pack-test.bicep" + + t.Run("deploy recipe pack", func(t *testing.T) { + err := cli.Deploy(ctx, templatePath, "", "") + require.NoError(t, err) + }) + + t.Run("verify recipe pack listed", func(t *testing.T) { + output, err := cli.RecipePackList(ctx, "") + require.NoError(t, err) + require.Contains(t, output, packName) + }) + + t.Run("verify recipe pack show", func(t *testing.T) { + output, err := cli.RecipePackShow(ctx, packName, "") + require.NoError(t, err) + require.Contains(t, output, packName) + }) + + t.Run("delete recipe pack", func(t *testing.T) { + err := cli.Deploy(ctx, templatePath, "", "") + require.NoError(t, err) + + output, err := cli.RecipePackList(ctx, "") + require.NoError(t, err) + + require.Contains(t, output, packName) + err = cli.RecipePackDelete(ctx, packName, radcli.DeleteOptions{Confirm: true}) + require.NoError(t, err) + + output, err = cli.RecipePackList(ctx, "") + require.NoError(t, err) + require.NotContains(t, output, packName) + }) +} diff --git a/test/functional-portable/cli/noncloud/testdata/corerp-recipe-pack-test.bicep b/test/functional-portable/cli/noncloud/testdata/corerp-recipe-pack-test.bicep new file mode 100644 index 0000000000..e76bb33075 --- /dev/null +++ b/test/functional-portable/cli/noncloud/testdata/corerp-recipe-pack-test.bicep @@ -0,0 +1,23 @@ +extension radius +resource computeRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'computeRecipePack' + properties: { + recipes: { + 'Radius.Compute/containers': { + recipeKind: 'terraform' + recipeLocation: 'https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48' + parameters: { + allowPlatformOptions: true + } + } + 'Radius.Security/secrets': { + recipeKind: 'terraform' + recipeLocation: 'https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets/kubernetes?ref=v0.48' + } + 'Radius.Storage/volumes': { + recipeKind: 'terraform' + recipeLocation: 'https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes/kubernetes?ref=v0.48' + } + } + } +} diff --git a/test/functional-portable/dynamicrp/noncloud/resources/recipepacks_test.go b/test/functional-portable/dynamicrp/noncloud/resources/recipepacks_test.go new file mode 100644 index 0000000000..cfb27caa3d --- /dev/null +++ b/test/functional-portable/dynamicrp/noncloud/resources/recipepacks_test.go @@ -0,0 +1,275 @@ +/* +Copyright 2023 The Radius Authors. + +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 resource_test + +import ( + "context" + "strings" + "testing" + + "github.com/radius-project/radius/test" + "github.com/radius-project/radius/test/radcli" + "github.com/radius-project/radius/test/rp" + "github.com/radius-project/radius/test/step" + "github.com/radius-project/radius/test/testutil" + "github.com/radius-project/radius/test/validation" + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Test_RecipePacks_Deployment tests the deployment and functionality of Radius.Core/recipePacks resources. +// This test validates that recipe packs can be created with user-defined type recipes, associated with environments, +// and used to deploy resources with their configured recipes via the new Radius.Core/environments resource. +// +// The test consists of the following steps: +// 1. Create Kubernetes namespace since we expect this to be created by Ops +// 2. Resource Type Registration: +// - Registers user-defined resource type "Test.Resources/userTypeAlpha" +// - Verifies the registration by checking if the resource type is listed in the CLI output +// +// 3. Resource Deployment: +// - Deploys a Bicep template that creates a recipe pack with userTypeAlpha recipe +// - Creates a Radius.Core/environments resource that references the recipe pack +// - Deploys RRT resources that use the recipe from the pack +// +// 4. Validation: +// - Validates that the recipe pack and environment are created successfully +// - Confirms that RRT resources are deployed using the recipes from the pack +func Test_RecipePacks_Deployment(t *testing.T) { + template := "testdata/recipepacks-test.bicep" + appName := "recipepacks-test-app" + appNamespace := "recipepacks-ns" + parentResourceTypeName := "Test.Resources/userTypeAlpha" + parentResourceTypeParam := strings.Split(parentResourceTypeName, "/")[1] + filepath := "testdata/testresourcetypes.yaml" + options := rp.NewRPTestOptions(t) + cli := radcli.NewCLI(t, options.ConfigFilePath) + + test := rp.NewRPTest(t, appName, []rp.TestStep{ + { + // The first step in this test is to create the Kubernetes namespace. + Executor: step.NewFuncExecutor(func(ctx context.Context, t *testing.T, options test.TestOptions) { + _, err := options.K8sClient.CoreV1().Namespaces().Create(ctx, &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: appNamespace, + }, + }, metav1.CreateOptions{}) + if err != nil && !strings.Contains(err.Error(), "already exists") { + require.NoError(t, err) + } + }), + SkipKubernetesOutputResourceValidation: true, + SkipObjectValidation: true, + SkipResourceDeletion: true, + PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { + _, err := test.Options.K8sClient.CoreV1().Namespaces().Get(ctx, appNamespace, metav1.GetOptions{}) + require.NoError(t, err, "Namespace should be created") + }, + }, + { + // The second step in this test is to create/register the parent user-defined resource type using the CLI. + Executor: step.NewFuncExecutor(func(ctx context.Context, t *testing.T, options test.TestOptions) { + _, err := cli.ResourceTypeCreate(ctx, parentResourceTypeParam, filepath) + require.NoError(t, err) + }), + SkipKubernetesOutputResourceValidation: true, + SkipObjectValidation: true, + SkipResourceDeletion: true, + PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { + output, err := cli.RunCommand(ctx, []string{"resource-type", "show", parentResourceTypeName, "--output", "json"}) + require.NoError(t, err) + require.Contains(t, output, parentResourceTypeName) + }, + }, + { + // The third step is to deploy a bicep file using a recipe pack for the resource type registered. + Executor: step.NewDeployExecutor(template, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), + SkipObjectValidation: true, + SkipResourceDeletion: false, + SkipKubernetesOutputResourceValidation: true, + RPResources: &validation.RPResourceSet{ + Resources: []validation.RPResource{ + { + Name: "test-recipe-pack", + Type: "radius.core/recipepacks", + }, + { + Name: "recipepacks-test-env", + Type: "radius.core/environments", + }, + { + Name: appName, + Type: validation.ApplicationsResource, + App: appName, + }, + { + Name: "rrtresource", + Type: "test.resources/usertypealpha", + App: appName, + }, + }, + }, + PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { + // Verify deployments exist in the specified namespace + deployments, err := test.Options.K8sClient.AppsV1().Deployments(appNamespace).List(ctx, metav1.ListOptions{}) + require.NoError(t, err) + require.NotEmpty(t, deployments.Items, "No deployments found in namespace %s", appNamespace) + + t.Logf("Found %d deployments in namespace %s", len(deployments.Items), appNamespace) + for _, deploy := range deployments.Items { + t.Logf("Deployment: %s", deploy.Name) + } + + // Clean up the namespace after verification + err = test.Options.K8sClient.CoreV1().Namespaces().Delete(ctx, appNamespace, metav1.DeleteOptions{}) + if err != nil { + t.Logf("Warning: Failed to delete namespace %s: %v", appNamespace, err) + } else { + t.Logf("Successfully deleted namespace %s", appNamespace) + } + }, + }, + }) + + test.Test(t) +} + +// Test_RecipePacks_NoProvider_Failure tests that deployment fails when Radius.Core/environments +// does not include a providers.kubernetes.namespace configuration. +// This test validates that the system properly enforces namespace requirements. +// +// The test consists of the following steps: +// 1. Resource Type Registration: +// - Registers user-defined resource type "Test.Resources/userTypeAlpha" +// +// 2. Resource Deployment Failure: +// - Attempts to deploy a Bicep template with a recipe pack but no providers configuration in the environment +// - The recipe does not have a default namspace +// - Validates that the deployment fails with "Namespace parameter required." error +func Test_RecipePacks_NoProvider_Failure(t *testing.T) { + template := "testdata/recipepacks-test-no-provider.bicep" + appName := "recipepacks-test-app-no-provider" + parentResourceTypeName := "Test.Resources/userTypeAlpha" + parentResourceTypeParam := strings.Split(parentResourceTypeName, "/")[1] + filepath := "testdata/testresourcetypes.yaml" + options := rp.NewRPTestOptions(t) + cli := radcli.NewCLI(t, options.ConfigFilePath) + + validate := step.ValidateSingleDetail("DeploymentFailed", step.DeploymentErrorDetail{ + Code: "ResourceDeploymentFailure", + Details: []step.DeploymentErrorDetail{ + { + Code: "RecipeDeploymentFailed", + MessageContains: "failed to deploy recipe default of type Test.Resources/userTypeAlpha", + Details: []step.DeploymentErrorDetail{ + { + Code: "DeploymentFailed", + MessageContains: "At least one resource deployment operation failed", + Details: []step.DeploymentErrorDetail{ + { + Code: "", + MessageContains: "Namespace parameter required.", + }, + }, + }, + }, + }, + }, + }) + + test := rp.NewRPTest(t, appName, []rp.TestStep{ + { + // The first step in this test is to create/register the parent user-defined resource type using the CLI. + Executor: step.NewFuncExecutor(func(ctx context.Context, t *testing.T, options test.TestOptions) { + _, err := cli.ResourceTypeCreate(ctx, parentResourceTypeParam, filepath) + require.NoError(t, err) + }), + SkipKubernetesOutputResourceValidation: true, + SkipObjectValidation: true, + SkipResourceDeletion: true, + PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { + output, err := cli.RunCommand(ctx, []string{"resource-type", "show", parentResourceTypeName, "--output", "json"}) + require.NoError(t, err) + require.Contains(t, output, parentResourceTypeName) + }, + }, + { + // The second step is to deploy a bicep file without providers configuration - this should fail + Executor: step.NewDeployErrorExecutor(template, validate, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), + SkipKubernetesOutputResourceValidation: true, + SkipObjectValidation: true, + SkipResourceDeletion: false, + }, + }) + + test.Test(t) +} + +// Test_RecipePacks_MissingNamespace_Failure tests that deployment fails when the namespace specified +// in the Radius.Core/environments providers.kubernetes.namespace does not exist in the cluster. +// This test validates that the system properly checks for namespace existence before deployment. +// +// The test consists of the following steps: +// 1. Resource Type Registration (no namespace creation): +// - Registers user-defined resource type "Test.Resources/userTypeAlpha" +// +// 2. Resource Deployment Failure: +// - Attempts to deploy a Bicep template that references a non-existent namespace +// - Validates that the deployment fails with "Namespace 'recipepacks-ns' does not exist" error +func Test_RecipePacks_MissingNamespace_Failure(t *testing.T) { + template := "testdata/recipepacks-test.bicep" + appName := "recipepacks-test-app" + parentResourceTypeName := "Test.Resources/userTypeAlpha" + parentResourceTypeParam := strings.Split(parentResourceTypeName, "/")[1] + filepath := "testdata/testresourcetypes.yaml" + options := rp.NewRPTestOptions(t) + cli := radcli.NewCLI(t, options.ConfigFilePath) + + validate := step.ValidateSingleDetail("DeploymentFailed", step.DeploymentErrorDetail{ + Code: "BadRequest", + MessageContains: "Namespace 'recipepacks-ns' does not exist in the Kubernetes cluster. Please create it before proceeding.", + }) + + test := rp.NewRPTest(t, appName, []rp.TestStep{ + { + // The first step in this test is to create/register the parent user-defined resource type using the CLI. + // NOTE: We deliberately skip namespace creation to test the failure case + Executor: step.NewFuncExecutor(func(ctx context.Context, t *testing.T, options test.TestOptions) { + _, err := cli.ResourceTypeCreate(ctx, parentResourceTypeParam, filepath) + require.NoError(t, err) + }), + SkipKubernetesOutputResourceValidation: true, + SkipObjectValidation: true, + SkipResourceDeletion: true, + PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { + output, err := cli.RunCommand(ctx, []string{"resource-type", "show", parentResourceTypeName, "--output", "json"}) + require.NoError(t, err) + require.Contains(t, output, parentResourceTypeName) + }, + }, + { + // The second step is to deploy a bicep file with a non-existent namespace - this should fail + Executor: step.NewDeployErrorExecutor(template, validate, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), + SkipKubernetesOutputResourceValidation: true, + SkipObjectValidation: true, + SkipResourceDeletion: false, + }, + }) + + test.Test(t) +} diff --git a/test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test-no-provider.bicep b/test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test-no-provider.bicep new file mode 100644 index 0000000000..9dcd18ad76 --- /dev/null +++ b/test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test-no-provider.bicep @@ -0,0 +1,53 @@ +extension radius +extension testresources + +param registry string + +param version string + +@description('Specifies the port the container listens on.') +param port int = 8080 + +resource recipepack 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'test-recipe-pack-no-provider' + location: 'global' + properties: { + recipes: { + 'Test.Resources/userTypeAlpha': { + recipeKind: 'bicep' + recipeLocation: '${registry}/test/testrecipes/test-bicep-recipes/dynamicrp_recipe:${version}' + parameters: { + port: port + } + } + } + } +} + +resource env 'Radius.Core/environments@2025-08-01-preview' = { + name: 'recipepacks-test-env-no-provider' + location: 'global' + properties: { + recipePacks: [ + recipepack.id + ] + // No providers block - this should cause deployment failure + // since the recipe also does not have a namespace created or configured + } +} + +resource app 'Applications.Core/applications@2023-10-01-preview' = { + name: 'recipepacks-test-app-no-provider' + location: 'global' + properties: { + environment: env.id + } +} + +resource rrtresource 'Test.Resources/userTypeAlpha@2023-10-01-preview' = { + name: 'rrtresource' + properties: { + environment: env.id + application: app.id + } +} diff --git a/test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test.bicep b/test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test.bicep new file mode 100644 index 0000000000..6c39271c40 --- /dev/null +++ b/test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test.bicep @@ -0,0 +1,64 @@ +extension radius +extension testresources +extension kubernetes with { + kubeConfig: '' + namespace: 'recipepacks-namespace' +} as kubernetes + +param registry string + +param version string + +@description('Specifies the port the container listens on.') +param port int = 8080 + +resource recipepack 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'test-recipe-pack' + location: 'global' + properties: { + recipes: { + 'Test.Resources/userTypeAlpha': { + recipeKind: 'bicep' + recipeLocation: '${registry}/test/testrecipes/test-bicep-recipes/dynamicrp_recipe:${version}' + parameters: { + port: port + } + } + 'Test.Resources/postgres': { + recipeKind: 'bicep' + recipeLocation: '${registry}/test/testrecipes/test-bicep-recipes/dynamicrp_postgress_recipe:${version}' + } + } + } +} + +resource env 'Radius.Core/environments@2025-08-01-preview' = { + name: 'recipepacks-test-env' + location: 'global' + properties: { + recipePacks: [ + recipepack.id + ] + providers: { + kubernetes: { + namespace: 'recipepacks-ns' + } + } + } +} + +resource app 'Applications.Core/applications@2023-10-01-preview' = { + name: 'recipepacks-test-app' + location: 'global' + properties: { + environment: env.id + } +} + +resource rrtresource 'Test.Resources/userTypeAlpha@2023-10-01-preview' = { + name: 'rrtresource' + properties: { + environment: env.id + application: app.id + } +} diff --git a/test/functional-portable/kubernetes/noncloud/flux_test.go b/test/functional-portable/kubernetes/noncloud/flux_test.go index a1f019859a..14fec527c7 100644 --- a/test/functional-portable/kubernetes/noncloud/flux_test.go +++ b/test/functional-portable/kubernetes/noncloud/flux_test.go @@ -17,8 +17,11 @@ limitations under the License. package kubernetes_noncloud_test import ( + "bytes" "context" "fmt" + "io" + "net/http" "os" "path" "strconv" @@ -33,7 +36,6 @@ import ( corev1 "k8s.io/api/core/v1" controller_runtime "sigs.k8s.io/controller-runtime/pkg/client" - gitea "code.gitea.io/sdk/gitea" "github.com/fluxcd/pkg/apis/meta" sourcev1 "github.com/fluxcd/source-controller/api/v1" git "github.com/go-git/go-git/v5" @@ -46,20 +48,27 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/remotecommand" watchtools "k8s.io/client-go/tools/watch" + "k8s.io/client-go/util/retry" ) const ( - fluxSystemNamespace = "flux-system" - testGitServerURLEnvVariableName = "GITEA_SERVER_URL" - testGitUsernameEnvVariableName = "GITEA_USERNAME" - testGitEmailEnvVariableName = "GITEA_EMAIL" - testGiteaAccessTokenEnvVariableName = "GITEA_ACCESS_TOKEN" + fluxSystemNamespace = "flux-system" + testGitServerURLEnvVariableName = "GIT_HTTP_SERVER_URL" + testGitUsernameEnvVariableName = "GIT_HTTP_USERNAME" + testGitEmailEnvVariableName = "GIT_HTTP_EMAIL" + testGitPasswordEnvVariableName = "GIT_HTTP_PASSWORD" + + gitServerNamespace = "git-http-backend" + gitServerLabelSelector = "app=git-http-backend" + gitServerContainerName = "git-http-backend" + gitServerInternalRepoURLFormat = "http://git-http.git-http-backend.svc.cluster.local:3000/%s.git" ) func Test_Flux_Basic(t *testing.T) { - t.Skip("https://github.com/radius-project/radius/issues/10441") testName := "flux-basic" steps := []GitOpsTestStep{ { @@ -86,7 +95,6 @@ func Test_Flux_Basic(t *testing.T) { } func Test_Flux_Complex(t *testing.T) { - t.Skip("https://github.com/radius-project/radius/issues/10441") testName := "flux-complex" steps := []GitOpsTestStep{ { @@ -136,25 +144,15 @@ func testFluxIntegration(t *testing.T, testName string, steps []GitOpsTestStep, gitServerURL := os.Getenv(testGitServerURLEnvVariableName) gitUsername := os.Getenv(testGitUsernameEnvVariableName) gitEmail := os.Getenv(testGitEmailEnvVariableName) - giteaToken := os.Getenv(testGiteaAccessTokenEnvVariableName) + gitPassword := os.Getenv(testGitPasswordEnvVariableName) - // Create the Gitea client. - client, err := gitea.NewClient(gitServerURL, gitea.SetToken(giteaToken)) - require.NoError(t, err) - - // Create a new Git repository, and delete it after the test. - _, _, err = client.CreateRepo(gitea.CreateRepoOption{ - Name: gitRepoName, - }) - defer func() { - _, err := client.DeleteRepo(gitUsername, gitRepoName) - require.NoError(t, err) - }() - require.NoError(t, err) + require.NotEmpty(t, gitServerURL, fmt.Sprintf("%s must be set", testGitServerURLEnvVariableName)) + require.NotEmpty(t, gitUsername, fmt.Sprintf("%s must be set", testGitUsernameEnvVariableName)) + require.NotEmpty(t, gitEmail, fmt.Sprintf("%s must be set", testGitEmailEnvVariableName)) + require.NotEmpty(t, gitPassword, fmt.Sprintf("%s must be set", testGitPasswordEnvVariableName)) - // Get the repository to ensure it exists. - _, _, err = client.GetRepo(gitUsername, gitRepoName) - require.NoError(t, err) + cleanupGitRepo := ensureGitHTTPRepository(ctx, t, opts, gitRepoName) + defer cleanupGitRepo() // Create a temp directory for the Git repository. dir, err := os.MkdirTemp("", gitRepoName) @@ -170,13 +168,17 @@ func testFluxIntegration(t *testing.T, testName string, steps []GitOpsTestStep, require.NoError(t, err) // Create the remote for the repository. - repoURL := fmt.Sprintf("%s/%s/%s.git", gitServerURL, gitUsername, gitRepoName) + trimmedGitServerURL := strings.TrimSuffix(gitServerURL, "/") + repoURL := fmt.Sprintf("%s/%s.git", trimmedGitServerURL, gitRepoName) + t.Logf("Using git HTTP repository URL: %s", repoURL) _, err = r.CreateRemote(&config.RemoteConfig{ Name: "origin", URLs: []string{repoURL}, }) require.NoError(t, err) + waitForGitHTTPRepository(t, repoURL, gitUsername, gitPassword) + // Create an initial commit to the repository. commit, err := w.Commit("Initial commit", &git.CommitOptions{ AllowEmptyCommits: true, @@ -194,7 +196,7 @@ func testFluxIntegration(t *testing.T, testName string, steps []GitOpsTestStep, RemoteName: "origin", Auth: &githttp.BasicAuth{ Username: gitUsername, - Password: giteaToken, + Password: gitPassword, }, }) require.NoError(t, err) @@ -206,8 +208,10 @@ func testFluxIntegration(t *testing.T, testName string, steps []GitOpsTestStep, Name: gitRepoName, Namespace: fluxSystemNamespace, }, + Type: corev1.SecretTypeBasicAuth, Data: map[string][]byte{ - "bearerToken": []byte(giteaToken), + "username": []byte(gitUsername), + "password": []byte(gitPassword), }, } err = opts.Client.Create(ctx, secret) @@ -224,7 +228,7 @@ func testFluxIntegration(t *testing.T, testName string, steps []GitOpsTestStep, Namespace: fluxSystemNamespace, }, Spec: sourcev1.GitRepositorySpec{ - URL: fmt.Sprintf("http://gitea-http.gitea.svc.cluster.local:3000/%s/%s.git", gitUsername, gitRepoName), + URL: fmt.Sprintf(gitServerInternalRepoURLFormat, gitRepoName), SecretRef: &meta.LocalObjectReference{ Name: gitRepoName, }, @@ -265,24 +269,37 @@ func testFluxIntegration(t *testing.T, testName string, steps []GitOpsTestStep, RemoteName: "origin", Auth: &githttp.BasicAuth{ Username: gitUsername, - Password: giteaToken, + Password: gitPassword, }, }) require.NoError(t, err) - t.Log(t, "Pushed changes successfully") + t.Log("Pushed changes successfully") // Reconcile the GitRepository by updating the reconcile.fluxcd.io/requestedAt annotation. - err = opts.Client.Get(ctx, types.NamespacedName{Name: gitRepoName, Namespace: fluxSystemNamespace}, fluxGitRepository) - require.NoError(t, err) - annotations := fluxGitRepository.GetAnnotations() - if annotations == nil { - annotations = make(map[string]string) - } - annotations["reconcile.fluxcd.io/requestedAt"] = strconv.FormatInt(time.Now().Unix(), 10) - fluxGitRepository.SetAnnotations(annotations) - err = opts.Client.Update(ctx, fluxGitRepository) + var reconciledRepo *sourcev1.GitRepository + err = retry.RetryOnConflict(retry.DefaultBackoff, func() error { + repo := &sourcev1.GitRepository{} + if err := opts.Client.Get(ctx, types.NamespacedName{Name: gitRepoName, Namespace: fluxSystemNamespace}, repo); err != nil { + return err + } + annotations := repo.GetAnnotations() + if annotations == nil { + annotations = make(map[string]string) + } + annotations["reconcile.fluxcd.io/requestedAt"] = strconv.FormatInt(time.Now().Unix(), 10) + repo.SetAnnotations(annotations) + if err := opts.Client.Update(ctx, repo); err != nil { + return err + } + + reconciledRepo = repo + return nil + }) require.NoError(t, err) + // Update our reference to the latest resource version for future delete calls. + fluxGitRepository = reconciledRepo.DeepCopy() + radiusConfig, err := reconciler.ParseRadiusGitOpsConfig(path.Join(step.path, "radius-gitops-config.yaml")) require.NoError(t, err) @@ -420,3 +437,158 @@ func getValuesFromRadiusGitOpsConfig(configEntry reconciler.ConfigEntry) (name s return name, namespace, resourceGroup, params } + +func ensureGitHTTPRepository(ctx context.Context, t *testing.T, opts rp.RPTestOptions, repoName string) func() { + podName := getGitHTTPServerPodName(ctx, t, opts) + repoRoot := getGitHTTPServerRepoRoot(ctx, t, opts, podName) + + initCmd := fmt.Sprintf(`set -euo pipefail +REPO_ROOT=%q +REPO_PATH="${REPO_ROOT}/%s.git" +rm -rf "${REPO_PATH}" +mkdir -p "${REPO_ROOT}" +git init --bare "${REPO_PATH}" +git --git-dir "${REPO_PATH}" config http.receivepack true +git --git-dir "${REPO_PATH}" config http.uploadpack true +git --git-dir "${REPO_PATH}" update-server-info +git --git-dir "${REPO_PATH}" symbolic-ref HEAD refs/heads/main || true +touch "${REPO_PATH}/git-daemon-export-ok" +chown -R nginx:nginx "${REPO_PATH}" +chmod -R 777 "${REPO_PATH}" +`, + repoRoot, + repoName, + ) + _, err := execGitHTTPCommand(ctx, opts, podName, []string{"/bin/sh", "-c", initCmd}) + require.NoErrorf(t, err, "failed to initialize repository %s on git server", repoName) + t.Logf("Initialized git repository %s on git HTTP backend pod %s (root: %s)", repoName, podName, repoRoot) + + return func() { + cleanupPod := getGitHTTPServerPodName(ctx, t, opts) + cleanupRoot := getGitHTTPServerRepoRoot(ctx, t, opts, cleanupPod) + cleanupCmd := fmt.Sprintf(`set -euo pipefail +REPO_ROOT=%q +REPO_PATH="${REPO_ROOT}/%s.git" +rm -rf "${REPO_PATH}" +`, cleanupRoot, repoName) + _, err := execGitHTTPCommand(ctx, opts, cleanupPod, []string{"/bin/sh", "-c", cleanupCmd}) + require.NoErrorf(t, err, "failed to clean up repository %s on git server", repoName) + t.Logf("Cleaned up git repository %s from git HTTP backend pod %s (root: %s)", repoName, cleanupPod, cleanupRoot) + } +} + +func getGitHTTPServerPodName(ctx context.Context, t *testing.T, opts rp.RPTestOptions) string { + podList, err := opts.K8sClient.CoreV1().Pods(gitServerNamespace).List(ctx, metav1.ListOptions{LabelSelector: gitServerLabelSelector}) + require.NoError(t, err) + for _, pod := range podList.Items { + if pod.Status.Phase != corev1.PodRunning { + continue + } + for _, condition := range pod.Status.Conditions { + if condition.Type == corev1.PodReady && condition.Status == corev1.ConditionTrue { + return pod.Name + } + } + } + require.FailNowf(t, "git http backend not ready", "no ready pods found with selector %s in namespace %s", gitServerLabelSelector, gitServerNamespace) + return "" +} + +func getGitHTTPServerRepoRoot(ctx context.Context, t *testing.T, opts rp.RPTestOptions, podName string) string { + output, err := execGitHTTPCommand(ctx, opts, podName, []string{"/bin/sh", "-c", "printenv GIT_SERVER_TEMP_DIR"}) + require.NoError(t, err) + trimmed := strings.TrimSpace(output) + if trimmed == "" { + return "/var/lib/git" + } + return trimmed +} + +func execGitHTTPCommand(ctx context.Context, opts rp.RPTestOptions, podName string, command []string) (string, error) { + req := opts.K8sClient.CoreV1().RESTClient().Post(). + Resource("pods"). + Name(podName). + Namespace(gitServerNamespace). + SubResource("exec") + + execOptions := &corev1.PodExecOptions{ + Container: gitServerContainerName, + Command: command, + Stdout: true, + Stderr: true, + } + + req.VersionedParams(execOptions, scheme.ParameterCodec) + + executor, err := remotecommand.NewSPDYExecutor(opts.K8sConfig, http.MethodPost, req.URL()) + if err != nil { + return "", err + } + + var stdout, stderr bytes.Buffer + streamErr := executor.StreamWithContext(ctx, remotecommand.StreamOptions{ + Stdout: &stdout, + Stderr: &stderr, + }) + if streamErr != nil { + stderrStr := strings.TrimSpace(stderr.String()) + if stderrStr != "" { + return strings.TrimSpace(stdout.String()), fmt.Errorf("%w: %s", streamErr, stderrStr) + } + return strings.TrimSpace(stdout.String()), streamErr + } + + return strings.TrimSpace(stdout.String()), nil +} + +func waitForGitHTTPRepository(t *testing.T, repoURL, username, password string) { + t.Helper() + t.Logf("Waiting for git HTTP repository %s (username=%q)", repoURL, username) + client := &http.Client{Timeout: 2 * time.Second} + const maxLoggedBodyBytes = 256 + attempts := 0 + success := false + + require.Eventually(t, func() bool { + attempts++ + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/info/refs?service=git-receive-pack", repoURL), nil) + if err != nil { + t.Logf("git HTTP repo check attempt %d: failed to build request: %v", attempts, err) + return false + } + if username != "" { + req.SetBasicAuth(username, password) + } + resp, err := client.Do(req) + if err != nil { + t.Logf("git HTTP repo check attempt %d: request error: %v", attempts, err) + return false + } + bodyBytes, readErr := io.ReadAll(resp.Body) + resp.Body.Close() + if readErr != nil { + t.Logf("git HTTP repo check attempt %d: failed reading response body: %v", attempts, readErr) + } + + bodyPreview := string(bodyBytes) + if len(bodyPreview) > maxLoggedBodyBytes { + bodyPreview = bodyPreview[:maxLoggedBodyBytes] + fmt.Sprintf("...(%d bytes total)", len(bodyBytes)) + } + authChallenge := resp.Header.Get("Www-Authenticate") + t.Logf("git HTTP repo check attempt %d: status=%d, auth-challenge=%q, body-preview=%q", attempts, resp.StatusCode, authChallenge, bodyPreview) + + if resp.StatusCode == http.StatusNotFound { + return false + } + if resp.StatusCode >= http.StatusBadRequest { + return false + } + + success = true + return true + }, 30*time.Second, 500*time.Millisecond, "git HTTP repository %s never became available", repoURL) + + if success { + t.Logf("git HTTP repository %s became available after %d attempt(s)", repoURL, attempts) + } +} diff --git a/test/infra/azure/README.md b/test/infra/azure/README.md index e4fcc6afad..9fa638037c 100644 --- a/test/infra/azure/README.md +++ b/test/infra/azure/README.md @@ -64,14 +64,15 @@ This directory includes the Bicep templates to deploy the following resources on 1. Deploy main.bicep: - By default, `grafanaEnabled` is false. We do not need to set any parameters unless you need Grafana dashboard. If you want to see Grafana dashboard later, you can redeploy main.bicep with `grafanaEnabled` and `grafanaAdminObjectId` later--bicep will install only Grafana dashboard with your existing cluster. + By default, `grafanaEnabled` is false and `enableDeletionLock` is true. We do not need to set any parameters unless you need Grafana dashboard or want to disable the deletion lock. If you want to see Grafana dashboard later, you can redeploy main.bicep with `grafanaEnabled` and `grafanaAdminObjectId` later--bicep will install only Grafana dashboard with your existing cluster. ```bash - az deployment group create --resource-group [Resource Group Name] --template-file main.bicep --parameters grafanaEnabled=[Grafana Dashboard Enabled] grafanaAdminObjectId='[Grafana Admin Object Id]' + az deployment group create --resource-group [Resource Group Name] --template-file main.bicep --parameters grafanaEnabled=[Grafana Dashboard Enabled] grafanaAdminObjectId='[Grafana Admin Object Id]' enableDeletionLock=[Enable Deletion Lock] ``` - **[Grafana Dashboard Enabled]**: Set `true` if you want to see metrics and its dashboard with Azure managed Prometheus and Grafana dashboard. Otherwise, `false` is recommended to save the cost. - **[Grafana Admin Object Id]**: Set the object ID of the Grafana Admin user or group. To find the object id, search for the admin user or group name on [AAD Portal Overview search box](https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview) and get the object id or run `az ad signed-in-user show` to get your own user object id. + - **[Enable Deletion Lock]**: Set `false` if you want to disable the resource lock that prevents accidental deletion. By default, it is `true` to protect long running test resources from accidental deletion. ## Monitor Radius diff --git a/test/infra/azure/main.bicep b/test/infra/azure/main.bicep index a28c0a3936..e32c55fa05 100644 --- a/test/infra/azure/main.bicep +++ b/test/infra/azure/main.bicep @@ -61,6 +61,9 @@ param grafanaDashboardName string = '${prefix}-dashboard' @description('Specifies whether to install the required tools for running Radius. Default is true.') param installKubernetesDependencies bool = true +@description('Specifies whether to create a resource lock to prevent accidental deletion. Default is true.') +param enableDeletionLock bool = true + param defaultTags object = { radius: 'infra' } @@ -202,5 +205,15 @@ module deploymentScript './modules/deployment-script.bicep' = if (installKuberne ] } +// Create a resource lock to prevent accidental deletion of the resource group and all its resources. +resource deletionLock 'Microsoft.Authorization/locks@2020-05-01' = if (enableDeletionLock) { + scope: resourceGroup() + name: 'DeleteLock' + properties: { + level: 'CanNotDelete' + notes: 'This lock prevents accidental deletion of long running test resources.' + } +} + output aksControlPlaneFQDN string = aksCluster.outputs.controlPlaneFQDN output grafanaDashboardFQDN string = grafanaEnabled ? grafanaDashboard.outputs.dashboardFQDN : '' diff --git a/test/magpiego/go.mod b/test/magpiego/go.mod index 151dc83647..4b3c3c2457 100644 --- a/test/magpiego/go.mod +++ b/test/magpiego/go.mod @@ -1,51 +1,58 @@ module github.com/radius-project/radius/test/magpiego -go 1.24.1 +go 1.25.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 - github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1 - github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0 - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0 - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 - github.com/dapr/go-sdk v1.10.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 + github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.10.0 + github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.4.0 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3 + github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 + github.com/dapr/go-sdk v1.13.0 github.com/denisenkom/go-mssqldb v0.12.3 - github.com/go-chi/chi/v5 v5.2.2 + github.com/go-chi/chi/v5 v5.2.3 github.com/go-redis/redis/v8 v8.11.5 github.com/rabbitmq/amqp091-go v1.10.0 - go.mongodb.org/mongo-driver v1.16.0 + go.mongodb.org/mongo-driver v1.17.6 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1 // indirect - github.com/Azure/go-amqp v1.0.5 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0 // indirect + github.com/Azure/go-amqp v1.4.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/dapr/dapr v1.13.5 // indirect + github.com/dapr/dapr v1.16.0 // indirect + github.com/dapr/durabletask-go v0.10.0 // indirect + github.com/dapr/kit v0.16.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/golang-jwt/jwt/v5 v5.2.2 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/montanaflynn/stats v0.7.1 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect - golang.org/x/crypto v0.36.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.23.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a // indirect - google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel v1.36.0 // indirect + go.opentelemetry.io/otel/metric v1.36.0 // indirect + go.opentelemetry.io/otel/trace v1.36.0 // indirect + golang.org/x/crypto v0.41.0 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/sync v0.16.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/text v0.28.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/grpc v1.73.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/test/magpiego/go.sum b/test/magpiego/go.sum index 3242901535..9272ca87c2 100644 --- a/test/magpiego/go.sum +++ b/test/magpiego/go.sum @@ -1,33 +1,45 @@ github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 h1:JXg2dwJUmPB9JmtVmdEB16APJ7jurfbY5jnfXpJoRMc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1 h1:o/Ws6bEqMeKZUfj1RRm3mQ51O8JGU5w+Qdg2AhHib6A= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1/go.mod h1:6QAMYBAbQeeKX+REFJMZ1nFWu9XLw/PPcjYpuc9RDFs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 h1:PiSrjRPpkQNjrM8H0WwKMnZUdu1RGMtd/LdGKUrOo+c= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0/go.mod h1:oDrbWx4ewMylP7xHivfgixbfGBT6APAwsSoHRKotnIc= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0 h1:h4Zxgmi9oyZL2l8jeg1iRTqPloHktywWcu0nlJmo1tA= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0/go.mod h1:LgLGXawqSreJz135Elog0ywTJDsm0Hz2k+N+6ZK35u8= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1 h1:9fXQS/0TtQmKXp8SureKouF+idbQvp7cPUxykiohnBs= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1/go.mod h1:f+OaoSg0VQYPMqB0Jp2D54j1VHzITYcJaCNwV+k00ts= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0 h1:Be6KInmFEKV81c0pOAEbRYehLMwmmGI1exuFj248AMk= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0/go.mod h1:WCPBHsOXfBVnivScjs2ypRfimjEW0qPVLGgJkZlrIOA= -github.com/Azure/go-amqp v1.0.5 h1:po5+ljlcNSU8xtapHTe8gIc8yHxCzC03E8afH2g1ftU= -github.com/Azure/go-amqp v1.0.5/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.10.0 h1:kE5kpeiSqu4jcCQ/sWuyggMXJ/pT6oQ99+8hwPmyeJ0= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.10.0/go.mod h1:IAN3Z0DMtehoxoQQnfqg1891z1P7GNoDryKtFcAyMBI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 h1:/Zt+cDPnpC3OVDm/JKLOs7M2DKmLRIIp3XIx9pHHiig= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1/go.mod h1:Ng3urmn6dYe8gnbCMoHHVl5APYz2txho3koEkV2o2HA= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.4.0 h1:/g8S6wk65vfC6m3FIxJ+i5QDyN9JWwXI8Hb0Img10hU= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.4.0/go.mod h1:gpl+q95AzZlKVI3xSoseF9QPrypk0hQqBiJYeB/cR/I= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0 h1:nCYfgcSyHZXJI8J0IWE5MsCGlb2xp9fJiXyxWgmOFg4= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0/go.mod h1:ucUjca2JtSZboY8IoUqyQyuuXvwbMBVwFOm0vdQPNhA= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3 h1:ZJJNFaQ86GVKQ9ehwqyAFE6pIfyicpuJ8IkVaPBc6/4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3/go.mod h1:URuDvhmATVKqHBH9/0nOiNKk0+YcwfQ3WkK5PqHKxc8= +github.com/Azure/go-amqp v1.4.0 h1:Xj3caqi4comOF/L1Uc5iuBxR/pB6KumejC01YQOqOR4= +github.com/Azure/go-amqp v1.4.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/dapr/dapr v1.13.5 h1:GAhW30DzNKl+2DBMAERZoQH+S2hrkvl/TKsZ59FQ+xM= -github.com/dapr/dapr v1.13.5/go.mod h1:MOvHW0/l11ERywTBLm9NPcGe9x/ZQwA7gTgf8UGT4+M= -github.com/dapr/go-sdk v1.10.1 h1:g6mM2RXyGkrzsqWFfCy8rw+UAt1edQEgRaQXT+XP4PE= -github.com/dapr/go-sdk v1.10.1/go.mod h1:lPjyF/xubh35fbdNdKkxBbFxFNCmta4zmvsk0JxuUG0= +github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE= +github.com/coder/websocket v1.8.13/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= +github.com/dapr/dapr v1.16.0 h1:la2WLZM8Myr2Pq3cyrFjHKWDSPYLzGZCs3p502TwBjI= +github.com/dapr/dapr v1.16.0/go.mod h1:ln/mxvNOeqklaDmic4ppsxmnjl2D/oZGKaJy24IwaEY= +github.com/dapr/durabletask-go v0.10.0 h1:vfIivPl4JYd55xZTslDwhA6p6F8ipcNxBtMaupxArr8= +github.com/dapr/durabletask-go v0.10.0/go.mod h1:0Ts4rXp74JyG19gDWPcwNo5V6NBZzhARzHF5XynmA7Q= +github.com/dapr/go-sdk v1.13.0 h1:Qw2BmUonClQ9yK/rrEEaFL1PyDgq616RrvYj0CT67Lk= +github.com/dapr/go-sdk v1.13.0/go.mod h1:RsffVNZitDApmQqoS68tNKGMXDZUjTviAbKZupJSzts= +github.com/dapr/kit v0.16.1 h1:MqLAhHVg8trPy2WJChMZFU7ToeondvxcNHYVvMDiVf4= +github.com/dapr/kit v0.16.1/go.mod h1:40ZWs5P6xfYf7O59XgwqZkIyDldTIXlhTQhGop8QoSM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -39,14 +51,19 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618= -github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= +github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= @@ -54,16 +71,20 @@ github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= +github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -87,37 +108,43 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw= github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76 h1:tBiBTKHnIjovYoLX/TPkcf+OjqqKGQrPtGT3Foz+Pgo= -github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76/go.mod h1:SQliXeA7Dhkt//vS29v3zpbEwoa+zb2Cn5xj5uO4K5U= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.16.0 h1:tpRsfBJMROVHKpdGyc1BBEzzjDUWjItxbVSZ8Ls4BQ4= -go.mongodb.org/mongo-driver v1.16.0/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -125,12 +152,12 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -139,8 +166,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -148,18 +175,18 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a h1:hqK4+jJZXCU4pW7jsAdGOVFIfLHQeV7LaizZKnZ84HI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= +google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -172,5 +199,3 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= -nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= diff --git a/test/radcli/cli.go b/test/radcli/cli.go index 03b696b2d8..a195be9745 100644 --- a/test/radcli/cli.go +++ b/test/radcli/cli.go @@ -147,7 +147,7 @@ func (cli *CLI) deployInternal(ctx context.Context, templateFilePath string, env type ShowOptions struct { Group string // The resource group name Workspace string // The workspace name - Output string // Output format (json, table) + Output string // Output format (json, table, plain-text) Application string // Application name (for resource show) } @@ -466,6 +466,64 @@ func (cli *CLI) RecipeList(ctx context.Context, envName string) (string, error) return cli.RunCommand(ctx, args) } +// RecipePackList runs the "recipe-pack list" command with the given environment name and returns the output as a string, returning +// an error if the command fails. +func (cli *CLI) RecipePackList(ctx context.Context, groupName string) (string, error) { + args := []string{ + "recipe-pack", + "list", + } + if groupName != "" { + args = append(args, "--group", groupName) + } + return cli.RunCommand(ctx, args) +} + +// RecipePackShow runs the "recipe-pack show" command with the given recipe pack name and returns the output as a string, returning +// an error if the command fails. +func (cli *CLI) RecipePackShow(ctx context.Context, recipepackName, groupName string) (string, error) { + args := []string{ + "recipe-pack", + "show", + recipepackName, + } + if groupName != "" { + args = append(args, "--group", groupName) + } + return cli.RunCommand(ctx, args) +} + +// RecipePackDelete runs the "recipe-pack delete" command for the specified recipe pack name. +// The options parameter is optional and allows specifying group, workspace, and confirmation bypass. +func (cli *CLI) RecipePackDelete(ctx context.Context, recipepackName string, opts ...DeleteOptions) error { + args := []string{ + "recipe-pack", + "delete", + recipepackName, + } + + if len(opts) > 0 { + opt := opts[0] + if opt.Confirm { + args = append(args, "--yes") + } + if opt.Group != "" { + args = append(args, "--group", opt.Group) + } + if opt.Workspace != "" { + args = append(args, "--workspace", opt.Workspace) + } + if opt.Output != "" { + args = append(args, "--output", opt.Output) + } + } else { + args = append(args, "--yes") + } + + _, err := cli.RunCommand(ctx, args) + return err +} + // RecipeRegister runs a command to register a recipe with the given environment, template kind, template path and // resource type, and returns the output string or an error. func (cli *CLI) RecipeRegister(ctx context.Context, envName, recipeName, templateKind, templatePath, resourceType string, plainHTTP bool) (string, error) { diff --git a/test/testrp/go.mod b/test/testrp/go.mod index 28d92e7e22..2738f528e7 100644 --- a/test/testrp/go.mod +++ b/test/testrp/go.mod @@ -1,3 +1,3 @@ module testrp -go 1.24.1 +go 1.25.0 diff --git a/typespec/Applications.Core/applications.tsp b/typespec/Applications.Core/applications.tsp index 22a561d2b3..8fbddb34d6 100644 --- a/typespec/Applications.Core/applications.tsp +++ b/typespec/Applications.Core/applications.tsp @@ -44,32 +44,32 @@ model ApplicationResource @path @key("applicationName") @segment("applications") - @visibility("read", "create") + @visibility(Lifecycle.Read, Lifecycle.Create) name: ResourceNameString; } @doc("Application properties") model ApplicationProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Fully qualified resource ID for the environment that the application is linked to") environment: string; @doc("The application extension.") - @extension("x-ms-identifiers", []) - extensions?: Array; + @extension("x-ms-identifiers", #[]) + extensions?: Array; @doc("Status of a resource.") - @visibility("read") + @visibility(Lifecycle.Read) status?: ResourceStatus; } @doc("Describes the application architecture and its dependencies.") model ApplicationGraphResponse { @doc("The resources in the application graph.") - @extension("x-ms-identifiers", ["id"]) + @extension("x-ms-identifiers", #["id"]) resources: Array; } @@ -103,11 +103,11 @@ model ApplicationGraphResource { name: string; @doc("The resources that comprise this resource.") - @extension("x-ms-identifiers", ["id"]) + @extension("x-ms-identifiers", #["id"]) outputResources: Array; @doc("The connections between resources in the application graph.") - @extension("x-ms-identifiers", []) + @extension("x-ms-identifiers", #[]) connections: Array; @doc("provisioningState of this resource.") diff --git a/typespec/Applications.Core/containers.tsp b/typespec/Applications.Core/containers.tsp index 1aacc630c0..7a80e19f92 100644 --- a/typespec/Applications.Core/containers.tsp +++ b/typespec/Applications.Core/containers.tsp @@ -60,8 +60,8 @@ model ContainerProperties { identity?: IdentitySettings; @doc("Extensions spec of the resource") - @extension("x-ms-identifiers", []) - extensions?: Extension[]; + @extension("x-ms-identifiers", #[]) + extensions?: global.Extension[]; @doc("Specifies how the underlying container resource is provisioned and managed.") resourceProvisioning?: ContainerResourceProvisioning; diff --git a/typespec/Applications.Core/environments.tsp b/typespec/Applications.Core/environments.tsp index f181a19eda..c15c6d1ced 100644 --- a/typespec/Applications.Core/environments.tsp +++ b/typespec/Applications.Core/environments.tsp @@ -50,7 +50,7 @@ model EnvironmentResource @doc("Environment properties") model EnvironmentProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("The compute resource used by application environment.") @@ -69,8 +69,8 @@ model EnvironmentProperties { recipeConfig?: RecipeConfigProperties; @doc("The environment extension.") - @extension("x-ms-identifiers", []) - extensions?: Array; + @extension("x-ms-identifiers", #[]) + extensions?: Array; } @doc("Configuration for Recipes. Defines how each type of Recipe should be configured and run.") diff --git a/typespec/Applications.Core/gateways.tsp b/typespec/Applications.Core/gateways.tsp index cc29453e68..ae09b5b5b0 100644 --- a/typespec/Applications.Core/gateways.tsp +++ b/typespec/Applications.Core/gateways.tsp @@ -56,14 +56,14 @@ model GatewayProperties { hostname?: GatewayHostname; @doc("Routes attached to this Gateway") - @extension("x-ms-identifiers", []) + @extension("x-ms-identifiers", #[]) routes: GatewayRoute[]; @doc("TLS configuration for the Gateway.") tls?: GatewayTls; @doc("URL of the gateway resource. Readonly") - @visibility("read") + @visibility(Lifecycle.Read) url?: string; } diff --git a/typespec/Applications.Core/main.tsp b/typespec/Applications.Core/main.tsp index 2c39c8be69..65d97f3979 100644 --- a/typespec/Applications.Core/main.tsp +++ b/typespec/Applications.Core/main.tsp @@ -29,9 +29,7 @@ using TypeSpec.Versioning; using Azure.ResourceManager; @armProviderNamespace -@service({ - title: "Applications.Core Management APIs", -}) +@service(#{ title: "Applications.Core Management APIs" }) @doc("REST APIs for Applications.Core") @versioned(Versions) namespace Applications.Core; @@ -41,7 +39,5 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("Supported API versions for the Applications.Core resource provider.") enum Versions { @doc("2023-10-01-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2023_10_01_preview: "2023-10-01-preview", } diff --git a/typespec/Applications.Dapr/common.tsp b/typespec/Applications.Dapr/common.tsp index a473f97944..420aca8dab 100644 --- a/typespec/Applications.Dapr/common.tsp +++ b/typespec/Applications.Dapr/common.tsp @@ -21,7 +21,7 @@ using OpenAPI; @doc("The base properties of a Dapr component object.") model DaprResourceProperties { @doc("The name of the Dapr component object. Use this value in your code when interacting with the Dapr client to use the Dapr component.") - @visibility("read") + @visibility(Lifecycle.Read) componentName?: string; @doc("The metadata for Dapr resource which must match the values specified in Dapr component spec") diff --git a/typespec/Applications.Dapr/main.tsp b/typespec/Applications.Dapr/main.tsp index 136db3e46f..383a6f2d57 100644 --- a/typespec/Applications.Dapr/main.tsp +++ b/typespec/Applications.Dapr/main.tsp @@ -26,9 +26,7 @@ using TypeSpec.Versioning; using Azure.ResourceManager; @armProviderNamespace -@service({ - title: "Applications.Dapr Resource Management APIs", -}) +@service(#{ title: "Applications.Dapr Resource Management APIs" }) @doc("REST API for Applications.Dapr") @versioned(Versions) namespace Applications.Dapr; @@ -38,7 +36,5 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("Supported API versions for the Applications.Dapr resource provider.") enum Versions { @doc("2023-10-01-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2023_10_01_preview: "2023-10-01-preview", } diff --git a/typespec/Applications.Datastores/main.tsp b/typespec/Applications.Datastores/main.tsp index 8192c91083..1d33722da8 100644 --- a/typespec/Applications.Datastores/main.tsp +++ b/typespec/Applications.Datastores/main.tsp @@ -25,9 +25,7 @@ using TypeSpec.Versioning; using Azure.ResourceManager; @armProviderNamespace -@service({ - title: "Applications.Datastores Resource Management APIs", -}) +@service(#{ title: "Applications.Datastores Resource Management APIs" }) @doc("REST APIs for Applications.Datastores") @versioned(Versions) namespace Applications.Datastores; @@ -37,7 +35,5 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("Supported API versions for the Applications.Databases resource provider.") enum Versions { @doc("2023-10-01-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2023_10_01_preview: "2023-10-01-preview", } diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_CreateOrUpdate.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_CreateOrUpdate.json index d27d1aa9de..da2f4fd085 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_CreateOrUpdate.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_CreateOrUpdate.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_CreateOrUpdate", + "operationId": "RabbitMQQueues_CreateOrUpdate", "title": "Create Or Update a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Delete.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Delete.json index 2eacd771a0..9a66ce9d67 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Delete.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Delete.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_Delete", + "operationId": "RabbitMQQueues_Delete", "title": "Delete a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Get.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Get.json index 530a7c38ce..9b84c041c3 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Get.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Get.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_Get", + "operationId": "RabbitMQQueues_Get", "title": "Get a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_List.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_List.json index d5ecd4fa43..5ec4f76da2 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_List.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_List.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_ListByScope", + "operationId": "RabbitMQQueues_ListByScope", "title": "List RabbitMQQueue resources by resource group", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListByRootScope.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListByRootScope.json index 5e4658bc45..9e4acb8f83 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListByRootScope.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListByRootScope.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_ListByScope", + "operationId": "RabbitMQQueues_ListByScope", "title": "List RabbitMQQueue resources by rootScope", "parameters": { "rootScope": "/planes/radius/local", diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListSecrets.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListSecrets.json index 3be8480787..20961d606e 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListSecrets.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_ListSecrets.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_ListSecrets", + "operationId": "RabbitMQQueues_ListSecrets", "title": "List the secrets of a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Update.json b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Update.json index 04e9acfeca..1bf26a9fa4 100644 --- a/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Update.json +++ b/typespec/Applications.Messaging/examples/2023-10-01-preview/RabbitMQQueues_Update.json @@ -1,5 +1,5 @@ { - "operationId": "RabbitMqQueues_Update", + "operationId": "RabbitMQQueues_Update", "title": "Update a RabbitMQQueue resource", "parameters": { "rootScope": "/planes/radius/local/resourceGroups/testGroup", diff --git a/typespec/Applications.Messaging/main.tsp b/typespec/Applications.Messaging/main.tsp index 5a865bad5b..46598f5757 100644 --- a/typespec/Applications.Messaging/main.tsp +++ b/typespec/Applications.Messaging/main.tsp @@ -23,9 +23,7 @@ using TypeSpec.Versioning; using Azure.ResourceManager; @armProviderNamespace -@service({ - title: "Applications.Messaging Resource Management APIs", -}) +@service(#{ title: "Applications.Messaging Resource Management APIs" }) @doc("REST APIs for Applications.Messaging") @versioned(Versions) namespace Applications.Messaging; @@ -35,7 +33,5 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("Supported API versions for the Applications.Messaging resource provider.") enum Versions { @doc("2023-10-01-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2023_10_01_preview: "2023-10-01-preview", } diff --git a/typespec/Radius.Core/applications.tsp b/typespec/Radius.Core/applications.tsp index 0882629379..8d3a9de303 100644 --- a/typespec/Radius.Core/applications.tsp +++ b/typespec/Radius.Core/applications.tsp @@ -42,28 +42,28 @@ model ApplicationResource @path @key("applicationName") @segment("applications") - @visibility("read", "create") + @visibility(Lifecycle.Read, Lifecycle.Create) name: ResourceNameString; } @doc("Application properties") model ApplicationProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Fully qualified resource ID for the environment that the application is linked to") environment: string; @doc("Status of a resource.") - @visibility("read") + @visibility(Lifecycle.Read) status?: ResourceStatus; } @doc("Describes the application architecture and its dependencies.") model ApplicationGraphResponse { @doc("The resources in the application graph.") - @extension("x-ms-identifiers", ["id"]) + @extension("x-ms-identifiers", #["id"]) resources: Array; } @@ -97,11 +97,11 @@ model ApplicationGraphResource { name: string; @doc("The resources that comprise this resource.") - @extension("x-ms-identifiers", ["id"]) + @extension("x-ms-identifiers", #["id"]) outputResources: Array; @doc("The connections between resources in the application graph.") - @extension("x-ms-identifiers", []) + @extension("x-ms-identifiers", #[]) connections: Array; @doc("provisioningState of this resource.") diff --git a/typespec/Radius.Core/environments.tsp b/typespec/Radius.Core/environments.tsp index 25aca17aec..ee33c28dd6 100644 --- a/typespec/Radius.Core/environments.tsp +++ b/typespec/Radius.Core/environments.tsp @@ -48,7 +48,7 @@ model EnvironmentResource @doc("Environment properties") model EnvironmentProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("List of Recipe Pack resource IDs linked to this environment.") diff --git a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_CreateOrUpdate.json b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_CreateOrUpdate.json index 3ed71a50f3..c803d5088b 100644 --- a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_CreateOrUpdate.json +++ b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_CreateOrUpdate.json @@ -8,7 +8,6 @@ "RecipePackResource": { "location": "West US", "properties": { - "description": "Azure container recipes for common container patterns", "recipes": { "Applications.Core/containers": { "recipeKind": "bicep", @@ -39,7 +38,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-env" ], diff --git a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_Get.json b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_Get.json index 2c6d41c50e..e5c6b50be1 100644 --- a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_Get.json +++ b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_Get.json @@ -15,7 +15,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-env" ], diff --git a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_List.json b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_List.json index 5e5c3feb93..e38bbd79b1 100644 --- a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_List.json +++ b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_List.json @@ -15,7 +15,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/group1/providers/Radius.Core/environments/my-env" ], @@ -34,7 +33,6 @@ "location": "East US", "properties": { "provisioningState": "Succeeded", - "description": "Kubernetes native recipes", "referencedBy": [], "recipes": { "Applications.Core/containers": { diff --git a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_ListByScope.json b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_ListByScope.json index 53ff2db406..5f0e6e532c 100644 --- a/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_ListByScope.json +++ b/typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_ListByScope.json @@ -16,7 +16,6 @@ "location": "West US", "properties": { "provisioningState": "Succeeded", - "description": "Azure container recipes for common container patterns", "referencedBy": [ "/planes/radius/local/resourceGroups/testGroup/providers/Radius.Core/environments/my-env" ], @@ -35,7 +34,6 @@ "location": "East US", "properties": { "provisioningState": "Succeeded", - "description": "Kubernetes native recipes", "referencedBy": [], "recipes": { "Applications.Core/containers": { diff --git a/typespec/Radius.Core/main.tsp b/typespec/Radius.Core/main.tsp index aa778181dc..e09ad9da07 100644 --- a/typespec/Radius.Core/main.tsp +++ b/typespec/Radius.Core/main.tsp @@ -21,9 +21,7 @@ using Azure.Core; using OpenAPI; @armProviderNamespace -@service({ - title: "Radius Core Resource Provider", -}) +@service(#{ title: "Radius Core Resource Provider" }) @doc("REST APIs for next-generation Radius Core resources (preview).") @versioned(Versions) namespace Radius.Core; @@ -31,8 +29,6 @@ namespace Radius.Core; @doc("Supported API versions for the Radius.Core resource provider.") enum Versions { @doc("2025-08-01-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2025_08_01_preview: "2025-08-01-preview", } diff --git a/typespec/Radius.Core/recipePacks.tsp b/typespec/Radius.Core/recipePacks.tsp index 81aaaada2a..2b9b494024 100644 --- a/typespec/Radius.Core/recipePacks.tsp +++ b/typespec/Radius.Core/recipePacks.tsp @@ -44,14 +44,11 @@ model RecipePackResource @doc("Recipe Pack properties") model RecipePackProperties { @doc("The status of the asynchronous operation") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; - @doc("Description of what this recipe pack provides") - description?: string; - @doc("List of environment IDs that reference this recipe pack") - @visibility("read") + @visibility(Lifecycle.Read) referencedBy?: string[]; @doc("Map of resource types to their recipe configurations") diff --git a/typespec/Test.Resource/main.tsp b/typespec/Test.Resource/main.tsp index eee535caff..52ca3a5d00 100644 --- a/typespec/Test.Resource/main.tsp +++ b/typespec/Test.Resource/main.tsp @@ -26,9 +26,7 @@ using TypeSpec.Versioning; using Azure.ResourceManager; @armProviderNamespace -@service({ - title: "Test.Resource Resource Management APIs", -}) +@service(#{ title: "Test.Resource Resource Management APIs" }) @doc("REST APIs for Test.Resource") @versioned(Versions) namespace Test.Resource; @@ -38,12 +36,8 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("Supported API versions for the Test.Resource resource provider.") enum Versions { @doc("2022-08-19-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2022_08_19_preview: "2022-08-19-preview", @doc("2023-08-19") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2023_08_19: "2023-08-19", } diff --git a/typespec/UCP/aws-credentials.tsp b/typespec/UCP/aws-credentials.tsp index 8755c9e67b..087824d289 100644 --- a/typespec/UCP/aws-credentials.tsp +++ b/typespec/UCP/aws-credentials.tsp @@ -74,7 +74,7 @@ model AwsCredentialProperties { kind: AWSCredentialKind; @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; } @@ -136,6 +136,7 @@ interface AwsCredentials { >; @doc("Update an AWS credential") + @patch(#{ implicitOptionality: true }) update is UcpCustomPatchSync< AwsCredentialResource, AwsCredentialBaseParameter diff --git a/typespec/UCP/aws-plane.tsp b/typespec/UCP/aws-plane.tsp index b6305f5608..1550f80615 100644 --- a/typespec/UCP/aws-plane.tsp +++ b/typespec/UCP/aws-plane.tsp @@ -56,7 +56,7 @@ model AwsPlaneResource @doc("The Plane properties.") model AwsPlaneResourceProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; } @@ -66,6 +66,7 @@ interface AwsPlanes { @doc("List AWS planes") @get @route("/aws") + @list @armResourceList(AwsPlaneResource) list( ...ApiVersionParameter, @@ -84,6 +85,7 @@ interface AwsPlanes { >; @doc("Update a plane") + @patch(#{ implicitOptionality: true }) update is UcpCustomPatchAsync< AwsPlaneResource, PlaneBaseParameters diff --git a/typespec/UCP/azure-credentials.tsp b/typespec/UCP/azure-credentials.tsp index 5d4231f291..6401425c95 100644 --- a/typespec/UCP/azure-credentials.tsp +++ b/typespec/UCP/azure-credentials.tsp @@ -75,7 +75,7 @@ model AzureCredentialProperties { kind: AzureCredentialKind; @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; } @@ -143,6 +143,7 @@ interface AzureCredentials { >; @doc("Update an Azure credential") + @patch(#{ implicitOptionality: true }) update is UcpCustomPatchSync< AzureCredentialResource, AzureCredentialBaseParameter diff --git a/typespec/UCP/azure-plane.tsp b/typespec/UCP/azure-plane.tsp index a735a6b5a5..6d4d085726 100644 --- a/typespec/UCP/azure-plane.tsp +++ b/typespec/UCP/azure-plane.tsp @@ -56,7 +56,7 @@ model AzurePlaneResource @doc("The Plane properties.") model AzurePlaneResourceProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("The URL used to proxy requests.") @@ -69,6 +69,7 @@ interface AzurePlanes { @doc("List azure planes") @get @route("/azure") + @list @armResourceList(AzurePlaneResource) list( ...ApiVersionParameter, @@ -87,6 +88,7 @@ interface AzurePlanes { >; @doc("Update a plane") + @patch(#{ implicitOptionality: true }) update is UcpCustomPatchAsync< AzurePlaneResource, PlaneBaseParameters diff --git a/typespec/UCP/common.tsp b/typespec/UCP/common.tsp index 17d64d5b33..7af1ea3edc 100644 --- a/typespec/UCP/common.tsp +++ b/typespec/UCP/common.tsp @@ -64,6 +64,6 @@ model InternalCredentialStorageProperties extends CredentialStorageProperties { kind: CredentialStorageKind.Internal; @doc("The name of secret stored.") - @visibility("read") + @visibility(Lifecycle.Read) secretName: string; } diff --git a/typespec/UCP/main.tsp b/typespec/UCP/main.tsp index 97e2761142..6bca97ebe4 100644 --- a/typespec/UCP/main.tsp +++ b/typespec/UCP/main.tsp @@ -35,9 +35,7 @@ using Azure.ResourceManager; #suppress "@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint" @armProviderNamespace -@service({ - title: "Universal Control Plane Resource Management APIs", -}) +@service(#{ title: "Universal Control Plane Resource Management APIs" }) @doc("REST APIs for Universal Control Plane") @versioned(Versions) namespace Ucp; @@ -45,7 +43,5 @@ namespace Ucp; @doc("Supported API versions for Universal Control Plane resource provider.") enum Versions { @doc("2023-10-01-preview") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) v2023_10_01_preview: "2023-10-01-preview", } diff --git a/typespec/UCP/planes.tsp b/typespec/UCP/planes.tsp index a92d919cd7..e123211ffb 100644 --- a/typespec/UCP/planes.tsp +++ b/typespec/UCP/planes.tsp @@ -70,7 +70,7 @@ model GenericPlaneResource @doc("The properties of the generic representation of a plane resource.") model GenericPlaneResourceProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; } diff --git a/typespec/UCP/radius-plane.tsp b/typespec/UCP/radius-plane.tsp index 84997c508c..6fba4122f0 100644 --- a/typespec/UCP/radius-plane.tsp +++ b/typespec/UCP/radius-plane.tsp @@ -55,7 +55,7 @@ model RadiusPlaneResource @doc("The Plane properties.") model RadiusPlaneResourceProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Resource Providers for UCP Native Plane") @@ -68,6 +68,7 @@ interface RadiusPlanes { @doc("List Radius planes") @get @route("/radius") + @list @armResourceList(RadiusPlaneResource) list( ...ApiVersionParameter, @@ -86,6 +87,7 @@ interface RadiusPlanes { >; @doc("Update a plane") + @patch(#{ implicitOptionality: true }) update is UcpCustomPatchAsync< RadiusPlaneResource, PlaneBaseParameters diff --git a/typespec/UCP/resourcegroups.tsp b/typespec/UCP/resourcegroups.tsp index 5306bf7891..2808d4e0e3 100644 --- a/typespec/UCP/resourcegroups.tsp +++ b/typespec/UCP/resourcegroups.tsp @@ -48,7 +48,7 @@ model ResourceGroupResource is TrackedResource { @doc("The resource group resource properties") model ResourceGroupProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; } @@ -59,7 +59,7 @@ model GenericResource extends ProxyResource { @path @key("resourceName") @segment("resources") - @visibility("read") + @visibility(Lifecycle.Read) name: ResourceNameString; } @@ -94,6 +94,7 @@ interface ResourceGroups { >; @doc("Update a resource group") + @patch(#{ implicitOptionality: true }) update is UcpCustomPatchSync< ResourceGroupResource, ResourceGroupBaseParameters diff --git a/typespec/UCP/resourceproviders.tsp b/typespec/UCP/resourceproviders.tsp index 57ddff4afe..fb48b30a49 100644 --- a/typespec/UCP/resourceproviders.tsp +++ b/typespec/UCP/resourceproviders.tsp @@ -71,7 +71,7 @@ model ResourceProviderResource @doc("The properties of a resource provider.") model ResourceProviderProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; } @@ -93,7 +93,7 @@ scalar Capability extends string; @doc("The properties of a resource type.") model ResourceTypeProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("The resource type capabilities.") @@ -119,7 +119,7 @@ model ApiVersionResource @doc("The properties of an API version.") model ApiVersionProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Schema is the schema for the resource type.") @@ -139,7 +139,7 @@ model LocationResource @doc("The properties of a location.") model LocationProperties { @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Address of a resource provider implementation.") @@ -249,6 +249,7 @@ interface ResourceProviders { @doc("List resource provider summaries. The resource provider summary aggregates the most commonly used information including locations, api versions and resource types.") @segment("providers") + @list listProviderSummaries( ...PlaneBaseParameters, ): Azure.Core.Page | ErrorResponse; diff --git a/typespec/UCP/ucp-operations.tsp b/typespec/UCP/ucp-operations.tsp index e2fa14abc7..a19366d8e8 100644 --- a/typespec/UCP/ucp-operations.tsp +++ b/typespec/UCP/ucp-operations.tsp @@ -34,6 +34,7 @@ using OpenAPI; @autoRoute @doc("List {name}", TResource) @segmentOf(TResource) +@list @armResourceList(TResource) op UcpResourceList( ...TBaseParameters, @@ -55,9 +56,7 @@ op UcpResourceRead( @extension("x-ms-long-running-operation", true) @extension( "x-ms-long-running-operation-options", - { - `final-state-via`: "azure-async-operation", - } + #{ `final-state-via`: "azure-async-operation" } ) @armResourceCreateOrUpdate(TResource) @put @@ -68,7 +67,7 @@ op UcpResourceCreateOrUpdateAsync< ...TBaseParameters, @doc("Resource create parameters.") - @body + @bodyRoot resource: TResource, ): ArmResourceUpdatedResponse | ArmResourceCreatedResponse | ErrorResponse; @@ -78,9 +77,7 @@ op UcpResourceCreateOrUpdateAsync< @extension("x-ms-long-running-operation", true) @extension( "x-ms-long-running-operation-options", - { - `final-state-via`: "location", - } + #{ `final-state-via`: "location" } ) @armResourceUpdate(TResource) @patch @@ -102,9 +99,7 @@ op UcpCustomPatchAsync< @extension("x-ms-long-running-operation", true) @extension( "x-ms-long-running-operation-options", - { - `final-state-via`: "location", - } + #{ `final-state-via`: "location" } ) @armResourceDelete(TResource) @delete @@ -129,7 +124,7 @@ op UcpResourceCreateOrUpdateSync< ...TBaseParameters, @doc("Resource create parameters.") - @body + @bodyRoot resource: TResource, ): ArmResourceUpdatedResponse | ArmResourceCreatedSyncResponse | ErrorResponse; diff --git a/typespec/package-lock.json b/typespec/package-lock.json index 4b5beda242..7375d0e8e9 100644 --- a/typespec/package-lock.json +++ b/typespec/package-lock.json @@ -9,127 +9,145 @@ "version": "0.1.0", "license": "Apache-2.0", "dependencies": { - "@azure-tools/typespec-autorest": "~0.52.0", - "@azure-tools/typespec-azure-core": "~0.52.0", - "@azure-tools/typespec-azure-resource-manager": "~0.52.0", - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0", - "@typespec/openapi": "~0.66.0", - "@typespec/rest": "~0.66.0", - "@typespec/versioning": "~0.66.0" + "@azure-tools/typespec-autorest": "~0.61.1", + "@azure-tools/typespec-azure-core": "~0.61.0", + "@azure-tools/typespec-azure-resource-manager": "~0.61.1", + "@typespec/compiler": "~1.5.0", + "@typespec/http": "~1.6.0", + "@typespec/openapi": "~1.5.0", + "@typespec/rest": "~0.75.0", + "@typespec/versioning": "~0.75.0" } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.52.0.tgz", - "integrity": "sha512-r08neSPfski9Q3Jvp6tardmS4KXHOML0wSdz5DZgVg0UN+yaVFgLIvMy7VwS636bjpNhwZj8gMT4jYyVM44hlw==", + "version": "0.61.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.61.1.tgz", + "integrity": "sha512-wv7Pk6c0HfWPTpR3jv5OsgzI0UmxhuriqiHu8X/0SRQBGlL4+Lwbf1UATEkLaqXpqlHZ80p7HKfUZOtDR4/yVg==", "license": "MIT", "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.52.0", - "@azure-tools/typespec-azure-resource-manager": "~0.52.0", - "@azure-tools/typespec-client-generator-core": "~0.52.0", - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0", - "@typespec/openapi": "~0.66.0", - "@typespec/rest": "~0.66.0", - "@typespec/versioning": "~0.66.0" + "@azure-tools/typespec-azure-core": "^0.61.0", + "@azure-tools/typespec-azure-resource-manager": "^0.61.1", + "@azure-tools/typespec-client-generator-core": "^0.61.3", + "@typespec/compiler": "^1.5.0", + "@typespec/http": "^1.5.0", + "@typespec/openapi": "^1.5.0", + "@typespec/rest": "^0.75.0", + "@typespec/versioning": "^0.75.0", + "@typespec/xml": "^0.75.0" + }, + "peerDependenciesMeta": { + "@typespec/xml": { + "optional": true + } } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.52.0.tgz", - "integrity": "sha512-pZkzjQCIgnUdVY0e4YNAAD3vN3HaZim1MMZJRiQaD5vK7WuQQLKYfOf/y8W5zim0GLpvKLNg8mMMmPrRZlW0BQ==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.61.0.tgz", + "integrity": "sha512-sqOYBUghAtVMBiAWwT3fMRVSDNwR7IU3AQ96n/ErhAthwWjTe7PFVfK/MPjpI1mO3cdyLeS2DGyI3gt/waWP4g==", "license": "MIT", "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0", - "@typespec/rest": "~0.66.0" + "@typespec/compiler": "^1.5.0", + "@typespec/http": "^1.5.0", + "@typespec/rest": "^0.75.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.52.0.tgz", - "integrity": "sha512-A5nCTEWdAo1tpG5nwWHDMDqEAopp3K3CgbnOB0wwiAV8+zkr5qNC0/48WQvu7pmwlgMDgdvZpNty3bWdLRztQQ==", + "version": "0.61.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.61.1.tgz", + "integrity": "sha512-+BVZf1OfSZfEaXsOp1ZUCyjjZjC465ieIAr1zEz4yD7KaWGW+yE/w+HXbsRNNw0B52FhgVcWX6iVuvBtMZpNMQ==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.52.0", - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0", - "@typespec/openapi": "~0.66.0", - "@typespec/rest": "~0.66.0", - "@typespec/versioning": "~0.66.0" + "@azure-tools/typespec-azure-core": "^0.61.0", + "@typespec/compiler": "^1.5.0", + "@typespec/http": "^1.5.0", + "@typespec/openapi": "^1.5.0", + "@typespec/rest": "^0.75.0", + "@typespec/versioning": "^0.75.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.52.0.tgz", - "integrity": "sha512-P1kh4mkqPmZY0JsJAtnTRDjzynI05TybgRTsaEnQtFwnlbfUzu1KtKDF4midQDMT6Ao8JEt/S2Nd4nQ1/qrHyQ==", + "version": "0.61.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.61.3.tgz", + "integrity": "sha512-CUhw8vkMzDTYlRfddQERT0ZEJAtwjKteRNuhs1S3IrDceJlHEiXTK+FpPwen/F5DBbj1w2SgnSFfaJ3fL171/w==", "license": "MIT", "peer": true, "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0", - "yaml": "~2.7.0" + "yaml": "~2.8.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.52.0", - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0", - "@typespec/openapi": "~0.66.0", - "@typespec/rest": "~0.66.0", - "@typespec/versioning": "~0.66.0", - "@typespec/xml": "~0.66.0" + "@azure-tools/typespec-azure-core": "^0.61.0", + "@typespec/compiler": "^1.5.0", + "@typespec/events": "^0.75.0", + "@typespec/http": "^1.5.0", + "@typespec/openapi": "^1.5.0", + "@typespec/rest": "^0.75.0", + "@typespec/sse": "^0.75.0", + "@typespec/streams": "^0.75.0", + "@typespec/versioning": "^0.75.0", + "@typespec/xml": "^0.75.0" } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, + "node_modules/@inquirer/ansi": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.1.tgz", + "integrity": "sha512-yqq0aJW/5XPhi5xOAL1xRCpe1eh8UFVgYFpFsjEqmIR8rKLyP+HINvFXwUaxYICflJrVlxnp7lLN6As735kVpw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.4.tgz", - "integrity": "sha512-d30576EZdApjAMceijXA5jDzRQHT/MygbC+J8I7EqA6f/FRpYxlRtRJbHF8gHeWYeSdOuTEJqonn7QLB1ELezA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.3.0.tgz", + "integrity": "sha512-5+Q3PKH35YsnoPTh75LucALdAxom6xh5D1oeY561x4cqBuH24ZFVyFREPe14xgnrtmGu3EEt1dIi60wRVSnGCw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.5", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.1", + "@inquirer/core": "^10.3.0", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -145,13 +163,13 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.8.tgz", - "integrity": "sha512-dNLWCYZvXDjO3rnQfk2iuJNL4Ivwz/T2+C3+WnNfJKsNGSuOs3wAo2F6e0p946gtSAk31nZMfW+MRmYaplPKsg==", + "version": "5.1.19", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.19.tgz", + "integrity": "sha512-wQNz9cfcxrtEnUyG5PndC8g3gZ7lGDBzmWiXZkX8ot3vfZ+/BLjR8EvyGX4YzQLeVqtAlY/YScZpW7CW8qMoDQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5" + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -166,14 +184,14 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.15", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.15.tgz", - "integrity": "sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.0.tgz", + "integrity": "sha512-Uv2aPPPSK5jeCplQmQ9xadnFx2Zhj9b5Dj7bU6ZeCdDNNY11nhYy4btcSdtDguHqCT2h5oNeQTcUNSGGLA7NTA==", "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.13", - "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.1", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", @@ -193,14 +211,14 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.17", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.17.tgz", - "integrity": "sha512-r6bQLsyPSzbWrZZ9ufoWL+CztkSatnJ6uSxqd6N+o41EZC51sQeWOzI6s5jLb+xxTWxl7PlUppqm8/sow241gg==", + "version": "4.2.21", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.21.tgz", + "integrity": "sha512-MjtjOGjr0Kh4BciaFShYpZ1s9400idOdvQ5D7u7lE6VztPFoyLcVNE5dXBmEEIQq5zi4B9h2kU+q7AVBxJMAkQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.15", - "@inquirer/external-editor": "^1.0.1", - "@inquirer/type": "^3.0.8" + "@inquirer/core": "^10.3.0", + "@inquirer/external-editor": "^1.0.2", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -215,13 +233,13 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.11.tgz", - "integrity": "sha512-OZSUW4hFMW2TYvX/Sv+NnOZgO8CHT2TU1roUCUIF2T+wfw60XFRRp9MRUPCT06cRnKL+aemt2YmTWwt7rOrNEA==", + "version": "4.0.21", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.21.tgz", + "integrity": "sha512-+mScLhIcbPFmuvU3tAGBed78XvYHSvCl6dBiYMlzCLhpr0bzGzd8tfivMMeqND6XZiaZ1tgusbUHJEfc6YzOdA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5", + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -237,13 +255,13 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", - "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", "license": "MIT", "dependencies": { "chardet": "^2.1.0", - "iconv-lite": "^0.6.3" + "iconv-lite": "^0.7.0" }, "engines": { "node": ">=18" @@ -258,22 +276,22 @@ } }, "node_modules/@inquirer/figures": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", - "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.14.tgz", + "integrity": "sha512-DbFgdt+9/OZYFM+19dbpXOSeAstPy884FPy1KjDu4anWwymZeOYhMY1mdFri172htv6mvc/uvIAAi7b7tvjJBQ==", "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@inquirer/input": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.8.tgz", - "integrity": "sha512-WXJI16oOZ3/LiENCAxe8joniNp8MQxF6Wi5V+EBbVA0ZIOpFcL4I9e7f7cXse0HJeIPCWO8Lcgnk98juItCi7Q==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.5.tgz", + "integrity": "sha512-7GoWev7P6s7t0oJbenH0eQ0ThNdDJbEAEtVt9vsrYZ9FulIokvd823yLyhQlWHJPGce1wzP53ttfdCZmonMHyA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5" + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -288,13 +306,13 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.11.tgz", - "integrity": "sha512-pQK68CsKOgwvU2eA53AG/4npRTH2pvs/pZ2bFvzpBhrznh8Mcwt19c+nMO7LHRr3Vreu1KPhNBF3vQAKrjIulw==", + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.21.tgz", + "integrity": "sha512-5QWs0KGaNMlhbdhOSCFfKsW+/dcAVC2g4wT/z2MCiZM47uLgatC5N20kpkDQf7dHx+XFct/MJvvNGy6aYJn4Pw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5" + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -309,14 +327,14 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.11.tgz", - "integrity": "sha512-dH6zLdv+HEv1nBs96Case6eppkRggMe8LoOTl30+Gq5Wf27AO/vHFgStTVz4aoevLdNXqwE23++IXGw4eiOXTg==", + "version": "4.0.21", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.21.tgz", + "integrity": "sha512-xxeW1V5SbNFNig2pLfetsDb0svWlKuhmr7MPJZMYuDnCTkpVBI+X/doudg4pznc1/U+yYmWFFOi4hNvGgUo7EA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.1", + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -331,21 +349,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.4.0.tgz", - "integrity": "sha512-EZiJidQOT4O5PYtqnu1JbF0clv36oW2CviR66c7ma4LsupmmQlUwmdReGKRp456OWPWMz3PdrPiYg3aCk3op2w==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.9.0.tgz", + "integrity": "sha512-X7/+dG9SLpSzRkwgG5/xiIzW0oMrV3C0HOa7YHG1WnrLK+vCQHfte4k/T80059YBdei29RBC3s+pSMvPJDU9/A==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.4", - "@inquirer/confirm": "^5.1.8", - "@inquirer/editor": "^4.2.9", - "@inquirer/expand": "^4.0.11", - "@inquirer/input": "^4.1.8", - "@inquirer/number": "^3.0.11", - "@inquirer/password": "^4.0.11", - "@inquirer/rawlist": "^4.0.11", - "@inquirer/search": "^3.0.11", - "@inquirer/select": "^4.1.0" + "@inquirer/checkbox": "^4.3.0", + "@inquirer/confirm": "^5.1.19", + "@inquirer/editor": "^4.2.21", + "@inquirer/expand": "^4.0.21", + "@inquirer/input": "^4.2.5", + "@inquirer/number": "^3.0.21", + "@inquirer/password": "^4.0.21", + "@inquirer/rawlist": "^4.1.9", + "@inquirer/search": "^3.2.0", + "@inquirer/select": "^4.4.0" }, "engines": { "node": ">=18" @@ -360,13 +378,13 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.11.tgz", - "integrity": "sha512-uAYtTx0IF/PqUAvsRrF3xvnxJV516wmR6YVONOmCWJbbt87HcDHLfL9wmBQFbNJRv5kCjdYKrZcavDkH3sVJPg==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.9.tgz", + "integrity": "sha512-AWpxB7MuJrRiSfTKGJ7Y68imYt8P9N3Gaa7ySdkFj1iWjr6WfbGAhdZvw/UnhFXTHITJzxGUI9k8IX7akAEBCg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5", + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -382,14 +400,14 @@ } }, "node_modules/@inquirer/search": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.11.tgz", - "integrity": "sha512-9CWQT0ikYcg6Ls3TOa7jljsD7PgjcsYEM0bYE+Gkz+uoW9u8eaJCRHJKkucpRE5+xKtaaDbrND+nPDoxzjYyew==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.2.0.tgz", + "integrity": "sha512-a5SzB/qrXafDX1Z4AZW3CsVoiNxcIYCzYP7r9RzrfMpaLpB+yWi5U8BWagZyLmwR0pKbbL5umnGRd0RzGVI8bQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.5", + "@inquirer/core": "^10.3.0", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -405,15 +423,15 @@ } }, "node_modules/@inquirer/select": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.1.0.tgz", - "integrity": "sha512-z0a2fmgTSRN+YBuiK1ROfJ2Nvrpij5lVN3gPDkQGhavdvIVGHGW29LwYZfM/j42Ai2hUghTI/uoBuTbrJk42bA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.4.0.tgz", + "integrity": "sha512-kaC3FHsJZvVyIjYBs5Ih8y8Bj4P/QItQWrZW22WJax7zTN+ZPXVGuOM55vzbdCP9zKUiBd9iEJVdesujfF+cAA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.5", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.1", + "@inquirer/core": "^10.3.0", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -429,9 +447,9 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", - "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.9.tgz", + "integrity": "sha512-QPaNt/nmE2bLGQa9b7wwyRJoLZ7pN6rcyXvzU0YCmivmJyq1BVo94G98tStRWkoD1RgDX5C+dPlhhHzNdu/W/w==", "license": "MIT", "engines": { "node": ">=18" @@ -445,52 +463,6 @@ } } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -503,12 +475,6 @@ "node": ">=18.0.0" } }, - "node_modules/@isaacs/string-locale-compare": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", - "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", - "license": "ISC" - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -544,1765 +510,486 @@ "node": ">= 8" } }, - "node_modules/@npmcli/agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz", - "integrity": "sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==", - "license": "ISC", - "dependencies": { - "agent-base": "^7.1.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.1", - "lru-cache": "^10.0.1", - "socks-proxy-agent": "^8.0.3" - }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@npmcli/arborist": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-8.0.0.tgz", - "integrity": "sha512-APDXxtXGSftyXibl0dZ3CuZYmmVnkiN3+gkqwXshY4GKC2rof2+Lg0sGuj6H1p2YfBAKd7PRwuMVhu6Pf/nQ/A==", - "license": "ISC", + "node_modules/@typespec/compiler": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.5.0.tgz", + "integrity": "sha512-REJgZOEZ9g9CC72GGT0+nLbjW+5WVlCfm1d6w18N5RsUo7vLXs8IPXwq7xZJzoqU99Q9B4keqzPuTU4OrDUTrA==", + "license": "MIT", "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^4.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/map-workspaces": "^4.0.1", - "@npmcli/metavuln-calculator": "^8.0.0", - "@npmcli/name-from-folder": "^3.0.0", - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.1", - "@npmcli/query": "^4.0.0", - "@npmcli/redact": "^3.0.0", - "@npmcli/run-script": "^9.0.1", - "bin-links": "^5.0.0", - "cacache": "^19.0.1", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^8.0.0", - "json-parse-even-better-errors": "^4.0.0", - "json-stringify-nice": "^1.1.4", - "lru-cache": "^10.2.2", - "minimatch": "^9.0.4", - "nopt": "^8.0.0", - "npm-install-checks": "^7.1.0", - "npm-package-arg": "^12.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.1", - "pacote": "^19.0.0", - "parse-conflict-json": "^4.0.0", - "proc-log": "^5.0.0", - "proggy": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^4.0.0", - "semver": "^7.3.7", - "ssri": "^12.0.0", - "treeverse": "^3.0.0", - "walk-up-path": "^3.0.1" + "@babel/code-frame": "~7.27.1", + "@inquirer/prompts": "^7.4.0", + "ajv": "~8.17.1", + "change-case": "~5.4.4", + "env-paths": "^3.0.0", + "globby": "~14.1.0", + "is-unicode-supported": "^2.1.0", + "mustache": "~4.2.0", + "picocolors": "~1.1.1", + "prettier": "~3.6.2", + "semver": "^7.7.1", + "tar": "^7.4.3", + "temporal-polyfill": "^0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.12", + "yaml": "~2.8.0", + "yargs": "~18.0.0" }, "bin": { - "arborist": "bin/index.js" + "tsp": "cmd/tsp.js", + "tsp-server": "cmd/tsp-server.js" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=20.0.0" } }, - "node_modules/@npmcli/fs": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-4.0.0.tgz", - "integrity": "sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==", - "license": "ISC", - "dependencies": { - "semver": "^7.3.5" - }, + "node_modules/@typespec/events": { + "version": "0.75.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.75.0.tgz", + "integrity": "sha512-V7unXnj+sZoa/1wQG8G6x2TiQqotx18S/qFbDzdfJRPCVpH/Z3xIpppce4jTZALXT97tKZK5GDHijn2zWuWWxg==", + "license": "MIT", + "peer": true, "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@npmcli/git": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-6.0.3.tgz", - "integrity": "sha512-GUYESQlxZRAdhs3UhbB6pVRNUELQOHXwK9ruDkwmCv2aZ5y0SApQzUJCg02p3A7Ue2J5hxvlk1YI53c00NmRyQ==", - "license": "ISC", - "dependencies": { - "@npmcli/promise-spawn": "^8.0.0", - "ini": "^5.0.0", - "lru-cache": "^10.0.1", - "npm-pick-manifest": "^10.0.0", - "proc-log": "^5.0.0", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^5.0.0" + "node": ">=20.0.0" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "peerDependencies": { + "@typespec/compiler": "^1.5.0" } }, - "node_modules/@npmcli/installed-package-contents": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-3.0.0.tgz", - "integrity": "sha512-fkxoPuFGvxyrH+OQzyTkX2LUEamrF4jZSmxjAtPPHHGO0dqsQ8tTKjnIS8SAnPHdk2I03BDtSMR5K/4loKg79Q==", - "license": "ISC", - "dependencies": { - "npm-bundled": "^4.0.0", - "npm-normalize-package-bin": "^4.0.0" + "node_modules/@typespec/http": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.6.0.tgz", + "integrity": "sha512-q/JwVw21CF4buE3ZS+xSoy2TKAOwyhZ7g3kdNqCgm69BI5p5GGu+3ZlUA+4Blk8hkt0G8XcIN8fhJP+a4O6KAw==", + "license": "MIT", + "engines": { + "node": ">=20.0.0" }, - "bin": { - "installed-package-contents": "bin/index.js" + "peerDependencies": { + "@typespec/compiler": "^1.6.0", + "@typespec/streams": "^0.76.0" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } } }, - "node_modules/@npmcli/map-workspaces": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-4.0.2.tgz", - "integrity": "sha512-mnuMuibEbkaBTYj9HQ3dMe6L0ylYW+s/gfz7tBDMFY/la0w9Kf44P9aLn4/+/t3aTR3YUHKoT6XQL9rlicIe3Q==", - "license": "ISC", - "dependencies": { - "@npmcli/name-from-folder": "^3.0.0", - "@npmcli/package-json": "^6.0.0", - "glob": "^10.2.2", - "minimatch": "^9.0.0" - }, + "node_modules/@typespec/openapi": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.5.0.tgz", + "integrity": "sha512-27sXkSK2r1sAmVMLv+pwlN/Cm+yg9nEK8iuGyJRuEkBk7hcsJDbTnBlsEvlRTI8DqljtzA7YECDHBLK88zZHeg==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.5.0", + "@typespec/http": "^1.5.0" } }, - "node_modules/@npmcli/metavuln-calculator": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-8.0.1.tgz", - "integrity": "sha512-WXlJx9cz3CfHSt9W9Opi1PTFc4WZLFomm5O8wekxQZmkyljrBRwATwDxfC9iOXJwYVmfiW1C1dUe0W2aN0UrSg==", - "license": "ISC", - "dependencies": { - "cacache": "^19.0.0", - "json-parse-even-better-errors": "^4.0.0", - "pacote": "^20.0.0", - "proc-log": "^5.0.0", - "semver": "^7.3.5" - }, + "node_modules/@typespec/rest": { + "version": "0.75.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.75.0.tgz", + "integrity": "sha512-rQ+RP0kcrKWjbpCIkBd8hpxYSNc3CfQxl0MLP1+MYGRHlHL8ss4xbwdANIYZXZZ2i2Hqt19B7cEUGD4MLoCHvw==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.5.0", + "@typespec/http": "^1.5.0" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "license": "ISC", + "node_modules/@typespec/sse": { + "version": "0.75.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.75.0.tgz", + "integrity": "sha512-8iODUY3C/0hR9sTzyHeTgYfZkKeqZM+/P0OmN1ZWlLUokXQ67yydGXIqnjl+yaeuntwN8H2DDwLguU15c+j+UQ==", + "license": "MIT", + "peer": true, "engines": { - "node": ">=10" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.5.0", + "@typespec/events": "^0.75.0", + "@typespec/http": "^1.5.0", + "@typespec/streams": "^0.75.0" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/@typespec/streams": { + "version": "0.75.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.75.0.tgz", + "integrity": "sha512-ubvxCN+SZwN9aEarz8CPtMJgnopeu8dXyut47q0FAPp9nykmXy7s+dmsopR+7OX0Fhcnh8ZFYTQcJzJ3QftOiQ==", "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, + "peer": true, "engines": { - "node": ">= 8" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.5.0" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, + "node_modules/@typespec/versioning": { + "version": "0.75.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.75.0.tgz", + "integrity": "sha512-wdLcVx5UW4WRks/OXfqLiaDTtWfAWgv/nj69u99gRJU6iY9ExEvK5x9NQszZQKYnu6tM7nkoYMg4zu+7YBUBaw==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.5.0" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "node_modules/@typespec/xml": { + "version": "0.75.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.75.0.tgz", + "integrity": "sha512-JVafN1nZE3BcQrKbaAFVWw/IleTRdsJpwT3oZ2m7EfWnG30sKtoR9inF9dRoW+XXIjNzCfeYqjkwzEkEnIrCww==", "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, + "peer": true, "engines": { - "node": ">=10" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.5.0" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/pacote": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-20.0.0.tgz", - "integrity": "sha512-pRjC5UFwZCgx9kUFDVM9YEahv4guZ1nSLqwmWiLUnDbGsjs+U5w7z6Uc8HNR1a6x8qnu5y9xtGE6D1uAuYz+0A==", - "license": "ISC", + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", "dependencies": { - "@npmcli/git": "^6.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/package-json": "^6.0.0", - "@npmcli/promise-spawn": "^8.0.0", - "@npmcli/run-script": "^9.0.0", - "cacache": "^19.0.0", - "fs-minipass": "^3.0.0", - "minipass": "^7.0.2", - "npm-package-arg": "^12.0.0", - "npm-packlist": "^9.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.0", - "proc-log": "^5.0.0", - "promise-retry": "^2.0.1", - "sigstore": "^3.0.0", - "ssri": "^12.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "bin/index.js" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/tar/node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "license": "ISC", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", "dependencies": { - "minipass": "^3.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 8" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/tar/node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "license": "ISC", - "engines": { - "node": ">=8" - } + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "license": "MIT" }, - "node_modules/@npmcli/metavuln-calculator/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" + "node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", + "license": "MIT" }, - "node_modules/@npmcli/name-from-folder": { + "node_modules/chownr": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-3.0.0.tgz", - "integrity": "sha512-61cDL8LUc9y80fXn+lir+iVt8IS0xHqEKwPu/5jCjxQTVoSCmkXvw4vbMrzAMtmghz3/AkiBjhHkDKUH+kf7kA==", - "license": "ISC", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=18" } }, - "node_modules/@npmcli/node-gyp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-4.0.0.tgz", - "integrity": "sha512-+t5DZ6mO/QFh78PByMq1fGSAub/agLJZDRfJRMeOSNCt8s9YVlTjmGpIPwPhvXTGUIJk+WszlT0rQa1W33yzNA==", + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", "license": "ISC", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">= 12" } }, - "node_modules/@npmcli/package-json": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-6.1.1.tgz", - "integrity": "sha512-d5qimadRAUCO4A/Txw71VM7UrRZzV+NPclxz/dc+M6B2oYwjWTjqh8HA/sGQgs9VZuJ6I/P7XIAlJvgrl27ZOw==", + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", "dependencies": { - "@npmcli/git": "^6.0.0", - "glob": "^10.2.2", - "hosted-git-info": "^8.0.0", - "json-parse-even-better-errors": "^4.0.0", - "proc-log": "^5.0.0", - "semver": "^7.5.3", - "validate-npm-package-license": "^3.0.4" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=20" } }, - "node_modules/@npmcli/promise-spawn": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.2.tgz", - "integrity": "sha512-/bNJhjc+o6qL+Dwz/bqfTQClkEO5nTQ1ZEcdCkAQjhkZMHIh22LPG7fNh1enJP1NKWDqYiiABnjFCY7E0zHYtQ==", - "license": "ISC", - "dependencies": { - "which": "^5.0.0" - }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@npmcli/query": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-4.0.0.tgz", - "integrity": "sha512-3pPbese0fbCiFJ/7/X1GBgxAKYFE8sxBddA7GtuRmOgNseH4YbGsXJ807Ig3AEwNITjDUISHglvy89cyDJnAwA==", - "license": "ISC", - "dependencies": { - "postcss-selector-parser": "^6.1.2" + "node": ">=12" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@npmcli/redact": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-3.1.1.tgz", - "integrity": "sha512-3Hc2KGIkrvJWJqTbvueXzBeZlmvoOxc2jyX00yzr3+sNFquJg0N8hH4SAPLPVrkWIRQICVpVgjrss971awXVnA==", - "license": "ISC", + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@npmcli/run-script": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-9.1.0.tgz", - "integrity": "sha512-aoNSbxtkePXUlbZB+anS1LqsJdctG5n3UVhfU47+CDdwMi6uNTBMF9gPcQRnqghQd2FGzcwwIFBruFMxjhBewg==", - "license": "ISC", - "dependencies": { - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.0", - "@npmcli/promise-spawn": "^8.0.0", - "node-gyp": "^11.0.0", - "proc-log": "^5.0.0", - "which": "^5.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@sigstore/bundle": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-3.1.0.tgz", - "integrity": "sha512-Mm1E3/CmDDCz3nDhFKTuYdB47EdRFRQMOE/EAbiG1MJW77/w1b3P7Qx7JSrVJs8PfwOLOVcKQCHErIwCTyPbag==", - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.4.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@sigstore/core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-2.0.0.tgz", - "integrity": "sha512-nYxaSb/MtlSI+JWcwTHQxyNmWeWrUXJJ/G4liLrGG7+tS4vAz6LF3xRXqLH6wPIVUoZQel2Fs4ddLx4NCpiIYg==", - "license": "Apache-2.0", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@sigstore/protobuf-specs": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.4.0.tgz", - "integrity": "sha512-o09cLSIq9EKyRXwryWDOJagkml9XgQCoCSRjHOnHLnvsivaW7Qznzz6yjfV7PHJHhIvyp8OH7OX8w0Dc5bQK7A==", - "license": "Apache-2.0", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@sigstore/sign": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-3.1.0.tgz", - "integrity": "sha512-knzjmaOHOov1Ur7N/z4B1oPqZ0QX5geUfhrVaqVlu+hl0EAoL4o+l0MSULINcD5GCWe3Z0+YJO8ues6vFlW0Yw==", - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^3.1.0", - "@sigstore/core": "^2.0.0", - "@sigstore/protobuf-specs": "^0.4.0", - "make-fetch-happen": "^14.0.2", - "proc-log": "^5.0.0", - "promise-retry": "^2.0.1" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@sigstore/tuf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-3.1.0.tgz", - "integrity": "sha512-suVMQEA+sKdOz5hwP9qNcEjX6B45R+hFFr4LAWzbRc5O+U2IInwvay/bpG5a4s+qR35P/JK/PiKiRGjfuLy1IA==", - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.4.0", - "tuf-js": "^3.0.1" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@sigstore/verify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-2.1.0.tgz", - "integrity": "sha512-kAAM06ca4CzhvjIZdONAL9+MLppW3K48wOFy1TbuaWFW/OMfl8JuTgW0Bm02JB1WJGT/ET2eqav0KTEKmxqkIA==", - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^3.1.0", - "@sigstore/core": "^2.0.0", - "@sigstore/protobuf-specs": "^0.4.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@tufjs/canonical-json": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", - "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", - "license": "MIT", - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/@tufjs/models": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-3.0.1.tgz", - "integrity": "sha512-UUYHISyhCU3ZgN8yaear3cGATHb3SMuKHsQ/nVbHXcmnBf+LzQ/cQfhNG+rfaSHgqGKNEm2cOCLVLELStUQ1JA==", - "license": "MIT", - "dependencies": { - "@tufjs/canonical-json": "2.0.0", - "minimatch": "^9.0.5" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@typespec/compiler": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.66.0.tgz", - "integrity": "sha512-JoaHQCc1Va48xuiws7UHFa9ix1bxxJrjTud69mrbu67HerqLN5meLwNkqVGrOlEfUnvMcnaXNQlHbMbixmshQA==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "~7.26.2", - "@inquirer/prompts": "^7.3.1", - "@npmcli/arborist": "^8.0.0", - "ajv": "~8.17.1", - "change-case": "~5.4.4", - "globby": "~14.0.2", - "is-unicode-supported": "^2.1.0", - "mustache": "~4.2.0", - "picocolors": "~1.1.1", - "prettier": "~3.4.2", - "semver": "^7.6.3", - "temporal-polyfill": "^0.2.5", - "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.12", - "yaml": "~2.7.0", - "yargs": "~17.7.2" - }, - "bin": { - "tsp": "cmd/tsp.js", - "tsp-server": "cmd/tsp-server.js" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@typespec/http": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.66.0.tgz", - "integrity": "sha512-IKD5FMvnjbZ5cdQ3wTXXAnnQgDcqFuPtVphpTdnYER87gGEa8YNLocgK44CLFB+GvVkTecDltG0CNKPSPQ0RMw==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.66.0", - "@typespec/streams": "~0.66.0" - }, - "peerDependenciesMeta": { - "@typespec/streams": { - "optional": true - } - } - }, - "node_modules/@typespec/openapi": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.66.0.tgz", - "integrity": "sha512-Oiwx2glN5bET4C3cuU5DIhd7nL/wBi+tg1KGBx0bU4KogLaGf+BLW5ak0Epxnvhy8VYvPhCpTGbez0I6gkEOwA==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0" - } - }, - "node_modules/@typespec/rest": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.66.0.tgz", - "integrity": "sha512-r/o1GXz/BB9lgMPzMkrLIhTUm4elx5JAD/t6QGWDdUptXntVSapCYmIwCV/Iv10+QnHrsB1/v152nz9nd4lOHg==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.66.0", - "@typespec/http": "~0.66.0" - } - }, - "node_modules/@typespec/versioning": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.66.0.tgz", - "integrity": "sha512-8AhTpo6jxcjwxZPAegI/sDEePoqXz5Si8XBw/x7jz+EkBvbgqT9GT0UUzJL1XgOwQaks2aMr4DdOn8n9kOCltg==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.66.0" - } - }, - "node_modules/@typespec/xml": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.66.0.tgz", - "integrity": "sha512-jbBRctPzroJK+ANxe1YNXwTsx99N6rLuaxbb/jVShgHPTzLAD1LckswEMO9HPfQWF8ld1+YB0yJQMoMjY1ZGjg==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.66.0" - } - }, - "node_modules/abbrev": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.0.tgz", - "integrity": "sha512-+/kfrslGQ7TNV2ecmQwMJj/B65g5KVq1/L3SGVZ3tCYGqlzFuFCGBZJtMP99wH3NpEUyAjn0zPdPUg0D+DwrOA==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/bin-links": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-5.0.0.tgz", - "integrity": "sha512-sdleLVfCjBtgO5cNjA2HVRvWBJAHs4zwenaCPMNJAJU0yNxpzj80IpjOIimkpkr+mhlA+how5poQtt53PygbHA==", - "license": "ISC", - "dependencies": { - "cmd-shim": "^7.0.0", - "npm-normalize-package-bin": "^4.0.0", - "proc-log": "^5.0.0", - "read-cmd-shim": "^5.0.0", - "write-file-atomic": "^6.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacache": { - "version": "19.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz", - "integrity": "sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==", - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^4.0.0", - "fs-minipass": "^3.0.0", - "glob": "^10.2.2", - "lru-cache": "^10.0.1", - "minipass": "^7.0.3", - "minipass-collect": "^2.0.1", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^7.0.2", - "ssri": "^12.0.0", - "tar": "^7.4.3", - "unique-filename": "^4.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/change-case": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "license": "MIT" - }, - "node_modules/chardet": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", - "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", - "license": "MIT" - }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/cli-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", - "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", - "license": "ISC", - "engines": { - "node": ">= 12" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "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/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.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==", - "license": "MIT", - "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/cmd-shim": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-7.0.0.tgz", - "integrity": "sha512-rtpaCbr164TPPh+zFdkWpCyZuKkjpAzODfaZCf/SVJZzJN+4bHQb/LP3Jzq5/+84um3XXY8r548XiWKSborwVw==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/common-ancestor-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", - "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", - "license": "ISC" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "license": "MIT", - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/exponential-backoff": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", - "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==", - "license": "Apache-2.0" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/fs-minipass": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", - "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.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==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", - "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", - "license": "MIT", - "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" - }, - "node_modules/hosted-git-info": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.0.2.tgz", - "integrity": "sha512-sYKnA7eGln5ov8T8gnYlkSOxFJvywzEx9BueN6xo/GKO8PGiI6uK6xx+DIGe45T3bdVjLAQDQW1aicT8z8JwQg==", - "license": "ISC", - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "license": "BSD-2-Clause" - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-walk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-7.0.0.tgz", - "integrity": "sha512-T4gbf83A4NH95zvhVYZc+qWocBBGlpzUXLPGurJggw/WIOwicfXJChLDP/iBZnN5WqROSu5Bm3hhle4z8a8YGQ==", - "license": "ISC", - "dependencies": { - "minimatch": "^9.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/ini": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-5.0.0.tgz", - "integrity": "sha512-+N0ngpO3e7cRUWOJAS7qw0IZIVc6XPrW4MlFBdD066F2L4k1L6ker3hLqSq7iXxU5tgS4WGkIUElWn5vogAEnw==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "license": "MIT", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "license": "MIT" - }, - "node_modules/json-parse-even-better-errors": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz", - "integrity": "sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==", - "license": "MIT", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "node_modules/json-stringify-nice": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", - "integrity": "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==", - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT" - }, - "node_modules/just-diff": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-6.0.2.tgz", - "integrity": "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==", - "license": "MIT" - }, - "node_modules/just-diff-apply": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", - "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" - }, - "node_modules/make-fetch-happen": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz", - "integrity": "sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==", - "license": "ISC", - "dependencies": { - "@npmcli/agent": "^3.0.0", - "cacache": "^19.0.1", - "http-cache-semantics": "^4.1.1", - "minipass": "^7.0.2", - "minipass-fetch": "^4.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^1.0.0", - "proc-log": "^5.0.0", - "promise-retry": "^2.0.1", - "ssri": "^12.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass": { + "node_modules/cliui/node_modules/strip-ansi": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/minipass-collect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", - "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/minipass-fetch": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-4.0.1.tgz", - "integrity": "sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", "dependencies": { - "minipass": "^7.0.3", - "minipass-sized": "^1.0.3", - "minizlib": "^3.0.1" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" - } - }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-flush/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-flush/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" + "node": ">=12" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/minipass-pipeline/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-pipeline/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" + "node": ">=18" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/minipass-sized/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8" + "node": ">=7.0.0" } }, - "node_modules/minipass-sized/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" }, - "node_modules/minizlib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.1.tgz", - "integrity": "sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==", - "license": "MIT", - "dependencies": { - "minipass": "^7.0.4", - "rimraf": "^5.0.5" - }, - "engines": { - "node": ">= 18" - } + "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==", + "license": "MIT" }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/mustache": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", - "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", - "bin": { - "mustache": "bin/mustache" - } - }, - "node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "license": "ISC", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=6" } }, - "node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, - "node_modules/node-gyp": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-11.1.0.tgz", - "integrity": "sha512-/+7TuHKnBpnMvUQnsYEb0JOozDZqarQbfNuSGLXIjhStMT0fbw7IdSqWgopOP5xhRZE+lsbIvAHcekddruPZgQ==", + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "license": "MIT", "dependencies": { - "env-paths": "^2.2.0", - "exponential-backoff": "^3.1.1", - "glob": "^10.3.10", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^14.0.3", - "nopt": "^8.0.0", - "proc-log": "^5.0.0", - "semver": "^7.3.5", - "tar": "^7.4.3", - "which": "^5.0.0" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=8.6.0" } }, - "node_modules/nopt": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", - "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", - "license": "ISC", - "dependencies": { - "abbrev": "^3.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" }, - "node_modules/npm-bundled": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-4.0.0.tgz", - "integrity": "sha512-IxaQZDMsqfQ2Lz37VvyyEtKLe8FsRZuysmedy/N06TU1RyVppYKXrO4xIhR0F+7ubIBox6Q7nir6fQI3ej39iA==", + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "license": "ISC", "dependencies": { - "npm-normalize-package-bin": "^4.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "reusify": "^1.0.4" } }, - "node_modules/npm-install-checks": { + "node_modules/fill-range": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-7.1.1.tgz", - "integrity": "sha512-u6DCwbow5ynAX5BdiHQ9qvexme4U3qHW3MWe5NqH+NeBm0LbiH6zvGjNNew1fY+AZZUtVHbOPF3j7mJxbUzpXg==", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { - "semver": "^7.1.1" + "to-regex-range": "^5.0.1" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=8" } }, - "node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", + "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==", "license": "ISC", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/npm-package-arg": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.2.tgz", - "integrity": "sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==", - "license": "ISC", - "dependencies": { - "hosted-git-info": "^8.0.0", - "proc-log": "^5.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^6.0.0" - }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/npm-packlist": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-9.0.0.tgz", - "integrity": "sha512-8qSayfmHJQTx3nJWYbbUmflpyarbLMBc6LCAjYsiGtXxDB68HaZpb8re6zeaLGxZzDuMdhsg70jryJe+RrItVQ==", - "license": "ISC", - "dependencies": { - "ignore-walk": "^7.0.0" + "node": ">=18" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npm-pick-manifest": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-10.0.0.tgz", - "integrity": "sha512-r4fFa4FqYY8xaM7fHecQ9Z2nE9hgNfJR+EmoKv0+chvzWkBcORX3r0FpTByP+CbOVJDladMXnPQGVN8PBLGuTQ==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "license": "ISC", "dependencies": { - "npm-install-checks": "^7.1.0", - "npm-normalize-package-bin": "^4.0.0", - "npm-package-arg": "^12.0.0", - "semver": "^7.3.5" + "is-glob": "^4.0.1" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">= 6" } }, - "node_modules/npm-registry-fetch": { - "version": "18.0.2", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-18.0.2.tgz", - "integrity": "sha512-LeVMZBBVy+oQb5R6FDV9OlJCcWDU+al10oKpe+nsvcHnG24Z3uM3SvJYKfGJlfGjVU8v9liejCrUR/M5HO5NEQ==", - "license": "ISC", + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "license": "MIT", "dependencies": { - "@npmcli/redact": "^3.0.0", - "jsonparse": "^1.3.1", - "make-fetch-happen": "^14.0.0", - "minipass": "^7.0.2", - "minipass-fetch": "^4.0.0", - "minizlib": "^3.0.1", - "npm-package-arg": "^12.0.0", - "proc-log": "^5.0.0" + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/p-map": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", - "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", - "license": "MIT", "engines": { "node": ">=18" }, @@ -2310,191 +997,162 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "license": "BlueOak-1.0.0" - }, - "node_modules/pacote": { - "version": "19.0.1", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-19.0.1.tgz", - "integrity": "sha512-zIpxWAsr/BvhrkSruspG8aqCQUUrWtpwx0GjiRZQhEM/pZXrigA32ElN3vTcCPUDOFmHr6SFxwYrvVUs5NTEUg==", - "license": "ISC", + "node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "license": "MIT", "dependencies": { - "@npmcli/git": "^6.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/package-json": "^6.0.0", - "@npmcli/promise-spawn": "^8.0.0", - "@npmcli/run-script": "^9.0.0", - "cacache": "^19.0.0", - "fs-minipass": "^3.0.0", - "minipass": "^7.0.2", - "npm-package-arg": "^12.0.0", - "npm-packlist": "^9.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.0", - "proc-log": "^5.0.0", - "promise-retry": "^2.0.1", - "sigstore": "^3.0.0", - "ssri": "^12.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "bin/index.js" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/pacote/node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "license": "ISC", + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">= 4" } }, - "node_modules/pacote/node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/pacote/node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/pacote/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" + "dependencies": { + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/pacote/node_modules/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=0.12.0" } }, - "node_modules/pacote/node_modules/tar/node_modules/fs-minipass": { + "node_modules/is-unicode-supported": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "license": "MIT", + "engines": { + "node": ">=18" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", "engines": { "node": ">= 8" } }, - "node_modules/pacote/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, - "node_modules/pacote/node_modules/tar/node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "license": "ISC", "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/pacote/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, - "node_modules/parse-conflict-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-4.0.0.tgz", - "integrity": "sha512-37CN2VtcuvKgHUs8+0b1uJeEsbGn61GRHz469C94P5xiOoqpDYJYwjg4RY9Vmz39WyZAVkR5++nbJwLMIgOCnQ==", - "license": "ISC", + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "license": "MIT", "dependencies": { - "json-parse-even-better-errors": "^4.0.0", - "just-diff": "^6.0.0", - "just-diff-apply": "^5.2.0" + "minipass": "^7.1.2" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">= 18" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "license": "MIT", - "engines": { - "node": ">=8" + "bin": { + "mustache": "bin/mustache" } }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/path-type": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", - "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", "license": "MIT", "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2527,23 +1185,10 @@ "node": ">=4" } }, - "node_modules/postcss-selector-parser": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", - "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -2555,55 +1200,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/proc-log": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", - "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/proggy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/proggy/-/proggy-3.0.0.tgz", - "integrity": "sha512-QE8RApCM3IaRRxVzxrjbgNMpQEX6Wu0p0KBeoSiSEw5/bsGwZHsshF4LCxH2jp/r6BU+bqA3LrMDEYNfJnpD8Q==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/promise-all-reject-late": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", - "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/promise-call-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-3.0.2.tgz", - "integrity": "sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw==", - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "license": "MIT", - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2624,37 +1220,6 @@ ], "license": "MIT" }, - "node_modules/read-cmd-shim": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz", - "integrity": "sha512-SEbJV7tohp3DAAILbEMPXavBjAnMN0tVnh4+9G8ihV4Pq3HYF9h8QNez9zkJ1ILkv9G2BjdzwctznGZXgu/HGw==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/read-package-json-fast": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-4.0.0.tgz", - "integrity": "sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==", - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^4.0.0", - "npm-normalize-package-bin": "^4.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.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==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -2664,15 +1229,6 @@ "node": ">=0.10.0" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -2683,21 +1239,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", - "license": "ISC", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2728,9 +1269,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -2739,175 +1280,31 @@ "node": ">=10" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sigstore": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-3.1.0.tgz", - "integrity": "sha512-ZpzWAFHIFqyFE56dXqgX/DkDRZdz+rRcjoIk/RQU4IX0wiCv1l8S7ZrXDHcCc+uaf+6o7w3h2l3g6GYG5TKN9Q==", - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^3.1.0", - "@sigstore/core": "^2.0.0", - "@sigstore/protobuf-specs": "^0.4.0", - "@sigstore/sign": "^3.1.0", - "@sigstore/tuf": "^3.1.0", - "@sigstore/verify": "^2.1.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "license": "MIT", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", - "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", - "license": "MIT", - "dependencies": { - "ip-address": "^9.0.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", - "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "socks": "^2.8.3" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", - "license": "CC0-1.0" - }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "license": "BSD-3-Clause" - }, - "node_modules/ssri": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-12.0.0.tgz", - "integrity": "sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==", - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, + "license": "ISC", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, "engines": { - "node": ">=12" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/string-width-cjs": { - "name": "string-width", + "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==", @@ -2921,50 +1318,7 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/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==", - "license": "MIT" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -2976,26 +1330,16 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "license": "ISC", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", + "minizlib": "^3.1.0", "yallist": "^5.0.0" }, "engines": { @@ -3003,18 +1347,18 @@ } }, "node_modules/temporal-polyfill": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", - "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.0.tgz", + "integrity": "sha512-qNsTkX9K8hi+FHDfHmf22e/OGuXmfBm9RqNismxBrnSmZVJKegQ+HYYXT+R7Ha8F/YSm2Y34vmzD4cxMu2u95g==", "license": "MIT", "dependencies": { - "temporal-spec": "^0.2.4" + "temporal-spec": "0.3.0" } }, "node_modules/temporal-spec": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", - "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.0.tgz", + "integrity": "sha512-n+noVpIqz4hYgFSMOSiINNOUOMFtV5cZQNCmmszA6GiVFVRt3G7AqVyhXjhCSmowvQn+NsGn+jMDMKJYHd3bSQ==", "license": "ISC" }, "node_modules/to-regex-range": { @@ -3029,45 +1373,10 @@ "node": ">=8.0" } }, - "node_modules/treeverse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", - "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/tuf-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-3.0.1.tgz", - "integrity": "sha512-+68OP1ZzSF84rTckf3FA95vJ1Zlx/uaXyiiKyPd1pA4rZNkpEvDAKmsu1xUSmbF/chCRYgZ6UZkDwC7PmzmAyA==", - "license": "MIT", - "dependencies": { - "@tufjs/models": "3.0.1", - "debug": "^4.3.6", - "make-fetch-happen": "^14.0.1" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", "license": "MIT", "engines": { "node": ">=18" @@ -3076,55 +1385,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unique-filename": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", - "integrity": "sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==", - "license": "ISC", - "dependencies": { - "unique-slug": "^5.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/unique-slug": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-5.0.0.tgz", - "integrity": "sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==", - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "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==", - "license": "MIT" - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/validate-npm-package-name": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-6.0.0.tgz", - "integrity": "sha512-d7KLgL1LD3U3fgnvWEY1cQXoO/q6EQ1BSz48Sa149V/5zVTAbgmZIpyI8TRi6U9/JNyeYLlTKsEMPtLC27RFUg==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -3168,27 +1428,6 @@ "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", "license": "MIT" }, - "node_modules/walk-up-path": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", - "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", - "license": "ISC" - }, - "node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -3203,119 +1442,6 @@ "node": ">=8" } }, - "node_modules/wrap-ansi-cjs": { - "name": "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==", - "license": "MIT", - "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/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/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==", - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/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==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/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==", - "license": "MIT" - }, - "node_modules/wrap-ansi/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==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/write-file-atomic": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-6.0.0.tgz", - "integrity": "sha512-GmqrO8WJ1NuzJ2DrziEI2o57jKAVIQNf8a18W3nCYU3H7PNWqCCVTeH6/NQE93CIllIgQS98rrmVkYgTX9fFJQ==", - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -3335,89 +1461,97 @@ } }, "node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "license": "ISC", "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "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==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "license": "MIT" }, "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==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/yoctocolors-cjs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", - "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", "license": "MIT", "engines": { "node": ">=18" diff --git a/typespec/package.json b/typespec/package.json index 9cd8ffc3ef..473f2b98eb 100644 --- a/typespec/package.json +++ b/typespec/package.json @@ -1,18 +1,18 @@ { "name": "radius", "version": "0.1.0", - "type": "module", - "dependencies": { - "@typespec/compiler": "~0.66.0", - "@azure-tools/typespec-autorest": "~0.52.0", - "@azure-tools/typespec-azure-core": "~0.52.0", - "@azure-tools/typespec-azure-resource-manager": "~0.52.0", - "@typespec/http": "~0.66.0", - "@typespec/openapi": "~0.66.0", - "@typespec/rest": "~0.66.0", - "@typespec/versioning": "~0.66.0" - }, "private": true, + "license": "Apache-2.0", "author": "Radius Authors", - "license": "Apache-2.0" + "type": "module", + "dependencies": { + "@azure-tools/typespec-autorest": "~0.61.1", + "@azure-tools/typespec-azure-core": "~0.61.0", + "@azure-tools/typespec-azure-resource-manager": "~0.61.1", + "@typespec/compiler": "~1.5.0", + "@typespec/http": "~1.6.0", + "@typespec/openapi": "~1.5.0", + "@typespec/rest": "~0.75.0", + "@typespec/versioning": "~0.75.0" + } } diff --git a/typespec/radius/v1/resources.tsp b/typespec/radius/v1/resources.tsp index 5ce05b0fe6..07c29d0d06 100644 --- a/typespec/radius/v1/resources.tsp +++ b/typespec/radius/v1/resources.tsp @@ -37,11 +37,11 @@ model EnvironmentScopedResource { application?: string; @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Status of a resource.") - @visibility("read") + @visibility(Lifecycle.Read) status?: ResourceStatus; } @@ -54,11 +54,11 @@ model ApplicationScopedResource { application: string; @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Status of a resource.") - @visibility("read") + @visibility(Lifecycle.Read) status?: ResourceStatus; } @@ -71,11 +71,11 @@ model GlobalScopedResource { application?: string; @doc("The status of the asynchronous operation.") - @visibility("read") + @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; @doc("Status of a resource.") - @visibility("read") + @visibility(Lifecycle.Read) status?: ResourceStatus; } @@ -158,11 +158,11 @@ model ResourceStatus { compute?: EnvironmentCompute; @doc("The recipe data at the time of deployment") - @visibility("read") + @visibility(Lifecycle.Read) recipe?: RecipeStatus; @doc("Properties of an output resource") - @extension("x-ms-identifiers", []) + @extension("x-ms-identifiers", #[]) outputResources?: OutputResource[]; } diff --git a/typespec/radius/v1/trackedresource.tsp b/typespec/radius/v1/trackedresource.tsp index 56657b8b8a..5cac91c21c 100644 --- a/typespec/radius/v1/trackedresource.tsp +++ b/typespec/radius/v1/trackedresource.tsp @@ -15,8 +15,10 @@ limitations under the License. */ import "@typespec/openapi"; +import "@typespec/http"; using OpenAPI; +using TypeSpec.Http; /* Using Azure.ResoureManager namespace here is a workaround for typespec bug: https://github.com/Azure/typespec-azure/issues/110" ARM TrackedResource resource has "properties" field optional. We do not want this because the user can skip the @@ -27,7 +29,7 @@ namespace Azure.ResourceManager; @doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.") @Azure.ResourceManager.Private.armResourceInternal(TProperties) -@TypeSpec.Http.includeInapplicableMetadataInPayload(false) +@Http.Private.includeInapplicableMetadataInPayload(false) model TrackedResourceRequired< TProperties extends {}, TResourceType extends valueof string, @@ -36,7 +38,7 @@ model TrackedResourceRequired< #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "template" #suppress "@azure-tools/typespec-azure-core/bad-record-type" @doc("The resource-specific properties for this resource.") - @visibility("read", "create") + @visibility(Lifecycle.Read, Lifecycle.Create) @extension("x-ms-client-flatten", true) properties: TProperties; } diff --git a/versions.yaml b/versions.yaml index 5d6076ad15..9630524554 100644 --- a/versions.yaml +++ b/versions.yaml @@ -1,7 +1,9 @@ supported: + - channel: '0.53' + version: 'v0.53.0' +deprecated: - channel: '0.52' version: 'v0.52.0' -deprecated: - channel: '0.51' version: 'v0.51.0' - channel: '0.50'